Welcome to Gaia! ::

Reply Archives
How to make those spiffy PHP sigs that have a million links! Goto Page: [] [<] 1 2 3 [>] [»|]

Quick Reply

Enter both words below, separated by a space:

Can't read the text? Click here

Submit

badloki
Captain

PostPosted: Wed Nov 10, 2004 11:25 am


You've got the php coding in there, but your links aren't working for some reason. Can I see a copy of your code?
PostPosted: Wed Nov 10, 2004 11:32 am


I'm pretty sure I followed the instructions correctly, even uploaded both codes to the ftp, so I don't know what I did.


/* Gaia Image Map Go-er
Rudolph J Heuser
*/

require_once("imagemap.class.php");

// new imageMap
$myImageMap = new imageMap();

// define regions
$area = new Rect(162,409,225,416,"http://www.gaiaonline.com/forum/viewtopic.php?pt=1094675570&p=176852369#176852369");
$myImageMap->addToMap($area);

$area = new Rect(75,436,333,446,"http://www.gaiaonline.com/forum/guilds/index.php?page_mode=4&guild_id=207");
$myImageMap->addToMap($area);

$area = new Rect(41,465,357,477,"http://www.gaiaonline.com/forum/viewtopic.php?t=4407155&postdays=0&postorder=asc&start=0");
$myImageMap->addToMap($area);

$area = new Rect(177,77,345,173,"http://www.livejournal.com/users/illiana_galean/");
$myImageMap->addToMap($area);

$myImageMap->setDefaultURL("http://www.gaiaonline.com");

// capture X and Y from query string
$x_and_y = $_SERVER["QUERY_STRING"];
$x_and_y = explode(",",$x_and_y);
$inX = $x_and_y[0];
$inY = $x_and_y[1];
unset($x_and_y);

// echo $inX. "," . $inY;
$myImageMap->testMap($inX, $inY);

?>

Illiana_Galean


badloki
Captain

PostPosted: Wed Nov 10, 2004 11:34 am


Your code looks correct. Here's my own code so you can compare:

Loki's Sig Code
/* Gaia Image Map Go-er
Rudolph J Heuser
*/

require_once("imagemap.php");

// new imageMap
$myImageMap = new imageMap();

// define regions
$area = new Rect(204,3,409,81,"http://cluster.gaiaonline.com/forum/guilds/index.php?page_mode=4&guild_id=207");
$myImageMap->addToMap($area);

$area = new Rect(274,85,409,143,"http://www.gaiaonline.com/forum/viewtopic.php?t=3522575");
$myImageMap->addToMap($area);

$area = new Rect(274,147,409,204,"http://www.gaiaonline.com/forum/viewtopic.php?t=4207698");
$myImageMap->addToMap($area);

$area = new Rect(274,209,409,276,"http://badloki.deviantart.com/");
$myImageMap->addToMap($area);

$myImageMap->setDefaultURL("http://www.gaiaonline.com/forum/viewtopic.php?t=4207698");

// capture X and Y from query string
$x_and_y = $_SERVER["QUERY_STRING"];
$x_and_y = explode(",",$x_and_y);
$inX = $x_and_y[0];
$inY = $x_and_y[1];
unset($x_and_y);

// echo $inX. "," . $inY;
$myImageMap->testMap($inX, $inY);

?>


Where do you have the PHP part hosted at?
PostPosted: Wed Nov 10, 2004 11:42 am


It's hosted on my personal ftp.

Illiana_Galean


badloki
Captain

PostPosted: Wed Nov 10, 2004 11:53 am


Hhhmmmm.... I have no clue as to why it's not working. Perhaps try changing the file name (like as if it were for hostinganime.com)? Maybe your server doesn't like "class" files.

You'd have to change the file name AND the bit of text within the code itself. So it'd go from being named:

imagemap.class.php to imagemap.php

You'd also have to alter this line in your code:

require_once("imagemap.class.php"); to require_once("imagemap.php");

I had to do that in order to get mine to host correctly (but that's because I'm using hostinganime.com).
PostPosted: Wed Nov 10, 2004 11:57 am


BadLoki
Hhhmmmm.... I have no clue as to why it's not working. Perhaps try changing the file name (like as if it were for hostinganime.com)? Maybe your server doesn't like "class" files.

You'd have to change the file name AND the bit of text within the code itself. So it'd go from being named:

