MyBB Community Forums

Full Version: Custom Style for Linked Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you haven't seen my other tutorial, you can learn how to change the indicator icon on a linked forum to show that it is linked to an external site. Check that one out here.

Now, I'm going to show you how to add a custom class to linked forums, just in case you wanted to give them a specific styling to emphasize even more the fact that they are linked to an external site.

WARNING: This requires core file edits. If you don't feel comfortable doing that, you shouldn't continue reading.

So like last time, you are going to open inc/functions_forumlist.php. This time, find these lines.
			// Swap over the alternate backgrounds
			$bgcolor = alt_trow();

Replace those with this.
			// Swap over the alternate backgrounds
			// If forum is linked, cancel class alternating
			if($forum['linkto']!='')
			{
				$bgcolor = 'trowlink';
			}
			else
			{
				$bgcolor = alt_trow();
			}

Done. Now just add this class definition to your CSS and style it as you may.
.trowlink {
	background: #ffe;
}

Have fun. Do what you may with this Smile