Problem with forum enter post limit

Wondering why that MOD you have won't install correctly? Let's take a look
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
TomBullock
Registered User
Posts: 7
Joined: Mon Jul 09, 2007 10:30 pm

Problem with forum enter post limit

Post by TomBullock »

Hello there,
I downloaded a MOD earlier which makes the members of the forum have a certain ammount of posts to enter a certain forum.
Anyway, when i tried to install it i got this error:

Code: Select all

Critical Error

FIND FAILED: In file [admin/admin_forums.php] could not find:

, " . intval($HTTP_POST_VARS['forumstatus']) . " 

MOD script line #219 :: FAQ :: Report
Can anyone help me out please?

Id be very greatful :D
legwon
Registered User
Posts: 14
Joined: Sun Jan 15, 2006 12:07 am

Re: Problem with forum enter post limit

Post by legwon »

probably bc that perticular line doesnt have the , in it.


edit the mod to this...

Code: Select all

= " . intval($HTTP_POST_VARS['forumstatus']) . "
give it a shot... any other problems like this, just manually look at the file.. they will open with notepad or wordpad
TomBullock
Registered User
Posts: 7
Joined: Mon Jul 09, 2007 10:30 pm

Re: Problem with forum enter post limit

Post by TomBullock »

I did what you said above and now i get the error:

Code: Select all

Critical Error

FIND FAILED: In file [admin/admin_forums.php] could not find:

$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ") 
VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")"; 

MOD script line #202 :: FAQ :: Report
Any ideas?
legwon
Registered User
Posts: 14
Joined: Sun Jan 15, 2006 12:07 am

Re: Problem with forum enter post limit

Post by legwon »

it meens , that the WHOLE line isnt in that file. please post a link to the MOD that ur using. i will take a look at it...
3 reasons that this will happen...

1) the MOD itself isnt right
2) you have a heavily modded board
3) your using a skin that is heavily modded
TomBullock
Registered User
Posts: 7
Joined: Mon Jul 09, 2007 10:30 pm

Re: Problem with forum enter post limit

Post by TomBullock »

User avatar
Kevin Clark
Support Team
Support Team
Posts: 751
Joined: Thu Feb 10, 2005 5:34 pm
Location: UK
Contact:

Re: Problem with forum enter post limit

Post by Kevin Clark »

I think you were better off just looking for the key part of that edit

Code: Select all

'forumstatus'
And making the change it needed by hand or pasting that bit of code from your file into the install file so it finds exactly the right bit.

EasyMOD is dumb in that it can only look for the exact code the MOD asks it to. If yours is slightly different then it will fail.
Image
TomBullock
Registered User
Posts: 7
Joined: Mon Jul 09, 2007 10:30 pm

Re: Problem with forum enter post limit

Post by TomBullock »

I dont have a clue about all the coding though :?

I restored my database and forum back to when it had no mods at all.
I tried installing the mod again and i got this error:

Code: Select all

Critical Error

FIND FAILED: In file [admin/admin_forums.php] could not find:

, " . intval($HTTP_POST_VARS['forumstatus']) . " 

MOD script line #219 :: FAQ :: Report
Is there a file missing, or part of the file incorrect?
User avatar
Kevin Clark
Support Team
Support Team
Posts: 751
Joined: Thu Feb 10, 2005 5:34 pm
Location: UK
Contact:

Re: Problem with forum enter post limit

Post by Kevin Clark »

It's trying to find this exact line

Code: Select all

, " . intval($HTTP_POST_VARS['forumstatus']) . " 
and it's not finding it in your admin/admin_forums.php file.

So just look for the key part of that which is 'forumstatus'. Find that, check the bit before it about intval($HTTP etc looks right and copy YOUR code into the install file for the bit it's looking for.

The key with looking at code is to break down what you're looking at.

Here's the section it's after

Code: Select all

VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";
That looks complicated until you realise it's just similar chunks separated by commas.

Code: Select all

VALUES ('" . $next_id . "'
, '" . str_replace("\'"
, "''"
, $HTTP_POST_VARS['forumname']) . "'
, " . intval($HTTP_POST_VARS[POST_CAT_URL]) . "
, '" . str_replace("\'", "''"
, $HTTP_POST_VARS['forumdesc']) . "'
, $next_order
, " . intval($HTTP_POST_VARS['forumstatus']) . "
, " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

Your MOD is just looking for one of those chunks so it can add something after or before it.
Image
TomBullock
Registered User
Posts: 7
Joined: Mon Jul 09, 2007 10:30 pm

Re: Problem with forum enter post limit

Post by TomBullock »

Would you be able to edit the file correctly then post them on here?
I would be very greatful.
User avatar
Kevin Clark
Support Team
Support Team
Posts: 751
Joined: Thu Feb 10, 2005 5:34 pm
Location: UK
Contact:

Re: Problem with forum enter post limit

Post by Kevin Clark »

I can't get the MOD download to work and you must have some other MOD installed already cos they're designed to work on default install files and the code it's looking for is in that.
Image
Locked