adding the profile link ...
4 posters
Page 1 of 1
adding the profile link ...
I try to add the profile link to the new Avatar system, this code doesn't work, why, any ideas?
$('.tcr').each(function() {
var src = document.querySelectorAll('.tcr strong a');
var a = $("<a/>").attr("href", src);
$(".lastpost-avatar img").wrap(a);
});
$('.tcr').each(function() {
var src = document.querySelectorAll('.tcr strong a');
var a = $("<a/>").attr("href", src);
$(".lastpost-avatar img").wrap(a);
});
Ahmed.K- Forumember
- Posts : 349
Reputation : 4
Language : English
Re: adding the profile link ...
Are you trying to make the avatars clickable to load the profiles?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: adding the profile link ...
Try:
- Code:
$('.tcr').each(function() {
var src = document.querySelectorAll('strong a', this);
$(".lastpost-avatar img", this).wrap('<a href="'+ src +'" />');
});
Re: adding the profile link ...
Yes.SLGray wrote:Are you trying to make the avatars clickable to load the profiles?
InFeRn0 wrote:Try:
- Code:
$('.tcr').each(function() {
var src = document.querySelectorAll('strong a', this);
$(".lastpost-avatar img", this).wrap('<a href="'+ src +'" />');
});
Doesn't work.
Ahmed.K- Forumember
- Posts : 349
Reputation : 4
Language : English
Re: adding the profile link ...
Still no ideas?
Ahmed.K- Forumember
- Posts : 349
Reputation : 4
Language : English
Re: adding the profile link ...
Hello Ahmed.K,
Here is a quick example I've written up :
Modules > Javascript codes management > create a new script
Title : your choice
Placement : in all the pages
Paste one of the codes below and submit :
For version PHPBB3 :
For version PUNBB :
Here is a quick example I've written up :
Modules > Javascript codes management > create a new script
Title : your choice
Placement : in all the pages
Paste one of the codes below and submit :
For version PHPBB3 :
- Code:
$(document).ready(function(){$('.row .lastpost').each(function(){$(this).find('.lastpost-avatar img').wrap('<a href="'+$(this).find('span strong a').attr('href')+'">')})});
For version PUNBB :
- Code:
$(document).ready(function(){$('tr td.tcr').each(function(){$(this).find('.lastpost-avatar img').wrap('<a href="'+$(this).find('span strong a').attr('href')+'">')})});
Re: adding the profile link ...
Hi Ange,
There is a technical problem...
I use this code for auto refresh the forum index:
So, the avatar profile-link code works just one time, and then doest work.
Is there any solution to this problem?
There is a technical problem...
I use this code for auto refresh the forum index:
- Code:
<script>
jQuery(document).ready(function() {
var refreshId = setInterval(function()
{
jQuery('#forum_index').load('/ #forum_index');
}, 20000);
jQuery.ajaxSetup({ cache: false });
});
</script>
So, the avatar profile-link code works just one time, and then doest work.
Is there any solution to this problem?
Ahmed.K- Forumember
- Posts : 349
Reputation : 4
Language : English
Similar topics
» Adding a Link to Custom Profile Field
» Link to edit own profile from mini profile
» Profile option to link to a profile on another website
» How to link the members' profile instead of the profile CP?
» Adding a new link on Nav Bar?
» Link to edit own profile from mini profile
» Profile option to link to a profile on another website
» How to link the members' profile instead of the profile CP?
» Adding a new link on Nav Bar?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum