california
![[image] [image]](http://iycatacombs.com/socal/neon/images/ranks/admin.gif) I'm not here... member is offline
![[avatar] [avatar]](http://img241.echo.cx/img241/6917/california7bk.gif)
Joined: Nov 2004 Gender: Male  Posts: 6,425
|  | Add Link to Full Profile Page « Thread Started on Feb 13, 2006, 3:46am » | |
This code allows you to add in another link to the bar that has:
Member's Bio - Modify Profile - Bookmarks
or perhaps
Member's Bio - Modify Profile - Ban Member - Send Private Message
on the view profile page, depending on who's profile it is and who's viewing it. It provides two modes: one for adding a link that appears for everyone in everyone's profile, and one that only appears if the user is viewing their own profile.
Code: <script type="text/javascript"> <!-- /* add link to profile next to "Member's Bio etc." by california */
var mode = 1; // see instructions var linkURL = "URL OF NEW LINK"; var linkText = "TEXT FOR NEW LINK";
var iBold = document.getElementsByTagName("b"); var rePatterns = [/=viewprofile/, new RegExp("=viewprofile(&user="+pb_username+")?$", "")]; if(location.href.match(rePatterns[mode-1])){ for(b=0; b<iBold.length; b++){ if(iBold[b].nextSibling && iBold[b].nextSibling.nodeName == "HR" && iBold[b].innerHTML.match(/member's bio/i)){ var newLink = document.createElement("a"); newLink.href = linkURL; newLink.appendChild(document.createTextNode(linkText)); iBold[b].appendChild(document.createTextNode(" - ")); iBold[b].appendChild(newLink); break; } } }
// --> </script> |
|
Main Footer
mode 1 = the link always appears in everyone's profile no matter who's viewing mode 2 = the link only appears if the user is viewing their own profile
What you actually use this for is up to you. You could add in a "Check PMs" link there, or a "Manage Bookmarks" link, or maybe it can link to an external site that's of some significance or maybe it can be used in combination with some other code.
|
|
|
Stinky666
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/elite_member.gif) member is offline
![[avatar] [avatar]](http://wimg.co.uk/Z7E8G5.png)
![[aim] [aim]](http://www.sz-ex.com/socal/neon/images/icons/aim.gif)
![[homepage] [homepage]](http://www.sz-ex.com/socal/neon/images/icons/www_sm.gif) Joined: Jan 2006 Gender: Male  Posts: 2,107 Location: England
| |
|~.::Omen::.~|
![[image] [image]](http://www.iycatacombs.com/socal/neon/images/ranks/new_member.gif) member is offline
Joined: Nov 2006 Posts: 10
|  | Re: Add Link to Full Profile Page « Reply #2 on Feb 15, 2007, 6:41am » | |
AwEs0mE..........totally used it. Great code
| |
|