MichaelDance
Well-known member
I'm trying to do a BBCode which only shows to Admins and Moderators but for some reason this BB Code shows to everyone. Confused me.
What shows when a user isn't logged in or a non Moderator / Administrator:
---
I've tried following: http://xenforo.com/community/thread...b-code-in-xenforo-a-comprehensive-guide.6320/
Thank you for your help.
What shows when a user isn't logged in or a non Moderator / Administrator:
---
I've tried following: http://xenforo.com/community/thread...b-code-in-xenforo-a-comprehensive-guide.6320/
PHP:
<?php
class MODRelease_EventListener_MODRelease
{
public static function listen($class, array &$extend)
{
if ($class == 'XenForo_MODRelease_Formatter_Base')
{
$extend[] = 'MODRelease_MODRelease_Formatter_Base';
}
}
}
PHP:
class MODRelease_MODRelease_Formatter_Base extends XFCP_MODRelease_MODRelease_Formatter_Base
{
protected $_tags;
public function getTags()
{
$this->_tags = parent::getTags();
$this->_tags['modreserve'] = array(
'hasOption' => false,
'replace' => array('<i style="color:red;"><b>A reserve has been set by the seller.</b></i><br /><xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}"><p>Reserve Price: <b>', '</b></p>')
);
return $this->_tags;
}
}
Thank you for your help.
Last edited: