The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Suggestions Welcomed
Hi all. I've been working on some new code for my forums and I'm close to done. I just finished testing my latest addition and it is working, but I was hoping to get some suggestions on it.
PHP Code:
Thanks! |
#2
|
||||
|
||||
I'm under the impression that $find_monster['m_equipment'] is a serialized array. So you could do something like this to work way easier with it.
PHP Code:
|
#3
|
|||
|
|||
PHP Code:
|
#4
|
|||
|
|||
Quote:
a:5:{s:4:\"head\";s:1:\"0\";s:5:\"chest\";s:1:\"0\ ";s:5:\"lhand\";s:1:\"8\";s:5:\"rhand\";s:1:\"0\"; s:4:\"feet\";s:1:\"0\";} I actually had the same unserialize that you posted there, but I don't see how to view the data. In my top post, I use $full_equipment[1] to get my first value. The same doesn't work for the unserialized value: $find_equipment[1]. Can someone tell me how to get those? @ Opserty - The rebuild_equipment only goes through if the person clicks on the button to upgrade their equipment "if ($test->input['do'] == 'guard_shield')". Once they do that, it will change one of the values, so I used the rebuild to put them all back together after the change occurs. |
#5
|
||||
|
||||
You have to unescape the quotes.
PHP Code:
Also, if you don't get an array, set error reporting to E_ALL to see where the error lays. PHP Code:
|
#6
|
|||
|
|||
Quote:
You have changed part of the array there, so its changed fully. Theres no need to rebuild it using array() again. You can just implode it as you have done on the next line. |
#7
|
|||
|
|||
I used the stripslashes and the error_reporting. No errors to report. Here's the php code I am using.
PHP Code:
I'm using the following in a template to see the data. I'm guessing these are wrong? HTML Code:
{$find_equipment2}<BR>
{$find_equipment2[1]}
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|