We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] replace the whole url to just 'link' in profile fields.
Topic Started: Aug 10 2012, 06:31 PM (513 Views)
2wise69
Member Avatar
Member
[ *  * ]
Board Address: likenaruto.com
Board Software: Zetaboard
Description: replace the whole url to just 'link' in profile fields Website
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Sorry, but "profile fields Website" doesn't make any sense to me, do you want URLs replaced with 'link' in profile fields or on webpages? Or, are you referring to the 'Homepage URL:' profile field?
Offline Profile Goto Top
 
2wise69
Member Avatar
Member
[ *  * ]
I'm referring to profile fields
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
$('dl.user_profile dd:contains(http://)').each(function () {
var url = $(this).text();
$(this).html('<a href="' + url + '">Link</a>');
});
</script>
Offline Profile Goto Top
 
2wise69
Member Avatar
Member
[ *  * ]
Awesome! It works perfectly! Is it possible to combine it with the first box instead of creating a new box in the profile field?
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I'm not sure what you mean, do you have an example?
Offline Profile Goto Top
 
2wise69
Member Avatar
Member
[ *  * ]
Put the link in the red box

Posted Image
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Do you want all custom profile fields to go in the red box, or just the ones with links?
Offline Profile Goto Top
 
2wise69
Member Avatar
Member
[ *  * ]
Just for the code you provided. The one with links.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
<script type="text/javascript">
$('td.c_user').each(function () {
var spacer = $(this).find('dl.user_info dd.spacer');
$(this).find('dl.user_profile dd:has(a)').prev('dt').andSelf().insertBefore(spacer);
});

$('dl.user_profile').hide();
$('dl.user_profile dd + dd.spacer').parent('dl.user_profile').show();
</script>
Put that below the code above.
Offline Profile Goto Top
 
2wise69
Member Avatar
Member
[ *  * ]
works like a charm. thank you so much!
Offline Profile Goto Top
 
Ardy
Member Avatar
.
[ *  *  *  *  * ]
Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic