The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
comma seperated values only display first value
Trying to achive :
1) Admin can set usergroups who can acces/use this app, in his cp 2) its stored in a table>colum , ELoptions > Optionallowed I get the data in php like this PHP Code:
HTML Code:
<if condition="is_member_of($bbuserinfo, $permissionPOSTER[Optionallowed])"> <a href="Elinks.php?do=input" class="botton">$vbphrase[Btn_new]</a></div> </if> and they work fine, but they also are just 1 = enable 0 = disabled. This is stored as TEXT in the db due to the "comma's" between the numbers Since it dint work and only showed the wery first number admin sets in cp i tryed to display the contents in a table to see what was going on. and true it only shows the first number all others are ignored ewen if i try to write a sentence or do anything else only the first character is enabled.. What am i doing wrong, is it the htmlspecialchars_uni ? i dont get it should i pull the data with an array instead, ewen with the table only containing 1 row. |
#2
|
||||
|
||||
You're close, try this:
PHP Code:
|
#3
|
||||
|
||||
ohhh preg_split never knew...
Thank you! |
#4
|
||||
|
||||
Unless I'm understanding something wrong, can't you just use explode() instead?
|
#5
|
||||
|
||||
You could, but explode has a very specific delimiter - with the preg_split he can match comma separated values, as well as comma and space separated values.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|