Choose from our various pricing plans. There is a package for everyone!


Special background to special topics

View previous topic View next topic Go down

Tutorial Special background to special topics

Post by L! on Mon Jul 09, 2012 4:02 pm

In this tutorial I will show you how to add a special background to the special topics. When I said special I meant the topics like: Announcement, Global Announcement, Sticky, or topics with a icon like solved, or just a simple post icon (no new posts, new posts, topic locked...). The trick is a simple one, the codes I will gave now will just get the url of the image from topic list and will add to it's cells a special background. Note that you can add a background image, or just background color.

phpBB2:
Code:
$(function(){
$('#page-body .forumline td').has('img[src="LINK_TOPIC_ICON"]').addClass('l_specialtd');
$('#page-body .forumline tr:has(".l_specialtd")').addClass('l_specialtr');
$('#page-body .l_specialtr td').css('background-color','#42B328');
});

PunBB:
Code:
$(function(){
$('#page-body .main-content .table .statused tr td').has('img[src="LINK_TOPIC_ICON"]').addClass('l_specialtd');
$('#page-body .main-content .table .statused tr:has(".l_specialtd")').addClass('l_specialtr');
$('#page-body .l_specialtr td').css('background-color','#42B328');
});
Note: LINK_TOPIC_ICON should be the link of the image near the topic title (new post, no new post, topic locked...), like () or can be a solved icon etc...

Very Important: At the Placement field you need to choose only and only Subforums !!!

Click here for demo.


Last edited by Coddy on Tue Jul 10, 2012 11:06 am; edited 1 time in total
avatar
L!
Premium Member


Age : 19
Posts : 105
Join date : 2012-07-05
Reputation : 5

View user profile http://www.ldevelopment.org/

Back to top Go down

Tutorial Re: Special background to special topics

Post by Guest on Tue Jul 10, 2012 1:00 am

Thats really cool, Mind posting some Screenshots to show what it would look like?

Guest
Guest


Back to top Go down

Tutorial Re: Special background to special topics

Post by Cyborg112233 on Wed Jul 11, 2012 10:58 pm

Good tutorial, perhaps I'll use these codes in my new forum! Smile
avatar
Cyborg112233
Member
Member

Age : 19
Posts : 123
Join date : 2012-07-10
Reputation : 0

View user profile http://mario-world.forumieren.com/forum

Back to top Go down

Tutorial Re: Special background to special topics

Post by Th1nK on Sun Jul 15, 2012 9:01 pm

Your Tutorial has been accepted, congratulations!
avatar
Th1nK
Administrator
Administrator

Posts : 468
Join date : 2012-04-06
Reputation : 43

View user profile http://www.csshelp.net

Back to top Go down

Tutorial Re: Special background to special topics

Post by L! on Mon Jul 16, 2012 7:57 am

Glad that's useful! Very Happy


Want to make money online? PM Me! Wink

avatar
L!
Premium Member


Age : 19
Posts : 105
Join date : 2012-07-05
Reputation : 5

View user profile http://www.ldevelopment.org/

Back to top Go down

Tutorial Re: Special background to special topics

Post by Mati™ on Thu Jul 26, 2012 12:08 pm

Great tutorial! Really great stuff.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Special background to special topics

Post by Duke on Sat Jan 10, 2015 1:43 pm

screen shot? please post screen shot
avatar
Duke
Member
Member

Age : 27
Posts : 7
Join date : 2015-01-10
Forum Version : PunBB
Reputation : 2

View user profile

Back to top Go down

Tutorial Re: Special background to special topics

Post by Nick! on Wed Apr 01, 2015 5:02 am

Pretty sweet!

Nick!
Member
Member

Posts : 25
Join date : 2012-04-06
Reputation : 1

View user profile

Back to top Go down

Tutorial Re: Special background to special topics

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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