The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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! |
#2
|
|||
|
|||
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']); |
#3
|
|||
|
|||
Ah I gave that a go and it didn't seem to work. Thanks for the suggestion though
|
#4
|
|||
|
|||
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']); |
#5
|
|||
|
|||
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 |
#6
|
|||
|
|||
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. |
#7
|
|||
|
|||
I'm fine with the separate plugins!
Thanks so much for this! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|