Jump to content

Open Coterie  ·  19 members

MyBB Staff People

What have you learnt recently?


Kit the Human
 Share

Recommended Posts

Was there a variable that made your life easier? A clever exploit of myBB's features? A feature that you didn't know existed, but you found it and huzzah! It helped.

  • Like 1

 

sig.png.30b42565d04d922988370bf14e1447bc.png

PSI: an Occult Investigations RP

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

You can also find me at:

static-historicalrp.jpg  B8CB4x.png rpabutton.png

Link to comment
Share on other sites

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;}

etc

 

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

Link to comment
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.)

 

sig.png.30b42565d04d922988370bf14e1447bc.png

PSI: an Occult Investigations RP

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

You can also find me at:

static-historicalrp.jpg  B8CB4x.png rpabutton.png

Link to comment
Share on other sites

^this is brilliant. You're my new hero.

Link to comment
Share on other sites

  • Admin

@Kit the Human most variables in all things don't like numbers first. Code just doesn't like it. You'll find the same issue in PHP too.

0_mainsignature.jpg

image.png

Profile set made by myself and original Artwork by Fae Merriman, my daughter.

 

 

Link to comment
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.

wcc_aff_one.png.ee644d7c84e4471ab7231d79aa59872c.png freerphostaffbutton.png.2c941043f4d1bcb22ada2b22d3e60dfc.png myrpg-affiliate.png.5453a73021a9354b5b772ac4e15f7ef9.png

Link to comment
Share on other sites

 Share

  • 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.