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:
Bump! Can someone help me please?
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: