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:
you can add it in the announcements, wrap it with a div or span and hide it with css like so:
The next step is where you want to display the user link, again create an empty div and give it a class or id:
and the last step is the script, create a new javascript file and add this:
So we are done, this code was made for Designdrops.
PS: remember to paste the { USERLINK } without spaces.
Not work, write here.
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 }
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.