Zzed
04-03-2002, 10:00 PM
This hack will prevent new users from posting any images using the UBB IMG
tag until they have 20 posts.
This hack was requested by Remi.
New templates: 1 --> error_noimagesallowed
Modified files: 2 --> newthread.php and newreply.php
################################################## ####################
Create a new template by the name of: error_noimagesallowed
Copy the following information in it:
You do not have enough post count to post images in your signature or in your previous post. Please go back and correct the problem and then continue again. You need a minimum of $posts_needed_for_img to post images.</p>
################################################## ####################
In newthread.php:
Look for:
// check max images
if ($maximages!=0) {
$parsedmessage=bbcodeparse($message,$foruminfo[forumid],$allowsmilie);
if (countchar($parsedmessage,"<img")>$maximages) {
eval("standarderror(\"".gettemplate("error_toomanyimages")."\");");
exit;
}
}
Add the following code directly below it:
$posts_needed_for_img = 20;
if($bbuserinfo[posts] < $posts_needed_for_img) {
if (countchar($parsedmessage,"<img")>0) {
eval("standarderror(\"".gettemplate("error_noimagesallowed")."\");");
exit;
}
}
In newreply.php:
Look for the following code:
// check max images
if ($maximages!=0) {
$parsedmessage=bbcodeparse($message,$forumid,$allo wsmilie);
if (countchar($parsedmessage,"<img")>$maximages) {
eval("standarderror(\"".gettemplate("error_toomanyimages")."\");");
exit;
}
}
Add the following code directly below it:
$posts_needed_for_img = 20;
if($bbuserinfo[posts] < $posts_needed_for_img) {
if (countchar($parsedmessage,"<img")>0) {
eval("standarderror(\"".gettemplate("error_noimagesallowed")."\");");
exit;
}
}
You are done. :)
tag until they have 20 posts.
This hack was requested by Remi.
New templates: 1 --> error_noimagesallowed
Modified files: 2 --> newthread.php and newreply.php
################################################## ####################
Create a new template by the name of: error_noimagesallowed
Copy the following information in it:
You do not have enough post count to post images in your signature or in your previous post. Please go back and correct the problem and then continue again. You need a minimum of $posts_needed_for_img to post images.</p>
################################################## ####################
In newthread.php:
Look for:
// check max images
if ($maximages!=0) {
$parsedmessage=bbcodeparse($message,$foruminfo[forumid],$allowsmilie);
if (countchar($parsedmessage,"<img")>$maximages) {
eval("standarderror(\"".gettemplate("error_toomanyimages")."\");");
exit;
}
}
Add the following code directly below it:
$posts_needed_for_img = 20;
if($bbuserinfo[posts] < $posts_needed_for_img) {
if (countchar($parsedmessage,"<img")>0) {
eval("standarderror(\"".gettemplate("error_noimagesallowed")."\");");
exit;
}
}
In newreply.php:
Look for the following code:
// check max images
if ($maximages!=0) {
$parsedmessage=bbcodeparse($message,$forumid,$allo wsmilie);
if (countchar($parsedmessage,"<img")>$maximages) {
eval("standarderror(\"".gettemplate("error_toomanyimages")."\");");
exit;
}
}
Add the following code directly below it:
$posts_needed_for_img = 20;
if($bbuserinfo[posts] < $posts_needed_for_img) {
if (countchar($parsedmessage,"<img")>0) {
eval("standarderror(\"".gettemplate("error_noimagesallowed")."\");");
exit;
}
}
You are done. :)