friendsterTalk - Friendster Forum

friendsterTalk - Friendster Forum

Welcome guest! Please Login or Register.

#1  2008-08-21 01:32:38

bobcbar
» SuperFriendster
bobcbar's display avatar
Location: Texas USA
Registered: 2007-04-08
Posts: 9262
Last visit: Yesterday
Reputation: 250
Friendster

Creating Custom Image Button Link to Your Profile Control Panel Links

Some have ask how I added the image buttons to my profile. For that to work you must use a js file.

You can create any size image you want using ur favorite editor!

Preview at MY Profile!

The sample code I am using here has spaces of 6 buttons and locates the buttons on the bottom of the right side.

If you already have js codes, just insert the addbox code as shown, below ur on handler, do not copy the entire code.

If you only use css right now you should inject your external css code into the js file as shown in the first part of the code below .

Here is how to create the js file.

Just copy this code to your notepad and edit accordingly.

Go to ripway.com and create an account, and then Create A Subfoler called myjs.

Go to ur myjs folder and Create A Text File name it myscripts.js LEAVE IT BLANK.

Open the empty file myscripts.js then copy and paste the code from your notepad to the empty file and save.

You can post the url to ur js file using the current js linker code. Check the underground thread for the latest.


//CSS Injector
var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";
css.href = "CSS_LINK_HERE";
css.media = "screen, print";
document.getElementsByTagName("head")[0].appendChild(css);


//onload handler
function onProfileLoad() {
//insert generated boxes here

var links="<center><a href='LINK HERE' target='_blank'><img src='LINK OF IMAGE HERE'></a></center> <center><a href='LINK HERE' target='_blank'><img src='LINK OF IMAGE HERE'></a></center> <center><a href='LINK HERE' target='_blank'><img src='LINK OF IMAGE HERE'></a></center>  <center><a href='LINK HERE' target='_blank'><img src='LINK OF IMAGE HERE'></a></center>  <center><a href='LINK HERE' target='_blank'><img src='LINK OF IMAGE HERE'></a></center> <center><a href='LINK HERE' target='_blank'><img src='LINK OF IMAGE HERE'></a></center>";
addBox("RIGHT","*-mY lInKs :-*",links,"button",null);

}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};

function addBox(head,code,id,siblingafter) {
/*
head:
    html string title
    null - no header bar
code:
    html string content
id:
    unique string css pointer
siblingafter:
    regexp classname
    'left' - mainbar column end
    'right' - sidebar column end
*/
    try {
        var li=document.createElement("li");
    } catch(e) {
        var li=document.createElement("<li>");
    }
    if(!head) head="";
    else head="<h2>"+head+"</h2>";
    li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
                    head+
                    "<div id=\"content_"+id+"\">"+
                        code+
                    "</div>"+
                    "</div>";
       
    if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
    else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
    else {
        var si=getElementsByClass(siblingafter,null,"DIV")[0];
        si.parentNode.parentNode.insertBefore(li,si.parentNode);
    }
}

function getElementsByClass(searchClass,node,tag) {
    var classElements = new Array();
     if ( node == null )
         node = document;
     if ( tag == null )
         tag = '*';
     var els = node.getElementsByTagName(tag);
     var elsLen = els.length;
     var pattern = new RegExp(searchClass);
     for (i = 0, j = 0; i < elsLen; i++) {
         if ( pattern.test(els[i].className) ) {
             classElements[j] = els[i];
             j++;
         }
     }
     return classElements;
}

Here is an example of the completed code for the boxes, these are used on my spidy profile.