imagemap.class.php to imagemap.php

You'd also have to alter this line in your code:

require_once("imagemap.class.php"); to require_once("imagemap.php");

I had to do that in order to get mine to host correctly (but that's because I'm using hostinganime.com).


Ok, I see where I'd have to change it in the code. But the first change confuses me. I used the map.php thing, and the only imagemap.class.php I ever saw was the one in the code.

Illiana_Galean


badloki
Captain

PostPosted: Wed Nov 10, 2004 12:11 pm


Illiana_Galean
BadLoki
Hhhmmmm.... I have no clue as to why it's not working. Perhaps try changing the file name (like as if it were for hostinganime.com)? Maybe your server doesn't like "class" files.

You'd have to change the file name AND the bit of text within the code itself. So it'd go from being named:

imagemap.class.php to imagemap.php

You'd also have to alter this line in your code:

require_once("imagemap.class.php"); to require_once("imagemap.php");

I had to do that in order to get mine to host correctly (but that's because I'm using hostinganime.com).


Ok, I see where I'd have to change it in the code. But the first change confuses me. I used the map.php thing, and the only imagemap.class.php I ever saw was the one in the code.


It's the name of that second file in the ZIP that you had to download. You must upload that file to your host as well for this to work properly.
PostPosted: Wed Nov 10, 2004 12:31 pm


BadLoki
Illiana_Galean
BadLoki
Hhhmmmm.... I have no clue as to why it's not working. Perhaps try changing the file name (like as if it were for hostinganime.com)? Maybe your server doesn't like "class" files.

You'd have to change the file name AND the bit of text within the code itself. So it'd go from being named:

imagemap.class.php to imagemap.php

You'd also have to alter this line in your code:

require_once("imagemap.class.php"); to require_once("imagemap.php");

I had to do that in order to get mine to host correctly (but that's because I'm using hostinganime.com).


Ok, I see where I'd have to change it in the code. But the first change confuses me. I used the map.php thing, and the only imagemap.class.php I ever saw was the one in the code.


It's the name of that second file in the ZIP that you had to download. You must upload that file to your host as well for this to work properly.


That's probably where I screwed up. I didn't upload both the origional files. Let me try that and then see what happens.

Illiana_Galean


Illiana_Galean

PostPosted: Wed Nov 10, 2004 12:33 pm


Heh. That's exactally what I did. Thanks for helping me with that. The most obvious things cause the most problems. lol.
PostPosted: Wed Nov 10, 2004 12:55 pm


Illiana_Galean
Heh. That's exactally what I did. Thanks for helping me with that. The most obvious things cause the most problems. lol.


^__^ Glad I could help out! I hope it's working for you now.

badloki
Captain


rhondalicious

PostPosted: Wed Nov 10, 2004 6:04 pm


Muahaha!!! I figured it out! My sig both randomizes and linketizes! Simply do the following:

Step 1:

Download the randomizing script from HotScripts.com

Step 2:

Unzip le script.

Step 3:

Change this line to the folder where your images are:

$path = './random-imgs/';


In my case, I put all my images in http://gaia.baka-neko.com/siggy/, so this line looks like $path = './siggy/';

Step 4:

put all your images in the folder you specified above. To make it work with the image map, just make sure that all the images are the exact same size, and the clickable areas are in the same place, and voila!

Look at my sig for an example:

PostPosted: Thu Nov 11, 2004 5:25 pm


I made a new one. But I'm not brave enough to try the random thing. Yet.....

Illiana_Galean


badloki
Captain

PostPosted: Thu Nov 11, 2004 6:30 pm


Your sig turned out great, Illi! And your's too dancing kitten! I have got to try that randomizer stuff. Looks REALLY cool.

Oh Illi, just to let you know, your sig is just a weeeee bit too big. I wanted to go ahead and tell you before some sig-hating Mod snapped it up. But it's STILL a REALLY awesome sig!! mrgreen
PostPosted: Fri Nov 12, 2004 1:18 am


Thanks for letting me know, a typo was also pointed out to me, so, I'm going to be doing a little reworking.

Illiana_Galean


Illiana_Galean

PostPosted: Fri Nov 12, 2004 11:19 am


All fixed and within the rules.
Reply
Archives

Goto Page: [] [<] 1 2 3 [>] [»|]
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum