![]() |
Multiple user ranks divided with a character in postbit
I was wondering if there was a way to divide user ranks with a character (specifically a forwards slash).
Let's say my user ranks are words - IE: ADMIN, CONTRIBUTOR etc. Is it possible that in the postbit I can make it so that rather than having ADMIN CONTRIBUTOR or ADMIN CONTRIBUTOR I can have: ADMIN/CONTRIBUTOR If anybody could help me achieve this I'd be very grateful! |
I haven't tried it, but you could try creating a plugin using the 'postbit_display_complete' hook and
Code:
$post['rank'] = str_replace('<BR>', '/', $post['rank']); |
Ah I gave that a go and it didn't seem to work. Thanks for the suggestion though :)
|
OK, sorry. I just tried this and it works (well, at least it appears to given my 15 seconds of testing).
Code:
$post['rank'] = str_replace('<br />', '/', $post['rank']); |
Worked beautifully! Thankyou so much.
Would it be cheeky to ask if you could find a way to make the plugin work in the memberinfo as well? :P |
Well what you can do is create a second plugin using the "member_complete" hook and use this code:
Code:
$prepared['rank'] = str_replace('<br />', '/', $prepared['rank']); There may be a way to do it without separate plugins, but I couldn't see one because the code that puts together the ranks has the '<br />' hard-coded. |
I'm fine with the separate plugins!
Thanks so much for this! :D |
All times are GMT. The time now is 01:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|