Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Jul 2010, 08:06
Macindy Macindy is offline
 
Join Date: Dec 2003
Plugin for memberaction hook doesn't work since 4.0.4

Hi forum!

After updating to 4.0.4 the following plugin doesn't work anymore.
It seems to be the is_member_of clause - but I can't see why.

global $template_hook;
$template_hook['memberaction_dropdown_items'] = "";
$show['test'] = false;


if (is_member_of($vbulletin->userinfo, 5,6))
{
$show['test'] = true;
$templater = vB_Template::create('xxx');
$templater->register('userinfo', $userinfo);
$template_hook['memberaction_dropdown_items'] .= $templater->render();
}
--------------- Added 04 Jul 2010 at 08:11 ---------------

ok nice - this works:
global $template_hook;
$template_hook['memberaction_dropdown_items'] = "";
$show['xxx'] = false;


if (is_member_of(vB::$vbulletin->userinfo, 5,6) AND $post[usergroupid]==1)
{
$show['xxx'] = true;
$templater = vB_Template::create('xxx');
$templater->register('post', $post);
$template_hook['memberaction_dropdown_items'] .= $templater->render();
}
Any optimizing advices?

Last edited by Macindy; 04 Jul 2010 at 08:12. Reason: Auto-Merged DoublePost
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 17:47.

Layout Options | Width: Wide Color: