RedTurtle
11-24-2012, 05:51 PM
I'm trying to use the code below to make the following happen:
If $show['spelling_checker'] OR $show['infraction_checker'] are true AND $vbulletin->GPC['accept_rules'] is not true, then show the error code.
Also, if $show['intro_checker'] is true and $vbulletin->GPC['intro_rules'] is not true, also show the error code.
I'm trying to put them together in one combined statement, but not sure what I'm doing wrong.
if (($show['spelling_checker'] || $show['infraction_checker']) && !$vbulletin->GPC['accept_rules']) || if($show['intro_checker'] && !$vbulletin->GPC['intro_rules'])
{
$errors[] = "<span style='color: #ba0000; background-color: #FDFD65;'>Please accept the highlighted rules shown below before submitting your post.</span>";
}
If $show['spelling_checker'] OR $show['infraction_checker'] are true AND $vbulletin->GPC['accept_rules'] is not true, then show the error code.
Also, if $show['intro_checker'] is true and $vbulletin->GPC['intro_rules'] is not true, also show the error code.
I'm trying to put them together in one combined statement, but not sure what I'm doing wrong.
if (($show['spelling_checker'] || $show['infraction_checker']) && !$vbulletin->GPC['accept_rules']) || if($show['intro_checker'] && !$vbulletin->GPC['intro_rules'])
{
$errors[] = "<span style='color: #ba0000; background-color: #FDFD65;'>Please accept the highlighted rules shown below before submitting your post.</span>";
}