@amykhar
This Hack has a serious bug which causes issues with other Hacks that automatically create threads (and are using others users for this):
You check the posts for the viewing user, instead of checking the posts for the user that makes the post.
Corrected Plugins:
postdata_presave
PHP Code:
// get useriinfo for this post $userid =& $this->fetch_field('userid'); $userinfo = fetch_userinfo($userid); $pagetext =& $this->fetch_field('pagetext', 'post');
if (($userinfo['posts'] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) { $this->error('error_nourlallowed'); $return_value = false; }
threadfpdata_presave
PHP Code:
// get useriinfo for this post $userid =& $this->fetch_field('postuserid'); $userinfo = fetch_userinfo($userid); $pagetext =& $this->fetch_field('pagetext', 'post'); if (($userinfo['posts'] < 15) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://'))) { $this->error('error_nourlallowed'); $return_value = false; }
This causes an error on my board for anyone replying to a thread:
Warning: Missing argument 1 for fetch_userinfo() in /includes/functions.php on line 998
Quote:
Originally Posted by Andreas
@amykhar
This Hack has a serious bug which causes issues with other Hacks that automatically create threads (and are using others users for this):
You check the posts for the viewing user, instead of checking the posts for the user that makes the post.
Corrected Plugins:
postdata_presave
PHP Code:
// get useriinfo for this post
$userid =& $this->fetch_field('userid');
$userinfo = fetch_userinfo();
$pagetext =& $this->fetch_field('pagetext', 'post');
if (($userinfo['posts'] < 2) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://')))
{
$this->error('error_nourlallowed');
$return_value = false;
}
threadfpdata_presave
PHP Code:
// get useriinfo for this post
$userid =& $this->fetch_field('postuserid');
$userinfo = fetch_userinfo($userid);
$pagetext =& $this->fetch_field('pagetext', 'post');
if (($userinfo['posts'] < 2) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://')))
{
$this->error('error_nourlallowed');
$return_value = false;
}
@amykhar
This Hack has a serious bug which causes issues with other Hacks that automatically create threads (and are using others users for this):
You check the posts for the viewing user, instead of checking the posts for the user that makes the post.
Corrected Plugins:
postdata_presave
threeadfpdata_presave
I'm probably being completely stupid - but what do I edit to fix the bug?
Mod is great However, amykhar is there a way to disable it for certain forums. For example this would conflict with the Reported Posts mod since members with less then 15 posts would not be able to report posts.
I tried the following but it didnt work.
if (($vbulletin->userinfo[posts] < 15) and ($vbulletin->forum[forumid]!=X) and (stristr($pagetext,'[url') or stristr($pagetext,'[URL') or stristr($pagetext,'www.') or stristr($pagetext,'http://')))
{
Is there a way to let the users who has less than 15 posts be able to post Smiley faces? Right now if a user types in a message and uses a smiley faces it doesn't let them post. Frankly I don't mind the smiley faces...? Anyone know how to change this?