EM>> error after installing a mod.

Want to share what MODs you've gotten to work with EM? Happy about all the time your're saving? Want to say "thanks"? Here's the place.
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
User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

EM>> error after installing a mod.

Post by Nux »

Here's my problem. I've made a MOD. It's quite simple, but never mind that. I wanted to test it with EasyMOD and everything was cool (checked the preview) but when I installed my MOD using download (I've done it on a local server - that is my computer), that file contained "EM>>". I've found out that it's that way when EM marks an error, but everything was OK with preview mode. Here's a part of the code:

Code: Select all

#
#------------------[ OPEN ]------------------
#
templates/subSilver/viewtopic_body.tpl

#
#------------------[ FIND ]------------------
#
# The upper part of links.
#
	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
  </tr>

#
#------------------[ IN-LINE FIND ]------------------
#
->
#
#------------------[ IN-LINE REPLACE WITH ]------------------
#
<br/>&nbsp;&nbsp;&nbsp;<a class="nav" href="{U_VIEW_CATEGORY}">{CATEGORY_NAME}</a> ->

#
#------------------[ FIND ]------------------
#
# The lower part of links.
#
	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
	<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span> 

#
#------------------[ IN-LINE FIND ]------------------
#
->
#
#------------------[ IN-LINE REPLACE WITH ]------------------
#
<br/>&nbsp;&nbsp;&nbsp;<a class="nav" href="{U_VIEW_CATEGORY}">{CATEGORY_NAME}</a> ->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
I also wanted to use "IN-LINE BEFORE, ADD", but this stripping thing didn't allow me that. Kinda off my own topic, but maybe the only thing to stripp should be '\r\n'?

Any way I've finally manage to do it with plain REPLACE WITH, but I was already advised to use IN-LINE with MOD validator :roll:.
Last edited by Nux on Wed Jun 15, 2005 2:50 pm, edited 1 time in total.

User avatar
GPHemsley
Registered User
Posts: 1617
Joined: Fri Apr 18, 2003 4:01 am
Location: Long Beach, NY
Contact:

Re: EM>> error after installing a mod.

Post by GPHemsley »

Make sure you're using the latest version of EasyMOD. Also, make sure your MOD conforms to the phpBB.com MOD standards. (Among other things, test it with the MOD Syntax Validator.)

User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: EM>> error after installing a mod.

Post by Nux »

Done all that (including the new version of EM). I've found were is the problem located:
admin_easymod.php

Code: Select all

if (($mode == 'display_file') || ($mode == 'download_file'))
	{
		// if we have a file open, close it now
		if (!$exec_close)
		{
			// if we haven't dumped the find_array, then do it now
			if (count($find_array) != 0)
			{
				//   also, see if we need to write the lines in preview format
				$do_preview = (strstr($commands[$i-1]['command'], 'IN-LINE')) ? true &#58 false ;
				write_find_array( $find_array, $file_list, $do_preview) ;	/* -=- LINE 2173 -=- */
			}

			// not likely a close error will be thrown
			complete_file_reproduction( $file_list) ;
		}
	
		/* -=- ... -=- */
	}
You see I tested my code in download mode, because I used it on my mashine. Tested it again after changing rights of all dirs and files and changing to copy mode and everything was fine.

So finally I've found that some how write_find_array gets executed in preview mode on line 2173, but I belive it shouldn't. Is this a bug? Not really sure.

User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: EM>> error after installing a mod.

Post by Nux »

Anyone?

Sorry for bumping, but I'm waiting with reuploading this MOD into MOD DB. I'm just looking for an advice if I should use the IN-LNIE actions and be worried that someone with similar settings as I had will get bogus files, or give this nasty awful REPLACE statement ;).

User avatar
Nux
Registered User
Posts: 943
Joined: Tue Jun 14, 2005 5:09 pm
Location: 3cities, Poland
Contact:

Re: EM>> error after installing a mod.

Post by Nux »

It's still there :? ...

Aparently noone is intrested in fixing this in some way, but if anyone will then the full versions of working MODs are here:

http://www.bookcrossing.pl/forum/ekstra ... _1.0.1.zip" target="_blank

- Version 1.0.1a - doesn't work for download mode in EasyMOD.
- Version 1.0.1b - works also for download mode, but doesn't use nicer IN-LINE statements

Any help in fixing this (if it's my fault), would be greatly appreciated :).

PS: Tryed IN-LINE fix - doesn't work :?

Locked