//Links
var links="<left><a href='http://www.friendster.com/publiccomments.php?uid=30031645' target='_blank'><img src='http://h1.ripway.com/bobcbar/images/spidycomments.gif'></a></left><br><br><br> <left><a href='http://www.friendster.com/sendmessage.php?uid=30031645' target='_blank'><img src='http://h1.ripway.com/bobcbar/images/spidymessage.gif'></a></left><br><br><br> <left><a href='http://www.friendster.com/friends/30031645' target='_blank'><img src='http://h1.ripway.com/bobcbar/images/spidyfriends.gif'></a></left><br><br><br><left><a href='http://bobcbar.123Guestbook.com/' target='_blank'><img src='http://h1.ripway.com/bobcbar/images/spidyguest.gif'</a><br><br><br></left>";
addBox("LEFT","*-mY lInKs :-*",links,"button","10");

Edit the bold with your friendster userid..numbers only not custom code like bobcbar.

CREDITS:  Ephemeral for codes to create the link
                 Marifallster for addbox function codes

Last edited by bobcbar (2008-08-21 01:33:32)


#2  2008-08-21 02:18:45

mhedge
» FriendsterElite
mhedge's display avatar
LOL ..
Friendstertalk University
Location: location.href
Registered: 2008-03-03
Posts: 4264
Reputation: 187
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

wow this is cool sir!
thnxx i will use it.. =)

#3  2008-08-21 02:32:52

suddendeath
» FriendsterFreak
suddendeath's display avatar
Just Do It
.White Protector.
Location: Malaysia
Registered: 2007-12-15
Posts: 1661
Reputation: 45

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

nice tick...
thx 4 sharing sir...
gonna try this one.....


#4  2008-08-21 02:47:44

bobcbar
» SuperFriendster
bobcbar's display avatar
Location: Texas USA
Registered: 2007-04-08
Posts: 9262
Last visit: Yesterday
Reputation: 250
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

mhedge & suddendeath

Thank you for ur nice comments..I did forget to mention others use it and hide their control panel buttons =)


#5  2008-08-21 03:28:52

woundedheartxc
» FriendsterNewbie
woundedheartxc's display avatar
Registered: 2008-07-31
Posts: 4
Last visit: Yesterday
Reputation: ~

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

whoa.
that was a very nice profile.
imma try this on my profile.
hope it will work.

#6  2008-08-21 04:51:23

cklahrckiey
» FriendsterFreak
cklahrckiey's display avatar
Tha Mafia
Class-S
Location: Lea's Heart
Registered: 2007-11-21
Posts: 1715
Reputation: 34

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

wow bob...now you're tweaking :D
nice codes bob :D :thumbsup:




"You hit me, we hit you!"

#7  2008-08-21 05:03:10

BwizetT
» FriendsterGeek
BwizetT's display avatar
**We*Are*SoliD**
Rockstars
Location: Basta my Allergy
Registered: 2007-09-19
Posts: 1090
Reputation: 49

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

Very Impressive Bob Your Going places LOL, Thanx for the new Discovery... :eh:

#8  2008-08-21 07:48:50

shatteredsilence
» FriendsterNewbie
shatteredsilence's display avatar
rawr...
Emo is Love
Location: Philippines
Registered: 2008-05-14
Posts: 17
Last visit: 2008-09-26
Reputation: ~
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

nice:) thanks for sharing

#9  2008-08-21 08:02:31

joyCe2kr1
» FriendsterNewbie
Registered: 2008-08-21
Posts: 1
Last visit: 2008-08-22
Reputation: ~

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

hi.. thank you for sharing.. My I know where I paste this code..

hehehe..:lol: This is my first time..

Thank you..

#10  2008-08-21 08:38:27

gresikfriendster
» FriendsterTalker
gresikfriendster's display avatar
gresik group
System Of a Down
Location: gresik,jawatimur
Registered: 2008-08-20
Posts: 141
Last visit: 2008-10-22
Reputation: 3
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

wow....
cool your treed .......
thanks for sharing.....

nice to meet you... :thumbsup:

#11  2008-08-21 11:10:44

bobcbar
» SuperFriendster
bobcbar's display avatar
Location: Texas USA
Registered: 2007-04-08
Posts: 9262
Last visit: Yesterday
Reputation: 250
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

Thanks for the great comments, the codes are not mine only how I applied them :D


