SMF Shop

SMFShop => Installation Problems => Topic started by: Greyhound on August 13, 2007, 11:28:09 pm

Title: [SOLVED] Error installing CSS Name Display
Post by: Greyhound on August 13, 2007, 11:28:09 pm
I got this error when trying to install the CSS name display mod.

Quote
1. Extract File ./Sources/shop/items/ChangeDisplayNameCSS.php 
2. Extract File ./Sources/shop/items/ResetDisplayNameCSS.php 
3. Execute Modification ./Sources/Load.php Test failed
4. Execute Modification ./Sources/MessageIndex.php Test failed

5. Execute Modification ./Sources/BoardIndex.php Test successful
6. Execute Code installScript.php

I am almost certain that it's because of the member link mod that I have installed.  Unfortunately I can't uninstall the member link mod.  There isn't an uninstall prompt and I assume it happened after the latest update to 1.1.3. 

Any ideas on what I need to do? 

Thanks!
Title: Re: Error installing CSS Name Display
Post by: inkstains on August 14, 2007, 01:53:40 pm
if it were me i'd download those two files that fail "Load.php" and "MessageIndex.php" and make the following edits to the respective file

In Load.php

Find:

Code: [Select]
AS post_group, mem.is_activated
Add after:

Code: [Select]
, mem.shop_nameStyle

Find:

Code: [Select]
pg.stars, mg.stars) AS stars
Add after:

Code: [Select]
, mem.shop_nameStyle

Find:

Code: [Select]
// What a monstrous array...
Add before:
 
   
Code: [Select]
// --- Begin modification - Display Name CSS item ---
$profile['name_style'] = (!empty($profile['shop_nameStyle'])) ? ('style=\'' . str_replace('\'', '', $profile['shop_nameStyle']) . '\' ') : '';
// --- End modification


In MessageIndex.php

Find:

Code: [Select]
ml.smileysEnabled AS lastSmileys
Add after:
Code: [Select]
, memf.shop_nameStyle

Find:

Code: [Select]
'link' => !empty($row['firstID_MEMBER']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstDisplayName'] . '">' . $row['firstDisplayName'] . '</a>' : $row['firstDisplayName']
Replace with:
                                         
Code: [Select]
  // Edited for Display Name CSS item
'link' => !empty($row['firstID_MEMBER']) ? '<a ' . ((!empty($row['shop_nameStyle'])) ? ('style=\'' . str_replace('\'', '', $row['shop_nameStyle']) . '\' ') : '') . 'href="' . $scripturl . '?action=profile;u=' . $row['firstID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['firstDisplayName'] . '">' . $row['firstDisplayName'] . '</a>' : $row['firstDisplayName']


Find:
      
Code: [Select]
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>',
Replace with:

Code: [Select]
// Modified for Display Name CSS item
'link' => '<a ' . $profile['name_style'] . 'href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '">' . $profile['realName'] . '</a>',
 


Then go through with the install and once it's done just upload the new Load.php and MessageIndex.php file you edited overwriting the old ones.
Title: Re: Error installing CSS Name Display
Post by: Dark_Zero on August 15, 2007, 12:04:23 pm
 ;D that's what i always do.
btw what exactly causes these errors? that don't let mods write to the files? is it a chmod problem? thnx
Title: Re: Error installing CSS Name Display
Post by: Daniel15 on August 18, 2007, 01:07:52 pm
The errors are usually caused by conflicting mods.  For example, the member link mod most likely edits the member link, which this mod also edits (the last two edits).

If they've already been edited, do these alternate edits for the last two above:
Code: [Select]
'link' => !empty($row['firstID_MEMBER']) ? '<a href="'and replace it with
Code: [Select]
'link' => !empty($row['firstID_MEMBER']) ? '<a ' . ((!empty($row['shop_nameStyle'])) ? ('style=\'' . str_replace('\'', '', $row['shop_nameStyle']) . '\' ') : '') . 'href="'
also, find:
Code: [Select]
'link' => '<a href="'And replace it with:
Code: [Select]
'link' => '<a ' . $profile['name_style'] . 'href="'
Title: Re: Error installing CSS Name Display
Post by: Dark_Zero on August 19, 2007, 03:40:11 pm
thanks man you help out a lot ;D