Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Making a map... help! (http://www.mysidiaadoptables.com/forum/showthread.php?t=3724)

dulop 05-23-2012 03:12 AM

Making a map... help!
 
Hello.
i have seen the tutorial "Exploring system" from PTGigi.

I understand it, but i have a problem.

When i put "hello" (for example) in the article content, the pages works fine and show "hello".

PHP Code:

$act $_GET["act"];
$act preg_replace("/[^a-zA-Z0-9\\040.]/"""$act);
$act secure($act);

$num $_GET["num"];
$num preg_replace("/[^a-zA-Z0-9\\040.]/"""$num);
$num secure($num); 

if (
$act == ""){
$article_title "Magical Forest!";
$article_content "Hello";


But when i try to put a map, the pages become white D: and don't work!

PHP Code:

$act $_GET["act"];
$act preg_replace("/[^a-zA-Z0-9\\040.]/"""$act);
$act secure($act);

$num $_GET["num"];
$num preg_replace("/[^a-zA-Z0-9\\040.]/"""$num);
$num secure($num); 

if (
$act == ""){
$article_title "Magical Forest!";
$article_content "
<html>
<head>
</head>
<body>
<map name="
mapa1">
 <area alt="
Pulsa para conocer mi trabajo" shape="rect" coords="419,93,448,121" href="www.digiforos.net"> 
 <area alt="
Pulsa para ver la página de mis amigos" shape="rect" coords="64,32,96,64" href="www.digiforos.net"> 
 <area alt="
Pulsa para ver mi novia" shape="rect" coords="450,37,480,67" href="www.digiforos.net"> 
 <area alt="
Pulsa para conocer a mi Familia" shape="ret" coords="129,158,164,190" href="www.digiforos.net"> 
 <area alt="
Pulsa para conocer mi trabajo" shape="rect" coords="481,195,510,223" href="www.digiforos.net">
 <area alt="
Pulsa para conocer mi trabajo" shape="rect" coords="353,256,386,288" href="www.digiforos.net"> 

 </map> 
<img src="
www.digiforos.net/digiadoptables/historia/ciudad.png"alt="Mapa de imágenesPulsa en cada una de los círculos." border="0" usemap="mapa1"> 
</body>
</html>"
;


I have been all night trying to fix, but i can't :S

Please can you help me? thanks

AlexC 05-23-2012 05:13 AM

The code probably isn't working because html and php don't just mix like that. Inside the article content tag, turn all of the double quotes to one quotes and see if that works (but not outside, because that's php code).

That code is rather outdated as well and doesn't work properly, anyway. :c If you'd like, I uses php code for a random explore page - it doesn't let you do scripted adventures, but it lets you do random phrases that it'll select on and also chances (so you can do it that an adoptable promo code page could be more rare or something). I can give you that.

dulop 05-23-2012 12:24 PM

Thanks! with the single quote it works!

PHP Code:

$article_title "Ciudad data"
$article_content "<map name='mapa1'> 
 <area shape='rect' coords='419,93,448,121' href='http://www.digiforos.net'>  
 </map>  
<img src='http://www.digiforos.net/digiadoptables/historia/ciudad.png' usemap='#mapa1'> "
;


Thank you

AlexC 05-23-2012 02:30 PM

glad to know that was what fixed it. :3 You should always keep that in the back of your head when working with html and php - all html needs to be in single quotes. it'll save your life, trust me. (so many support threads before I learnt that...)

PTGigi 05-23-2012 03:37 PM

Gah, sorry! I hadn't realized my year-old tutorial was still in use, even if I never got around to completing it. XD I've added a note at the top of the tutorial now that states it's outdated so it won't confuse people anymore. Sorry again about that ^-^"

Maybe I'll get around to updating it (or more likely, just making a new thread) when I actually start up a new site :3

dulop 05-23-2012 08:14 PM

Quote:

Originally Posted by Gloometh (Post 24066)
glad to know that was what fixed it. :3 You should always keep that in the back of your head when working with html and php - all html needs to be in single quotes. it'll save your life, trust me. (so many support threads before I learnt that...)

Haha thank you! ^^

Quote:

Originally Posted by PTGigi (Post 24067)
Gah, sorry! I hadn't realized my year-old tutorial was still in use, even if I never got around to completing it. XD I've added a note at the top of the tutorial now that states it's outdated so it won't confuse people anymore. Sorry again about that ^-^"

Maybe I'll get around to updating it (or more likely, just making a new thread) when I actually start up a new site :3

Hahaha is very usefull your tutorial! it's a shame that you never continue with next parts!
I have been trying and i can make a map x) but i dont know how to, for example, add cash when i click in a specify place.
Would be great if you continue with the tutorial! :B i will be waiting!

P.D.: Sorry if i speak a bad english, i'm not native speaker xD


All times are GMT -5. The time now is 09:25 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.