Simple Post Style Based On Usergroup
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Simple Post Style Based On Usergroup
This template and CSS edit will give us a simple post layout based on user usergroup.

In postbit/postbit_classic template, find tborder. Add tborder{$post['usergroup']} beside the original tborder class. Something like this:

HTML Code
class="tborder tborder{$post['usergroup']}"


Then, create a new CSS class.
For example,
the .tborder4 class will be applied for posts posted by usergroup id 4 (by default, Administrators Group),
the .tborder6 class will be applied for posts posted by usergroup id 6 (by default, Moderators Group).

If a usergroup doesn't have this new class, the usergroup will use the original tborder class. So, we don't need to create a new class for all usergroup. Just create it for some usergroup.

We can do that with other class too (if we want), like trow1, trow2, post_body and etc.



Attached File(s) Thumbnail(s)
   

12-11-2010 06:51 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #2
RE: Simple Post Style Based On Usergroup
very nice, especially good for if you want a moderators posts to stand out.


[Image: leelink.gif]
MYBB1.6 & XThreads
12-11-2010 07:05 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: Simple Post Style Based On Usergroup
Very simple edit, and not to much works needed in CSS and template (I think) Biggrin.

12-12-2010 05:23 AM
Find all posts by this user Quote this message in a reply
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #4
RE: Simple Post Style Based On Usergroup
Nice and easy! Wink
12-12-2010 09:17 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #5
RE: Simple Post Style Based On Usergroup
Nice tip RateU Smile

[Image: logo.png]

[Image: twitter.png]
12-13-2010 03:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: