Trying to install user class MOD, got a strange error from E

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
Beavis&Butthead
Posts: 66
Joined: Wed Aug 09, 2006 3:03 am

Trying to install user class MOD, got a strange error from E

Post by Beavis&Butthead » Thu Jul 19, 2007 2:34 am

The Error:
Critical Error

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

$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';

MOD script line #861 :: FAQ :: Report
A snapshot of the part of the install.txt that EM appears to be having trouble with:

Code: Select all

#-----[ OPEN ]------------------------------------------
#
memberlist.php

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT username, user_id, user_viewemail
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowavatar
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_level
#
#-----[ FIND ]------------------------------------------
#
		$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
		// Start add - User Class Mod
		switch ( $row['user_level'] )
		{
			case ADMIN:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ($row['user_id'] == 2) ? ' style="color: #' . $theme['color_founder'] . '"' : ' style="color: #' . $theme['color_admin'] . '"';
				break;
			case MAIN_MOD:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ' style="color: #' . $theme['color_main_mod'] . '"';
				break;
			case MOD:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ' style="color: #' . $theme['color_mod'] . '"';
				break;
			case SUPPORT:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ' style="color: #' . $theme['color_support'] . '"';
				break;
			case VIP:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ' style="color: #' . $theme['color_vip'] . '"';
				break;
			case BOT:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ' style="color: #' . $theme['color_bot'] . '"';
				break;
			case USER:
				$username_color = '<strong>' . $username . '</strong>';
				$style_color = ' style="color: #' . $theme['color_user'] . '"';
				break;
			default:
				$username_color = $username;
				$style_color = '';
				break;
		}
		$username_color = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $user_id) . '"' . $style_color . '>' . $username_color . '</a>';
		// End add - User Class Mod
#
#-----[ FIND ]------------------------------------------
#
			'USERNAME' => $username,
#
#-----[ REPLACE WITH ]------------------------------------------
#
			'USERNAME' => $username_color,
#
#-----[ FIND ]------------------------------------------
#
			'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
#
#-----[ REPLACE WITH ]------------------------------------------
#
			//'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id")
			)

Thank you for any assistance that you can provide. Regards,

legwon
Registered User
Posts: 14
Joined: Sun Jan 15, 2006 12:07 am

Re: Trying to install user class MOD, got a strange error from E

Post by legwon » Fri Jul 20, 2007 12:08 pm


User avatar
Poomerio
Registered User
Posts: 552
Joined: Tue Jan 02, 2007 7:09 pm
Location: 4(x - 20y) = 20

Re: Trying to install user class MOD, got a strange error from E

Post by Poomerio » Tue Jul 24, 2007 8:52 pm

Open:
install.txt

Find:

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
      $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
Replace With:

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
['Search_user_posts']
Save, upload and try again.

- Poomie

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

Re: Trying to install user class MOD, got a strange error from E

Post by Kevin Clark » Tue Jul 24, 2007 9:49 pm

That'll make a right mess.

It's got to go after the . '</a>'; at the end of the line.
Your change would put the add code before it.

Change the FIND line to

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
$lang['Search_user_posts'] . '</a>';
Image

Beavis&Butthead
Posts: 66
Joined: Wed Aug 09, 2006 3:03 am

Re: Trying to install user class MOD, got a strange error from E

Post by Beavis&Butthead » Wed Jul 25, 2007 3:48 am

Kevin:

Tried your suggestion, got this....
Critical Error

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

$lang['Search_user_posts'] . '</a>';

MOD script line #861 :: FAQ :: Report

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: Trying to install user class MOD, got a strange error from E

Post by Nightrider » Wed Jul 25, 2007 5:09 am

Kevin Clark wrote:That'll make a right mess.

It's got to go after the . '</a>'; at the end of the line.
Your change would put the add code before it.
Actually you are incorrect Kevin. AFTER, ADD commands place the code on the next line after the line of code found by EM. Targeted additions require the use of IN-LINE FIND and IN-LINE AFTER, ADD, IN-LINE BEFORE, ADD, and IN-LINE REPLACE WITH commands. So the FIND can be any unique part of the line. It doesn't have to be nearly as specific as you claimed. Poomie's suggestion was perfectly acceptable as long as it wasn't so vague that there could have been an invalid match prior to the specified line from the original FIND...

Image

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

Re: Trying to install user class MOD, got a strange error from E

Post by Kevin Clark » Wed Jul 25, 2007 8:08 am

Not in my personal experience but I just wanted to make sure he didn't get more errors, as you say, from that bit of code being in more than one place. It also assumes that all of that code is indeed on one line, which it might not be.

Code: Select all

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

$lang['Search_user_posts'] . '</a>';
Then you'll have to do it by hand or find the exact line that you have in your memberlist.php file.
Either the MOD is old and that bit of code is now different or you have another MOD already there that's changed that line.
Image

User avatar
Poomerio
Registered User
Posts: 552
Joined: Tue Jan 02, 2007 7:09 pm
Location: 4(x - 20y) = 20

Re: Trying to install user class MOD, got a strange error from E

Post by Poomerio » Wed Jul 25, 2007 10:53 am

Well try my original suggestion; perhaps that would bring you more luck.
NR is right in saying that any part of the line can be used in a FIND command, as long as it is unique to the line, and cannot be found anywhere else.

- Poomie

Beavis&Butthead
Posts: 66
Joined: Wed Aug 09, 2006 3:03 am

Re: Trying to install user class MOD, got a strange error from E

Post by Beavis&Butthead » Wed Jul 25, 2007 6:37 pm

Hi Poomie.....

Thank you so much for your help so far, it is really appreciated. It is letting me install the MOD, however, I get another couple errors:
Error Detail

Warning

FIND FAILED: In file [templates/AcidTechBlood/index_body.tpl] could not find:

<td class="row1" align="center" valign="middle" rowspan="{%:1}">

MOD script line #2906 :: FAQ :: Report


Error Detail

Warning

FIND FAILED: In file [templates/AcidTechBlood/privmsgs_body.tpl] could not find:

<td width="20%" valign="middle" align="center" class="{listrow.ROW_CLASS}"><span class="name">&nbsp;<a href="{listrow.U_FROM_USER_PROFILE}" class="name">{listrow.FROM}</a></span></td>

MOD script line #3009 :: FAQ :: Report

Locked