EASYMOD MOD ERROR

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
secretmaple
Registered User
Posts: 8
Joined: Sat Nov 10, 2007 8:51 pm

EASYMOD MOD ERROR

Post by secretmaple »

Ok, so every MOD I try does not work on the Easymod.

It does not matter which mods I install, it just never works for easymod..

So, I was installing a "Disllow_deleteing posts on admins for mods" mod.
Here is the mod, just put it in notepad and save it as .txt, name: Disallow editing_deleting administrator posts 0.0.2
:

Code: Select all

###############################################
##	Hack Title:		Disallow editing/deleting administrator posts
##	Hack Version:	0.0.2
##	Author:			Freakin' Booty ;-P
##	Website:		http://freakingbooty.no-ip.com
##	Description:	Moderators cannot edit nor delete posts by administrators.
##	Compatibility:	2.0.3 - 2.0.11
##
##	Installation Level: Easy
##	Installation Time: 5
##
##	Files To Edit: 3
##		modcp.php
##		posting.php
##		language/lang_english/lang_main.php
##
##	Included Files: 0
##
##	History:
##      0.0.1:	Initial release.
##		0.0.2:	Confirmed to be compatible with 2.0.5 and 2.0.6.
##
##	Author Notes:
##		To upgrade from 0.0.1 to 0.0.2, you have to do... nothing :D. This release is only to confirm
##		compatibility with 2.0.5 and 2.0.6.
##
##	Support:		http://www.phpbbhacks.com/forums
##	Copyright:		©2003-04 Freakin' Booty ;-P - Disallow editing/deleting admin posts 0.0.2
##
###############################################
##	You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
##	Please visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
##	This hack is released under the GPL License.
##	This hack can be freely used, but not distributed, without permission.
##	Intellectual Property is retained by the hack author(s) listed above.
###############################################

#
#-----[ OPEN ]--------------------------------------------
#
modcp.php

#
#-----[ FIND ]--------------------------------------------
#
# 2.0.3
#
switch( $mode )
{
	case 'delete':

#
#-----[ FIND ]--------------------------------------------
#
# 2.0.4 - 2.0.11
#
	case 'delete':
		if (!$is_auth['auth_delete'])
		{
			message_die(MESSAGE, sprintf($lang['Sorry_auth_delete'], $is_auth['auth_delete_type']));
		}

#
#-----[ AFTER, ADD ]--------------------------------------
#
		if( $userdata['user_level'] != ADMIN )
		{
			$topics_sql = ( isset($HTTP_POST_VARS['topic_id_list']) ) ? implode(',', $HTTP_POST_VARS['topic_id_list']) : $topic_id;
			$sql = "SELECT t.topic_id
					FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u
					WHERE u.user_id = t.topic_poster
						AND u.user_level = " . ADMIN . "
						AND t.topic_id IN ($topics_sql)";
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not retrieve topics list', '', __LINE__, __FILE__, $sql);
			}

			if( $db->sql_numrows($result) > 0 )
			{
				message_die(GENERAL_MESSAGE, $lang['Not_auth_edit_delete_admin']);
			}
		}

#
#-----[ OPEN ]--------------------------------------------
#
posting.php

#
#-----[ FIND ]--------------------------------------------
#
		if ( empty($post_id) )
		{
			message_die(GENERAL_MESSAGE, $lang['No_post_id']);
		}

#
#-----[ AFTER, ADD ]--------------------------------------
#
		if( $userdata['user_level'] != ADMIN && ($mode == 'editpost' || $mode == 'delete' || $mode == 'poll_delete') )
		{
			$sql = "SELECT u.user_level
					FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
					WHERE p.post_id = $post_id
						AND p.poster_id = u.user_id
						AND u.user_level = " . ADMIN;
			if( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not retrieve post information', '', __LINE__, __FILE__, $sql);
			}
			if( $row = $db->sql_fetchrow($result) )
			{
				message_die(GENERAL_MESSAGE, $lang['Not_auth_edit_delete_admin']);
			}
		}
#
#-----[ OPEN ]--------------------------------------------
#
# Make sure to edit this file for every language installed
#
language/lang_english/lang_main.php

#
#-----[ FIND ]--------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]-------------------------------------
#
//
// Disallow editing/deleting administrator posts
//
$lang['Not_auth_edit_delete_admin'] = 'You cannot edit/delete an administrator\'s posts, sorry.';

#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
I tried that MOD using using easymod, and i click process, then, 2 seconds later, it gives me this error: Error Detail

Code: Select all

Critical Error

FIND FAILED: In file [modcp.php] could not find:

case 'delete':
if (!$is_auth['auth_delete'])
{
message_die(MESSAGE, sprintf($lang['Sorry_auth_delete'], $is_auth['auth_delete_type']));
}

MOD script line #56 :: FAQ :: Report
 
MOD Data
MOD Title: 	Disallow editing/deleting administrator posts     0.0.2     Disallow editing_deleting administrator posts 0.0.2.txt
Author: 	Freakin' Booty ;-P            
Processed Themes: 	subSilver
Processed Languages: 	english
Files Edited: 	1
Commands Processed: 	2
Unprocessed Commands: 	0

The following commands were not recognized by EasyMOD and were ignored. The MOD script line number is displayed.
Unprocessed Commands

EasyMOD successfully processed the following commands:
Commands Processed
OPEN     #42

modcp.php

FIND     #47

switch( $mode )
{
	case 'delete':
It's not just that mod that gives me the error, i tried using 16 mods, and all of them have errors on it, different ones.

User avatar
darcie
Community Team
Community Team
Posts: 189
Joined: Mon Mar 12, 2007 7:32 pm
Location: Davis, California
Contact:

Re: EASYMOD MOD ERROR

Post by darcie »

Are you trying to use MODs created to be EasyMOD compatible and compatible with your forum? I haven't used EasyMOD in months, but I can see an immediate conflict there where you have gotten the error on this one. There are two FINDs right in a row, depending on which version of phpBB 2.0 you are using. This just wasn't written to auto-install. Maybe you'll have more luck with the phpBB.com validated MODs than ones on a separate site? ;)

User avatar
Lumpy Burgertushie
Registered User
Posts: 1006
Joined: Tue Feb 28, 2006 5:26 pm

Re: EASYMOD MOD ERROR

Post by Lumpy Burgertushie »

well, the problem is the two FINDS, but not because two FINDS in a row dont' work with easymod.

they do when used to position you in the correct place to find the next FIND.

however, in this case, the M OD writer has tried to make this work for older and newer versions of phpbb.

the first FIND is only if you have version 2.0.03 and the other is if you have later versions.

this will not work in easymod.

as Darcie says, the MODs/hacks you find at phpbbhacks.com and other places are not required to run in easymod or even expected to run in easymod.

by the way, this MOD is so simple , just do it by hand and you will be done in about 2 minutes
luck,
robert

getcha
Registered User
Posts: 1
Joined: Sun Nov 18, 2007 4:08 pm

Re: EASYMOD MOD ERROR

Post by getcha »

I sometimes also get messages like this...
and those are easymod compatible...

strange..

User avatar
Lumpy Burgertushie
Registered User
Posts: 1006
Joined: Tue Feb 28, 2006 5:26 pm

Re: EASYMOD MOD ERROR

Post by Lumpy Burgertushie »

getcha wrote:I sometimes also get messages like this...
and those are easymod compatible...

strange..
sometimes, if you have other MODs installed, then the code has been changed so easymod can't find what it is looking for.

also, if it is in the tpl files, then it can be because the style is not the same as subSilver.

all MODs are written for standard phpbb with standard subSilver. anything different may cause a find error.

robert

Locked