Welcome to Gaia! ::


Dapper Dabbler

User Image - Blocked by "Display Image" Settings. Click to show.
            Alright, so I designed & coded this profile for someone, and as you can hear if your volume is turned up - the test song I have on the account works. However, myself and the person the profile is for are having zero luck with getting this song to work. Any help would be super appreciated!

Fashionable Fatcat

they go
User Image - Blocked by "Display Image" Settings. Click to show.
            Alright, so I designed & coded this profile for someone, and as you can hear if your volume is turned up - the test song I have on the account works. However, myself and the person the profile is for are having zero luck with getting this song to work. Any help would be super appreciated!


There's a couple things that could be wrong here.
Firstly, the URL you are trying to use is from an https server and has Youtube's tag that it adds when you've reached a video from an embedded player: https://www.youtube.com/watch?feature=player_embedded&v=S3ldw5utoNw . I'm not entirely sure that those make a difference, but it could help to remove that so you're left with just the plain URL, http://www.youtube.com/watch?v=S3ldw5utoNw

Secondly, there's a good chance that it's because of Youtube's new video player, which sometimes comes up with the random error of "The video player is too small". Resizing the player never seems to help, but what does help is to convert the player back into the older version. This also solves the problem of the play button not looking like a button, since that was also changed in the new player.

To do that, take that original YouTube URL that looks something like this:
http://www.youtube.com/watch?v=VIDEO_ID
for example:
www.youtube.com/watch?v=g0XpNvLWimo


And change it to look like this (the red is the part that you change):
http://youtube.googleapis.com/v/VIDEO_ID&version=2
for example:
http://youtube.googleapis.com/v/g0XpNvLWimo&version=2


As always, you can also make it autoplay by adding &autoplay=1 to the end of the whole thing
for example:
http://youtube.googleapis.com/v/g0XpNvLWimo&version=2&autoplay=1


Since you do seem to make profiles for people quite often, if you put in a Youtube button for them, I would definitely suggest you tell them to change the video into the older player (using those instructions there), so that the button will actually work like a button.

Dapper Dabbler

kittymmeow



User Image - Blocked by "Display Image" Settings. Click to show.
            You are amazing! I can't thank you enough <3

Fashionable Fatcat

they go
kittymmeow



User Image - Blocked by "Display Image" Settings. Click to show.
            You are amazing! I can't thank you enough <3


You're quite welcome!

And, if I may ask, how in the world do you get an imagemap (like the one in your sig) to work?! I tried for so long until I eventually gave up and resorted to cropping my image into a bunch of smaller ones and linking each one XD All the guides here on Gaia are years old and their advice doesn't seem to work anymore, and I don't know PHP at all to be able to figure it out myself x___x

Dapper Dabbler

kittymmeow



