Welcome to Creative Nation!

Welcome to Creative Nation, . Feel free to browse our forums and help yourself to all our free tutorials, images, and recources!

Download

To download this script go back to article »

Member Login

Lost your password?

Not a member yet? Sign Up!

Display users "Profile link"


The next generation of web design.


You are not connected. Please login or register

Display users "Profile link"

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Display users "Profile link" on 11/29/2011, 10:58 am

Gangstar15

avatar

Hello all, for some days ago i tried and tried to get the user profile link, that when you click it, it will go to your own profile..
I tried a code by dion/saxaca but didn't worked, so i made my own one.

So first of all you need to add the bbcode user link:
Code:
{ USERLINK }
without spacing Tongue

you can add it in the announcements, wrap it with a div or span and hide it with css like so:
Code:
<div class="user-link" style="display:none;">{ USERLINK }</div>

The next step is where you want to display the user link, again create an empty div and give it a class or id:
Code:
<div class="user-id"></div>

and the last step is the script, create a new javascript file and add this:
Code:
$(document).ready(function () {
var userid = $("div.user-link a").attr('href');
    $('div.user-id').html('<a href="' + userid + '">Your Profile</a>');
 });

So we are done, this code was made for Designdrops.

PS: remember to paste the { USERLINK } without spaces.

Not work, write here.

2 Re: Display users "Profile link" on 11/29/2011, 5:09 pm

virtuosity

avatar
Nice, I will have to give this a try soon Smile

3 Re: Display users "Profile link" on 12/12/2011, 8:24 pm

ArChKnIgHt

avatar

sure it must be cool cuz its from gangster Tongue




http://ultragamerz.forumotion.net/

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

.

Free forum | © PunBB | Free forum support | Contact | Report an abuse | Free forum.