Make headers only for certain users.
Page 1 of 1
Make headers only for certain users.
I'm currently using this code which adds a header on the post profile.
http://prntscr.com/9owj1i
Forum version: PunBB
I'd like to make it for a certain user ID. Any help?
- Code:
.topic-author {
background: #fff;
float: none;
width: auto;
text-align: left;
position: relative;
padding: 10px;
background: url("http://i.imgur.com/H1KP8Z0.png");
}
http://prntscr.com/9owj1i
Forum version: PunBB
I'd like to make it for a certain user ID. Any help?
Guest- Guest
Re: Make headers only for certain users.
You can try this code:
On top you need to insert al the userid's of who need to have that background, then script will add the class special to the element with the class topic-author. So you need to set your css to
.
- Code:
$(function() {
var userlist = ["u1","u2"]; // all the user id's that need the special background
$('.post').each(function() {
var userID = $(this).find('h4.username a:first').attr('href').substr(1);
if (jQuery.inArray(userID, userlist) !== -1) {
$(this).find('.topic-author').addClass('special');
}
});
});
On top you need to insert al the userid's of who need to have that background, then script will add the class special to the element with the class topic-author. So you need to set your css to
|
10spetter10- Forumember
- Posts : 195
Reputation : 82
Language : Dutch
Similar topics
» how can i make headers for my forum?
» How to make More main headers
» make the headers of my forum have a line under
» Can You Make Sub Headers Like Quick Links?
» Can I make thumbnails to put beside inside thread headers?
» How to make More main headers
» make the headers of my forum have a line under
» Can You Make Sub Headers Like Quick Links?
» Can I make thumbnails to put beside inside thread headers?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum