The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Plugin variable not showing in postbit data
Background:
I've created a userfield which contains the number of times a forum member has won an award (in this case an oven mitt). I'm trying to display a graphic in postbits for each time the winner has won. So if a member has won 3 oven mitts then the field contains 3 and it should display the graphic 3 times. I've written some plugin code that creates a variable with an oven mitt image. I did this because I was unable to use a for loop in the postbit template. Here is the plugin code that creates the oven mitt image data: Code:
global $vbulletin; if ($vbulletin->userinfo['userid'] == 1) { $ovenmittcount = $vbulletin->userinfo['field12']; $ovenmitts = ""; for ($loopcount=1; $loopcount<=$ovenmittcount; $loopcount+=1) { $ovenmitts = $ovenmitts . '<img src="http://www.badbeatspoker.net/images/isopmitt.jpg">'; } } In forumdisplay this code shows the image correctly: Code:
<center> $random_banner[$random_number] $ovenmitts </center> I've tried setting the plugin to work in global_start and a variety of other showthread and postbit hooks with no joy. This is the code I'm using in postbit: Code:
<if condition="$post['field12']"> $ovenmitts </if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|