Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 12-07-2014, 07:05 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 137,010
Kyttias is on a distinguished road
Default

This thread was made for an earlier version of Mysidia and pages are not rendered in the same way anymore.

I know that in 1.3.4 that for each page there are two: one to hold complex code, and one to render the page. It's helpful to bounce to a second file for complex code, especially when forms are involved. I don't actually know how to get around having two files, even though one is fundamentally going to be blank if it's useless to you.

Perhaps you can glean from my example:

I have map.php, and it contains merely this blank class (and the contents from blank.php work just as well, to base an example off of):
PHP Code:
<?php

class MapController extends AppController{}

?>
And in the view folder, I have mapview.php:
PHP Code:
<?php
class MapView extends View{
    
    public function 
index(){
        
$document $this->document;    
        
$document->setTitle("Novul World Map");    
        
$document->add(new Comment("<img name='NovuMap' src='http://fc01.deviantart.net/fs70/f/2014/308/9/d/map_small_by_kyttias-d85blb1.png' usemap='#M_NovuMap' style='border: 1px solid #ccc;'>"));
        
$document->add(new Comment('<map name="M_NovuMap">
                <area alt="woods" title="" href="#" shape="poly" coords="224,39,246,70,215,130,174,135,153,115,157,88" />
                <area alt="harbor" title="" href="#" shape="poly" coords="152,127,195,158,206,199,207,229,187,252,161,266,129,268,91,236,84,199,104,172,135,150" />
                <area alt="maple thicket" title="" href="#" shape="poly" coords="78,259,143,289,140,314,143,335,128,358,91,376,51,347,43,300" />
                <area alt="bay" title="" href="#" shape="poly" coords="150,330,183,346,227,327,230,276,205,241,173,267,149,282" />
                <area alt="hills" title="" href="#" shape="poly" coords="219,244,263,214,304,221,335,264,286,309,240,310,236,274" />
                <area alt="jungle" title="" href="#" shape="poly" coords="224,335,252,390,311,422,377,438,408,354,371,312,306,312,239,319" />
                <area alt="marsh" title="" href="#" shape="poly" coords="249,399,276,423,256,485,225,489,138,478,84,426,102,403,120,395,118,382,136,363,188,395,226,403" />
                <area alt="mangroves" title="" href="#" shape="poly" coords="319,438,296,467,302,492,425,493,427,465,415,441" />
                <area alt="kelp forest" title="" href="#" shape="poly" coords="423,433,437,470,459,491,496,490,527,475,530,438,515,407,483,412,438,419" />
                <area alt="plateau" title="" href="#" shape="poly" coords="430,362,473,406,507,391,519,378,525,343,502,295,466,292,433,303" />
                <area alt="mountains" title="" href="#" shape="poly" coords="361,199,396,199,413,205,426,225,453,247,475,259,490,288,448,291,428,308,365,299,337,279,341,251,320,217" />
                <area alt="farmland" title="" href="#" shape="poly" coords="546,261,560,289,624,295,684,282,715,222,654,196" />
                <area alt="beach" title="" href="#" shape="poly" coords="580,73,577,107,603,137,632,160,673,168,693,166,680,130,638,121,616,87" />
                <area alt="plains" title="" href="#" shape="poly" coords="553,28,511,61,441,73,384,29,402,9,500,3" />
                <area alt="desert" title="" href="#" shape="poly" coords="540,75,423,94,411,141,430,202,487,235,563,238,608,204,593,142" />
                <area alt="volcano" title="" href="#" shape="poly" coords="304,107,361,130,370,166,352,195,316,205,283,195,256,180,263,121" />
                <area alt="brambles" title="" href="#" shape="poly" coords="279,11,266,49,279,90,315,102,369,99,406,61,385,38,342,8" />
            </map>
        '
));

    } 
#end index
#end MapView
?>
My page contains an image map (there's a couple of handy generators for this, here's one). I don't have links associated with the locations yet, but you get the idea?

While this is not an exploration system in the sense that the original post has, I hope it explains how pages are rendered a little better? I'm trying to write up some vague documentation based on things I've learned about Mysidia, you can find that here.

***

edit: And to imitate exactly what the original post has, try this--

explore.php:
PHP Code:
<?php

class ExploreController extends AppController{}

?>
view/exploreview.php:
PHP Code:
<?php
class ExploreView extends View{
    
    public function 
index(){
        
$document $this->document;        

        
$document->setTitle("Exploring *Location*");
        
$document->add(new Comment("<div style='text-align:left;'>You have decided to take some of your pets exploring down in the park. It's a beautiful day and you'd just love an adventure right about now...</div><br /><br><iframe src='http://yoursite.com/explore/0.html' frameborder='0' height='400' width='700'></iframe>"));

    } 
#end index
#end ExploreView
?>
I can't particularly help you with the rest of it.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 12-07-2014 at 07:13 AM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trade System Kyttias Questions and Supports 4 05-29-2016 12:29 AM
Dev Rambling: Exploration System Kyttias Programming and Game Development 4 01-27-2015 01:54 AM
Abandon system bokkun Mys v1.1.x Mods 30 11-16-2010 10:19 PM
Trade System? sensacion Questions and Supports 5 08-20-2010 11:36 AM
Trade System? SieghartZeke Questions and Supports 1 12-28-2009 07:06 AM


All times are GMT -5. The time now is 11:13 PM.

Currently Active Users: 2839 (0 members and 2839 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636