Alternating Category "theads"
#1
Hey!

I was wondering if it would be possible to create an alternating thead. Like right now there is {$altbg} for trow1 and trow2. Can someone make or tell me how to make a {$altcat} or something so I can have different colored categories as they alternate? Does anyone know what I mean? Here's sorta what I mean:


Attached Files Thumbnail(s)
   
[Image: premium_mybb_themes-500x100.png]
Reply
#2
Now that's a top rate idea! I sure wish I knew how to do it.
~ FFW

FYI: I'm not a sir, dude, or guy. I am a 'miss'. Rolleyes
Reply
#3
Can you try this ? =P

HowTo:

Open /inc/functions.php

Add New Function
function alt_cat($reset=0)
{
	global $altcat;
	if($altcat == "cat1" && !$reset)
	{
		$cat = "cat2";
	}
	else
	{
		$cat = "cat1";
	}
	$altcat = $cat;
	return $cat;
}

Open ./inc/functions_forumlist.php

Find
	$forumcat = "_cat";

Add Below
			$catcolor = alt_cat();

Open Forum Bit Templates - forumbit_depth1_cat

Find
<td class="thead" colspan="5">

Change into
<td class="{$catcolor}" colspan="5">


Then add Additional CSS

Ex. [ Note ; Use cat1 and cat2 as classes ! ]
.cat1{
	background: #E4C57C;
}
.cat2{
	background: #918361;
}

Should result in something like this [ http://thingiej.be/mybb/ ], don't mind the colors , just filled in some random things ^^
Reply
#4
Great work Lex- , thanks !
Reply
#5
Thanks LeX-, I'll try this out on localhost. Big Grin
~ FFW

FYI: I'm not a sir, dude, or guy. I am a 'miss'. Rolleyes
Reply
#6
Amazing! Thanks a lot! Im gonna work on this a bit more, and stuff, and perhaps release a theme using this, credit to you for knowing how to do this XD.
[Image: premium_mybb_themes-500x100.png]
Reply
#7
Very nice but I doubt alot of people will use the themes made like this as it contains file changes. Many people just don't read the readme and just install it

Ill try it out though Toungue
[Image: jag100sigaf5.jpg]
[Image: poptartFINALTINY.gif]
Reply
#8
*rcpalace bookmarks thread
Reply
#9
buh =D Thought i had it as a full plugin, yet you need to add $catcolor as a global in the build_forumbits function =P Just that lil' word makes the differents ! =P
Reply
#10
Cool LeX- i am going to try this out soon but for now i got to bookmark this.
COOLIES
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)