Trying to put things together but it is killing me trying to understand why I get this error.
Quote:
Parse error: syntax error, unexpected '[' in /home/project9/public_html/vb40/includes/class_core.php(4029) : eval()'d code on line 50
|
Line 50:
PHP Code:
function CybChFRAll(obj) {
The entire plugin just in case anyone wants to go over it and point out any mistakes I may have made.
PHP Code:
if ($vbulletin->options['cybfrules_enable_global'])
{
$cybfr_locs = array("forumdisplay", "showthread", "newthread", "newreply", "sendmessage");
if (in_array(THIS_SCRIPT, $cybfr_locs))
{
$vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'cfrrs', TYPE_STR);
eval('$cybfr_checkaccepted = in_array($foruminfo[cyb_frules], array(' . $vbulletin->userinfo['cybfrules_sets'] . '));');
eval('$cybfr_checkaccepted_g = in_array($foruminfo[cyb_frules], array(' . $vbulletin->GPC[COOKIE_PREFIX . 'cfrrs'] . '));');
$cybfr_havenotaccepted = false;
if ($vbulletin->userinfo['userid'] AND $foruminfo['cyb_frules']!=0 AND !in_array($foruminfo['cyb_frules'], array($cybfr_checkaccepted)))
{
$cybfr_havenotaccepted = true;
}
if (!$vbulletin->userinfo['userid'] AND $foruminfo['cyb_frules']!=0 AND !in_array($foruminfo['cyb_frules'], array($cybfr_checkaccepted_g)))
{
$cybfr_havenotaccepted = true;
}
$cfrules_forumruleslink = $foruminfo['cyb_frules'];
if ($cfrules_forumruleslink<1)
{
$cfrules_forumruleslink = 1;
}
$vbulletin->templatecache['forumrules'] = str_replace('showrules','cfrules&cfrset='.$cfrules_forumruleslink,$vbulletin->templatecache['forumrules']);
}
if (($vbulletin->options['cybfrules_reg_rules']=='1') AND (THIS_SCRIPT=='register'))
{
$db->hide_errors();
$cybfr_rules = $vbulletin->db->query_first("
SELECT id, name, rules
FROM " . TABLE_PREFIX . "cyb_frules AS cyb_frules
WHERE id = 1
");
if ($vbulletin->options['cybfrules_bb'])
{
require_once(DIR . '/includes/class_bbcode.php');
$cafr_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$forum_rules_description = $cafr_parser->do_parse($cybfr_rules['rules'],1, 1, 1, 1, 1);
}
else
{
$forum_rules_description = $cybfr_rules['rules'];
}
$templater->register('forum_rules_description', $forum_rules_description);
$db->show_errors();
}
vB_Template::preRegister('FORUMDISPLAY',array('cybfr_locs' => $cybfr_locs, 'cybfr_havenotaccepted' => $cybfr_havenotaccepted, 'cybfr_checkaccepted' => $cybfr_checkaccepted, 'cybfr_checkaccepted_g' => $cybfr_checkaccepted_g, 'cfrules_forumruleslink' => $cfrules_forumruleslink));
vB_Template::preRegister('SHOWTHREAD',array('cybfr_locs' => $cybfr_locs, 'cybfr_havenotaccepted' => $cybfr_havenotaccepted, 'cybfr_checkaccepted' => $cybfr_checkaccepted, 'cybfr_checkaccepted_g' => $cybfr_checkaccepted_g, 'cfrules_forumruleslink' => $cfrules_forumruleslink));
vB_Template::preRegister('newthread',array('cybfr_locs' => $cybfr_locs, 'cybfr_havenotaccepted' => $cybfr_havenotaccepted, 'cybfr_checkaccepted' => $cybfr_checkaccepted, 'cybfr_checkaccepted_g' => $cybfr_checkaccepted_g, 'cfrules_forumruleslink' => $cfrules_forumruleslink));
vB_Template::preRegister('newreply',array('cybfr_locs' => $cybfr_locs, 'cybfr_havenotaccepted' => $cybfr_havenotaccepted, 'cybfr_checkaccepted' => $cybfr_checkaccepted, 'cybfr_checkaccepted_g' => $cybfr_checkaccepted_g, 'cfrules_forumruleslink' => $cfrules_forumruleslink));
vB_Template::preRegister('sendmessage',array('cybfr_locs' => $cybfr_locs, 'cybfr_havenotaccepted' => $cybfr_havenotaccepted, 'cybfr_checkaccepted' => $cybfr_checkaccepted, 'cybfr_checkaccepted_g' => $cybfr_checkaccepted_g, 'cfrules_forumruleslink' => $cfrules_forumruleslink));
}