The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Cannot access lastposterid from within plugin
Hello
I'm attempting to create a plugin that retrieves a user profile field to display on the forum home page. The code is as follows. $lastpostuserid = $lastpostinfo['lastposterid']; /*write custom query here to get display name*/ $lastposter = $db->query_first("SELECT field6 FROM " . TABLE_PREFIX . "userfield WHERE userid = '$lastpostuserid'"); $lastposterhome_var = $lastposter['field6'];*/ /* register variable in the 'memberaction_dropdown' template */ vB_Template:reRegister('memberaction_dropdown',a rray('lastposterhome_var'=> $lastposterhome_var)); The hook I'm using is forumbit_display. The problem is that the value of last $lastpostinfo['lastposterid'] is not available and subsequently I'm not getting a result. The value is available though in the template containing memberaction_dropdown (forumhome_lastpostby). The plugin does work if I assign arbitrary text to my variable just to test. I do have a very similar plugin working on the forum display page which is using the threadbit_display hook and $thread['lastposterid'] I'm quite new to this so any advice would be most welcome. Thanks. Mike |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|