Different styling on what's new for specific forum

Espen Espelund

Active member
We got a forum where around 50% of the posts are in a fitness journal forum. What would be the best way to style those threads differently on what's new (and possibly in the journal forum listing), like adding a css class? I'm guessing thread prefixes could be used when that comes around.

Thread
Thread
Journal
Thread
 
I would say that thread prefixes would be your best bet, once 1.1 is out. For now, perhaps preface each thread with the word in brackets, such as "[Journal] This is the rest of my thread title." That might be the best route to take for now.
 
Interesting idea. vaultwiki does this with vB and it works very well.
It becomes an even more intuitive idea when it applies to other types of items such as:
  • wiki items
  • images
  • article items
  • downloads
  • blog entries
 
Edit this template:

Admin CP -> Appearance -> Templates -> thread_list_item

Add the red code near the top. {$showForumLink} limits the styling to the what's new page:

Rich (BB code):
<xen:require css="discussion_list.css" />

<xen:if is="{$thread.isDeleted}"><xen:include template="thread_list_item_deleted" /><xen:else />

<li id="thread-{$thread.thread_id}" class="discussionListItem {$thread.discussion_state} {xen:if {$thread.sticky}, 'sticky'} {xen:if {$thread.isNew}, 'unread'} {xen:if {$showForumLink}, 'threadListNode{$thread.node_id}'}" data-author="{$thread.username}">

	<div class="listBlock posterAvatar">
		<span class="avatarContainer">
			<xen:avatar user="$thread" size="s" img="true" />
			<xen:if is="{$thread.user_post_count}"><xen:avatar user="$visitor" size="s" img="true" class="miniMe" title="{xen:phrase you_have_posted_x_messages_in_this_thread, 'count={xen:number $thread.user_post_count}'}" /></xen:if>
		</span>
	</div>

Then edit this template:

Admin CP -> Appearance -> Templates -> EXTRA.css

Add this code to define the styles for each forum. Specify the node_id in the class names:

Rich (BB code):
/* SET CUSTOM STYLE FOR DIFFERENT FORUMS IN WHAT'S NEW */
/* SPECIFY NODE_ID IN CLASS NAME */

.threadListNode2 .title a
{
	color: red;
}
.threadListNode5 .title a
{
	color: green;
}

The result:

Screen shot 2011-09-13 at 4.30.47 PM.webp
 
screen-shot-2011-09-13-at-4-30-47-pm-png.18692


besides changing the color of thread titles in what's new ?
What other styling things can be changed ?
 
Top Bottom