Chicken
04-19-03, 08:36 PM
This specifically pertains to vBulletin, but hopefully it is general enough that that isn't improtant...
If I wanted to replace this:
$cantpostforumid=Z;
if ($cantpostforumid==$forumid AND ($bbuserinfo[usergroupid]!=6 OR $bbuserinfo[usergroupid]!=5 OR $bbuserinfo[usergroupid]!=7))
{
And instead of setting the $cantpostforumid=Z; variable and then using it a line later, wanted to change this to different values, how would I go about it?
Is there a way to set the variable in the first place, like...
$cantpostforumid=($forumid == 19 OR $forumid == 21 OR $forumid == 23 OR $forumid == 24 OR $forumid == 27);
-or could we just get rid of it and have ths infomation in the lines that follow like this:
if (($forumid == 19) OR ($forumid == 21) OR ($forumid == 23) OR ($forumid == 24) OR ($forumid == 27) AND ($bbuserinfo[usergroupid]!=6 OR $bbuserinfo[usergroupid]!=5 OR $bbuserinfo[usergroupid]!=7))
{
-or would the code be more like this (note change in grouping, deletion of parentheses):
if ($forumid == 19 OR $forumid == 21 OR $forumid == 23 OR $forumid == 24 OR $forumid == 27) AND ($bbuserinfo[usergroupid]!=6 OR $bbuserinfo[usergroupid]!=5 OR $bbuserinfo[usergroupid]!=7))
{
Keep in mind I don't know the first thing about coding so I'm hoping someone will know.
If I wanted to replace this:
$cantpostforumid=Z;
if ($cantpostforumid==$forumid AND ($bbuserinfo[usergroupid]!=6 OR $bbuserinfo[usergroupid]!=5 OR $bbuserinfo[usergroupid]!=7))
{
And instead of setting the $cantpostforumid=Z; variable and then using it a line later, wanted to change this to different values, how would I go about it?
Is there a way to set the variable in the first place, like...
$cantpostforumid=($forumid == 19 OR $forumid == 21 OR $forumid == 23 OR $forumid == 24 OR $forumid == 27);
-or could we just get rid of it and have ths infomation in the lines that follow like this:
if (($forumid == 19) OR ($forumid == 21) OR ($forumid == 23) OR ($forumid == 24) OR ($forumid == 27) AND ($bbuserinfo[usergroupid]!=6 OR $bbuserinfo[usergroupid]!=5 OR $bbuserinfo[usergroupid]!=7))
{
-or would the code be more like this (note change in grouping, deletion of parentheses):
if ($forumid == 19 OR $forumid == 21 OR $forumid == 23 OR $forumid == 24 OR $forumid == 27) AND ($bbuserinfo[usergroupid]!=6 OR $bbuserinfo[usergroupid]!=5 OR $bbuserinfo[usergroupid]!=7))
{
Keep in mind I don't know the first thing about coding so I'm hoping someone will know.