Minimum Posts to Use [img] BBCode an XMB Hack, compatible with XMB version 1.9.11. Any existing or future posts by authors having fewer than the minimum number of posts will not be allowed to link to any images. Also, such authors are prevented from using the [img] bbcode preview or remote image features. Attachments, including image attachments and thumbnails, are not affected in any way by this hack. It only changes the BBCode feature. @version 1.0 @author Robert Chapin (miqrogroove) @license GPL ----------------------------------- In header.php Find define('X_CACHE_GET', 1); Add code above define('MIN_POSTS_FOR_IMG', 100); // Users must post this many times before they can use the [img] bbcode in posts or signatures. Please edit the hard-coded number, which is 100 by default. You may easily disable this hack by changing the number to 0 in header.php. ----------------------------------- In post.php Find $allowimgcode = ($forum['allowimgcode'] == 'yes' And $forum['allowbbcode'] == 'yes') ? $lang['texton'] : $lang['textoff']; Add code above // Hacked to prevent new users from posting images. if (intval($self['postnum']) < MIN_POSTS_FOR_IMG) { $forum['allowimgcode'] = 'no'; } ----------------------------------- In viewthread.php Find $post['message'] = postify(stripslashes($post['message']), $smileyoff, $bbcodeoff, $forum['allowsmilies'], $forum['allowhtml'], $forum['allowbbcode'], $forum['allowimgcode']); Replace with if (intval($post['postnum']) >= MIN_POSTS_FOR_IMG) { $allowimgcode = $forum['allowimgcode']; } else { $allowimgcode = 'no'; } $post['message'] = postify(stripslashes($post['message']), $smileyoff, $bbcodeoff, $forum['allowsmilies'], $forum['allowhtml'], $forum['allowbbcode'], $allowimgcode); Find $sql = "SELECT * " . "FROM ".X_PREFIX."posts " . "WHERE tid=$tid $criteria " . "ORDER BY dateline ASC, pid ASC " Replace with $sql = "SELECT p.*, m.postnum " . "FROM ".X_PREFIX."posts AS p " . "LEFT JOIN ".X_PREFIX."members m ON m.username=p.author " . "WHERE p.tid=$tid $criteria " . "ORDER BY p.dateline ASC, p.pid ASC " Find $post['message'] = postify(stripslashes($post['message']), $smileyoff, $bbcodeoff, $forum['allowsmilies'], $forum['allowhtml'], $forum['allowbbcode'], $forum['allowimgcode']); Replace with if (intval($post['postnum']) >= MIN_POSTS_FOR_IMG) { $allowimgcode = $forum['allowimgcode']; } else { $allowimgcode = 'no'; } $post['message'] = postify(stripslashes($post['message']), $smileyoff, $bbcodeoff, $forum['allowsmilies'], $forum['allowhtml'], $forum['allowbbcode'], $allowimgcode);