#12  2008-08-21 11:14:30

Lordheinz
» Banned
^ trashed
Registered: 2007-06-26
Posts: 5178
Last visit: 2008-09-11
Reputation: 242

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

:arrow: A big help for tweaking bob..nice profile as well...

@ot..i like to catch crawling spider..:D


Thank you so much FRIENDSTERTALK...

#13  2008-08-21 11:27:34

bobcbar
» SuperFriendster
bobcbar's display avatar
Location: Texas USA
Registered: 2007-04-08
Posts: 9262
Last visit: Yesterday
Reputation: 250
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

Thanks lordheinz...:thumbsup:  if you catch that spider let me know :o


#14  2008-08-21 15:32:53

adepat
» FriendsterManiac
Praying is More Powerfull
Friendstertalk University
Location: California, U.S.A
Registered: 2007-03-02
Posts: 760
Last visit: 2008-11-14
Reputation: 6
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

wow my friend, you have a good job tweaking.
Thanks for sharing your tricks...=)

#15  2008-08-22 11:17:52

bobcbar
» SuperFriendster
bobcbar's display avatar
Location: Texas USA
Registered: 2007-04-08
Posts: 9262
Last visit: Yesterday
Reputation: 250
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

Thanks my friend :D hard for me to type right now I broke my right arm yesterday :wallbash:

Last edited by bobcbar (2008-08-22 11:18:23)


#16  2008-08-23 08:49:09

slashedkite
» FriendsterGeek
slashedkite's display avatar
Former LS member..
Friendstertalk University
Location: onloadhandler
Registered: 2007-01-23
Posts: 1077
Last visit: 2008-11-29
Reputation: 15
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

wow! i like the trick.. it's better if we use it in replacing controloanle buttons..hehe! :lol:



:ninja::ninja:

#17  2008-08-23 13:08:36

bobcbar
» SuperFriendster
bobcbar's display avatar
Location: Texas USA
Registered: 2007-04-08
Posts: 9262
Last visit: Yesterday
Reputation: 250
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

slashedkite wrote:

it's better if we use it in replacing controloanle buttons

yes that is true!  this was popular method before to replace control panel buttons :D


#18  2008-09-02 09:54:52

christian86
» FriendsterNewbie
Registered: 2008-05-10
Posts: 1
Last visit: 2008-11-28
Reputation: ~

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

wow bob nice profile huh!!!!
can i ask?
how to put the visitors list in my profile?

#19  2008-09-02 12:01:05

javilisnemoya2007
» FriendsterTalker
javilisnemoya2007's display avatar
Those were the days :))
Artwork 101
Location: in ur heart
Registered: 2007-10-07
Posts: 106
Last visit: Today
Reputation: ~
Friendster

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

at last you've shared it ...i will try it on my test page.... you didn't include  how to make the image buttons...you should have included a  live preview....not on your profile cuz newbies like me don't understand or don't know where the 'custom button links' are ...just suggesting my friend :D ...thanks for sharing....:thumbsup:


observant meticulous and keen but most of all patient

#20  2008-09-02 12:31:45

mabuhay
» FriendsterFreak
mabuhay's display avatar
KKB YOUTH SUMMIT 08
Friendstertalk University
Location: Laguna
Registered: 2008-03-11
Posts: 1807
Reputation: 79

Re: Creating Custom Image Button Link to Your Profile Control Panel Links

thanks 4 sharing da codes sir bob...
remarks: :thumbsup::thumbsup::thumbsup:
+ reps

nice spider layouts :D


Search Friendstertalk

Board footer

FriendsterTalk is not affiliated with Friendster.com
Copyright © 2002–2008 PunBB

[ 28 queries - 0.566 second ]

Pay Per Click Ads by pay per click advertising by Kontera

FriendsterTalk.com x

Welcome to FriendsterTalk! You'll need to login in order to fully use all the features and view all the sections of this site.

Please register if you're not yet a member. =)