Making a map... help!

Forum
Last Post
Threads / Messages

dulop

Member
Member
Joined
May 3, 2012
Messages
26
Points
0
Mysidian Dollar
3,544
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:
$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:
$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ágenes. Pulsa 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
 
Last edited:
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.
 
Thanks! with the single quote it works!

PHP:
$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
 
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...)
 
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
 
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! ^^

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
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,130
Members
1,603
Latest member
Monako
BETA

Latest Threads

Top