The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
On our boards we have a lot of profile fields that use multiple check boxes. When vB displays these fields in the memberinfo page it does so as one giant comma seperated blob. What I'm wondering is if it's possible to get it to use line-breaks instead. For example currently the field is like this:
Field 1: Item 1, Item 2, Item 3 I'd like it to be more like this: Field1: Item 1 Item 2 Item 3 Can anyone help with this? I spent hours yesterday digging through templates and not finding much. |
#2
|
||||
|
||||
![]()
I think you'd have to write a plugin to take the profile field and do a str_replace of the commas with a line break. You'll have to look through the code to figure out where to do this. (If you are in debug mode, the hook locations will show on the bottom of the page and then you can search the php files to find those hooks and see which one to use.)
|
#3
|
|||
|
|||
![]()
That's a bit beyond my abilities to do. I'm no programmer so this is something I'd have to ask someone to do.
|
#4
|
||||
|
||||
![]()
Should be something simple like this (play with it if it isn't working right):
hook location: member_profileblock_profilefieldbit PHP Code:
|
#5
|
|||
|
|||
![]()
That seems to work. Will it take multiple values?
EDIT: Hm, no, it doesn't seem to. |
#6
|
||||
|
||||
![]()
It works just fine with the one field I have on my test site that I put commas into. If it isn't working with multiple field ids, then you should play with it and then post your code here so we can see it.
|
#7
|
|||
|
|||
![]()
Works just fine if it's one field. If I want to use more than one field though I don't know. I said before I'm no PHP programmer.
|
#8
|
||||
|
||||
![]()
You can use and OR or use in_array.
PHP Code:
PHP Code:
|
#9
|
|||
|
|||
![]()
I'll give them a try in the morning. Thanks for all the help, it is appreciated.
--------------- Added [DATE]1243364818[/DATE] at [TIME]1243364818[/TIME] --------------- Tried out the array statement. Works just fine and is easy to add to. I'm wondering though, is it possible to do this by profilefield type rather than ID? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|