• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gesior Forum Ban

  • Thread starter Thread starter Deleted member 141899
  • Start date Start date
D

Deleted member 141899

Guest
Hi friends,

can someone help me put a unique banishment to the forum Gesior? Example: added a fieldname in the accounts structure called "forum_banned" with default 0, if forum_banned == 1, then block all players this account to post on the forum. As I know almost nothing of PHP is very hard for me, thank you!

I tried but without success:
Code:
function canPost($account)
{
    $forumbanned = $SQL->query("SELECT " . $SQL->fieldName('forum_banned') . " FROM " . $SQL->tableName('accounts') . " WHERE " . $SQL->fieldName('account_id') . " = ".$SQL->quote($account->getId())." DESC")->fetch();
    if($account->isLoaded())
        if(!$account->isBanned() || $forumbanned == 1)
        {
            $SQL = $GLOBALS['SQL'];
            $level_limit = $GLOBALS['level_limit'];
            $player = $SQL->query("SELECT " . $SQL->fieldName('level') . " FROM " . $SQL->tableName('players') . " WHERE " . $SQL->fieldName('account_id') . " = ".$SQL->quote($account->getId())." ORDER BY " . $SQL->fieldName('level') . " DESC")->fetch();
            if($player['level'] >= $level_limit)
                return true;
        }
    return false;
}

Bump! Can someone help me please?
 
Last edited by a moderator:
Back
Top