Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Kit the Human

What have you learnt recently?

Recommended Posts

I love customizing postbit stuff so it's coloured according to each member's usergroup. I used to do it in a really clunky McGuiver-esque way by sticking the {$post['usertitle']} variable into an element class name. It corresponded to a bunch of classes I had in my css like; 


.text_Member {color: red;}

.background_Member {background: red;}



But now I've learned about the magic of {$usergroup['gid']}. It's less work and much more flexible.

Share this post

Link to post
Share on other sites

ID variables are a godsend, I swear. My favourite trick with them though was (to save myself rewriting the same code) is thus:

class="miniprofile group{$usergroup['gid']}"

So, you can do all your applicable to all groups with .miniprofile


For the stuff you want to be unique to each group? .miniprofile.groupX


Beats copy pasta all the time!


(I don't know why, but you can't start a class with a number, so you have to add a word or letter in front of the variable.)


Roleplay Architects: Grab a friend (or many friends!) and just write.

You can also find me at:

Realm of Roleplays  static-historicalrp.jpg


Share this post

Link to post
Share on other sites

I recently pieced together a code to allow members to change their own usergroup (of course to the specific group set for that link), less work for the staff and users don’t have to wait for staff to get the time to update the usergroup.

Share this post

Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.