User Image - Blocked by "Display Image" Settings. Click to show.

            I use a PHP method, hosting on my own web space.

            This is the code I use to add the links. Even if the link is in a circle, I'll just do the rect method because its so much easier. The code is for my current sig, so you can see it happening. The part in red is where you put your default link, such as your profile. Then you have the other links. Coloured green is the co-ordinates so the map can locate where the links go.

            I use paint to get the co-ordinates, and because its such a habit now I couldn't tell which is x and which is y for the life of me. But, say you are using paint to get the co-ordinations, it would go like this

            1xoxo2
            4xoxo3

            And down the bottom of paint where it shows the co-ordinates (eg 13(#1),45(#2)) you would use the first number for #1, the second number for #2, the first number for #3, and the second number for #4

            Probably doesn't make sense >< sorry.

            And this file would be saved as a php file too, but whatever name you like.

            <?PHP
            /* Gaia Image Map Go-er
            Rudolph J Heuser (Jakobo on GaiaOnline.com
            Modified: John T Wu (borobdin on GaiaOnline.com)
            */

            require_once("imagemap.php" wink ;

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

            // define regions
            $area = new Rect(59,110,135,236,"http://www.gaiaonline.com/forum/personalized-graphics/t.82632375_1/" wink ;
            $myImageMap->addToMap($area);
            $area = new Rect(160,110,233,236,"http://www.gaiaonline.com/forum/personalized-graphics/t.83163927/" wink ;
            $myImageMap->addToMap($area);
            $area = new Rect(258,110,337,236,"http://www.gaiaonline.com/forum/pricing-and-suggestions/t.83275443" wink ;
            $myImageMap->addToMap($area);
            $area = new Rect(357,110,437,236,"http://www.gaiaonline.com/forum/pricing-and-suggestions/t.82952495/" wink ;
            $myImageMap->addToMap($area);


            $myImageMap->setDefaultURL("www.gaiaonline.com/profiles/they-go/34975433/" wink ;

            // 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);

            ?>


            You also need to have this code saved in the sample place as your image map. I have it once in an image map folder, and all my imaps just go in there. It should be saved as imagemap.php

            <?PHP
            // Gaia Sig Mapper
            // Regions are Defined By Rect Normally
            // Jakobo @ Gaia Online

            // Class Definition
            // This is responsible for the definition of coordinates
            class imageMap {
            var $locale,
            $defaultURL,
            $size;

            function imageMap() {
            // makes locale ready for data
            $this->locale = array();
            $this->size = 0;
            }

            function setDefaultURL($inUrl) {
            $this->defaultURL = $inUrl;
            }

            function addToMap($Region) {
            $this->locale[$this->size] = $Region;
            $this->size++;
            }

            function testMap($inX, $inY) {
            foreach($this->locale as $Region) {
            $Region->goIfInside($inX, $inY);
            }
            // we didn't go anywhere, load the default
            header("Location: " . $this->defaultURL);
            }
            }

            class Region {
            var $type, // type of region
            $url; // url of region

            function Region() {
            // empty constructor
            }
            }

            class Rect extends Region {
            var $x1,
            $y1,
            $x2,
            $y2;

            function Rect($inX1, $inY1, $inX2, $inY2, $inUrl) {
            $this->x1 = $inX1;
            $this->y1 = $inY1;
            $this->x2 = $inX2;
            $this->y2 = $inY2;
            $this->url = $inUrl;
            $this->type = "rect";
            }

            function isInside($clickedX = -1, $clickedY = -1) {
            // if X and Y are not set, -1 is used
            // placing it outside of the image map
            if(($clickedX >= $this->x1 && $clickedX <= $this->x2) && ($clickedY >= $this->y1 && $clickedY <= $this->y2) ) {
            return true;
            } else {
            return false;
            }
            }

            function goIfInside($clickedX = -1, $clickedY = -1) {
            // goes to object's URL if inside
            if($this->isInside($clickedX, $clickedY)) {
            header("Location: " . $this->url);
            exit;
            }
            }
            }

            ?>

Fashionable Fatcat

they go
kittymmeow



User Image - Blocked by "Display Image" Settings. Click to show.

            I use a PHP method, hosting on my own web space.

            This is the code I use to add the links. Even if the link is in a circle, I'll just do the rect method because its so much easier. The code is for my current sig, so you can see it happening. The part in red is where you put your default link, such as your profile. Then you have the other links. Coloured green is the co-ordinates so the map can locate where the links go.

            I use paint to get the co-ordinates, and because its such a habit now I couldn't tell which is x and which is y for the life of me. But, say you are using paint to get the co-ordinations, it would go like this

            1xoxo2
            4xoxo3

            And down the bottom of paint where it shows the co-ordinates (eg 13(#1),45(#2)) you would use the first number for #1, the second number for #2, the first number for #3, and the second number for #4

            Probably doesn't make sense >< sorry.

            And this file would be saved as a php file too, but whatever name you like.

            &?PHP
            /* Gaia Image Map Go-er
            Rudolph J Heuser (Jakobo on GaiaOnline.com
            Modified: John T Wu (borobdin on GaiaOnline.com)
            */

            require_once("imagemap.php" wink ;

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

            // define regions
            $area = new Rect(59,110,135,236,"http://www.gaiaonline.com/forum/personalized-graphics/t.82632375_1/" wink ;
            $myImageMap->addToMap($area);
            $area = new Rect(160,110,233,236,"http://www.gaiaonline.com/forum/personalized-graphics/t.83163927/" wink ;
            $myImageMap->addToMap($area);
            $area = new Rect(258,110,337,236,"http://www.gaiaonline.com/forum/pricing-and-suggestions/t.83275443" wink ;
            $myImageMap->addToMap($area);
            $area = new Rect(357,110,437,236,"http://www.gaiaonline.com/forum/pricing-and-suggestions/t.82952495/" wink ;
            $myImageMap->addToMap($area);


            $myImageMap->setDefaultURL("www.gaiaonline.com/profiles/they-go/34975433/" wink ;

            // 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);

            ?&


            You also need to have this code saved in the sample place as your image map. I have it once in an image map folder, and all my imaps just go in there. It should be saved as imagemap.php

            &?PHP
            // Gaia Sig Mapper
            // Regions are Defined By Rect Normally
            // Jakobo @ Gaia Online

            // Class Definition
            // This is responsible for the definition of coordinates
            class imageMap {
            var $locale,
            $defaultURL,
            $size;

            function imageMap() {
            // makes locale ready for data
            $this->locale = array();
            $this->size = 0;
            }

            function setDefaultURL($inUrl) {
            $this->defaultURL = $inUrl;
            }

            function addToMap($Region) {
            $this->locale[$this->size] = $Region;
            $this->size++;
            }

            function testMap($inX, $inY) {
            foreach($this->locale as $Region) {
            $Region->goIfInside($inX, $inY);
            }
            // we didn't go anywhere, load the default
            header("Location: " . $this->defaultURL);
            }
            }

            class Region {
            var $type, // type of region
            $url; // url of region

            function Region() {
            // empty constructor
            }
            }

            class Rect extends Region {
            var $x1,
            $y1,
            $x2,
            $y2;

            function Rect($inX1, $inY1, $inX2, $inY2, $inUrl) {
            $this->x1 = $inX1;
            $this->y1 = $inY1;
            $this->x2 = $inX2;
            $this->y2 = $inY2;
            $this->url = $inUrl;
            $this->type = "rect";
            }

            function isInside($clickedX = -1, $clickedY = -1) {
            // if X and Y are not set, -1 is used
            // placing it outside of the image map
            if(($clickedX >= $this->x1 && $clickedX <= $this->x2) && ($clickedY >= $this->y1 && $clickedY <= $this->y2) ) {
            return true;
            } else {
            return false;
            }
            }

            function goIfInside($clickedX = -1, $clickedY = -1) {
            // goes to object's URL if inside
            if($this->isInside($clickedX, $clickedY)) {
            header("Location: " . $this->url);
            exit;
            }
            }
            }

            ?&


Oh my god, thank you so much blaugh heart
I understand what the coordinates thing means, because the guides explained that pretty well, just something in the code that I kept finding just wouldn't work and kept coming up with errors and I wasn't familiar enough with PHP to fix them.

But anyway
Thank youuuuu heart

Dapper Dabbler

kittymmeow



User Image - Blocked by "Display Image" Settings. Click to show.

            you're welcome. next time you do one, if you have any issues just pm me and i'll see if i can help :]

Obsessive Admirer

kittymmeow
I have a question since this is a thread I've been meaning to look for.
Do you by any chance know how to start your youtube song at a specific time?
&t=m0s0 doesn't work anymore.
If you could help it's be great. c:

Fashionable Fatcat

they go
kittymmeow



User Image - Blocked by "Display Image" Settings. Click to show.

            you're welcome. next time you do one, if you have any issues just pm me and i'll see if i can help :]

Okay ^^
(or PM, quote, close enough *having a problem*)
I pretty much got it to work except.. No matter where you click, it leads to the default link ._.
What I have (and the finished product is in my sig):


<?PHP
/* Gaia Image Map Go-er
Rudolph J Heuser (Jakobo on GaiaOnline.com
Modified: John T Wu (borobdin on GaiaOnline.com)
*/

require_once("imagemap.php")

// new imageMap
$myImageMap = new imageMap()

// define regions
$area = new Rect(25,355,75,406,"http://eunhaesaranghae.tumblr.com/")
$myImageMap->addToMap($area)
$area = new Rect(90,355,145,406,"https://twitter.com/HiMyNameIsEma")
$myImageMap->addToMap($area)
$area = new Rect(160,355,215,406,"http://www.gaiaonline.com/forum/test-forum/t.82650973/")
$myImageMap->addToMap($area)
$area = new Rect(230,355,285,406,"http://www.gaiaonline.com/forum/list/170/")
$myImageMap->addToMap($area)
$area = new Rect(300,355,355,406,"http://www.gaiaonline.com/guilds-home/magami/g.394983/")
$myImageMap->addToMap($area)
$area = new Rect(370,355,410,406,"http://www.gaiaonline.com/guilds-home/dance-the-asian-way/g.4035/")
$myImageMap->addToMap($area)


$myImageMap->setDefaultURL("http://www.youtube.com/watch?v=7PMRe4k3OSw")

// 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)

?>

Fashionable Fatcat

CrackaLove
kittymmeow
I have a question since this is a thread I've been meaning to look for.
Do you by any chance know how to start your youtube song at a specific time?
&t=m0s0 doesn't work anymore.
If you could help it's be great. c:

It's &start=NUMBER_OF_SECONDS

Obviously change NUMBER_OF_SECONDS to, well, the number of seconds from the beginning of the video where you want it to start. If it's several minutes in, you will have to convert from minutes to seconds. You dont use any units either, so it's just an integer (e.g. &start=102 for 1m 42s in).

You do have to use the Google APIs player to make this work (which I explained in my first post here. Just follow the same instructions and then add the &start tag to the end), since Gaia strips out tags from normal Youtube URLs.

EDIT: Hold on. Let me test it just in case ._.
RE-EDIT: Yep, it works. I thought I might've done it wrong at first but nope, I got it right razz

Obsessive Admirer

kittymmeow
CrackaLove
kittymmeow
I have a question since this is a thread I've been meaning to look for.
Do you by any chance know how to start your youtube song at a specific time?
&t=m0s0 doesn't work anymore.
If you could help it's be great. c:

It's &start=NUMBER_OF_SECONDS

Obviously change NUMBER_OF_SECONDS to, well, the number of seconds from the beginning of the video where you want it to start. If it's several minutes in, you will have to convert from minutes to seconds. You dont use any units either, so it's just an integer (e.g. &start=102 for 1m 42s in).

You do have to use the Google APIs player to make this work (which I explained in my first post here. Just follow the same instructions and then add the &start tag to the end), since Gaia strips out tags from normal Youtube URLs.
emotion_kirakira
Thank you so much I was pulling my hair out over here.

Dapper Dabbler

User Image - Blocked by "Display Image" Settings. Click to show.

            In the official files, are all the &? etc all &?PHP ? I'm not sure if that would affect it, but just in case, I can send through the original files to an email or something?

            /cant see anything wrong with the code
            and where are you uploading the files? and how have you put it into the sig? (code pleasexD )

Fashionable Fatcat

they go
User Image - Blocked by "Display Image" Settings. Click to show.

            In the official files, are all the &? etc all &?PHP ? I'm not sure if that would affect it, but just in case, I can send through the original files to an email or something?

            /cant see anything wrong with the code
            and where are you uploading the files? and how have you put it into the sig? (code pleasexD )

Are they supposed to be a carrot bracket (greater-than/less-than), then a question mark, and then PHP? Because Gaia likes to remove some characters from posts and that makes it a bit difficult to explain stuff like this ><

I think I got the code right, I didn't change anything besides what I was supposed to change (unless I did by accident?..), so I dunno...

I uploaded them to a site via www.000webhost.com (mine is http://kittymmeow.comeze.com/) which I checked and does support PHP...

Actual BBCode from my sig:
[url=http://kittymmeow.comeze.com/Gaia/Sigmap/kris.php][imgmap]http://img703.imageshack.us/img703/7360/kris2.jpg[/imgmap][/url]

Quick Reply

Submit
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