News:

Wondering if this will always be free?  See why free is better.

Main Menu

Forum will not load after change of subs.php file

Started by spamanfire, July 12, 2010, 05:57:41 PM

Previous topic - Next topic

spamanfire

HI,,our forum was working fine and I wanted to add another button to our menu,,I found info abouit how to do it...I went up to the server and followed the instructions..now the forum will not load.,..help...

I changed some code in the sources /subs.php...can I just upload the file again and take care of it...


Bill

ɔɔɔɔɔɔuɥoɾ

So which code did you change or add, which line was it on, about?

You can also add your subs.php file, I can check it for possible parse errors


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

spamanfire

Ok, I thank you...whatever I need to do to get it running again..

  'home' => array(
            'title' => $txt['home'],
            'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
            // 'target' => '_blank',
         ),

located down at the bottom of the subs.php file...do

spamanfire

I added some code but have since removed it,,,right above the        'is last'=> context and        below       sub buttons'=>array(

hopefully this will help...if you need anything else just let me know...Bill

spamanfire

I can also email you the subs.php file if that will help....

CapadY

Quote from: spamanfire on July 12, 2010, 06:44:14 PM
Ok, I thank you...whatever I need to do to get it running again..

  'home' => array(
            'title' => $txt['home'],
            'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
            // 'target' => '_blank',
         ),

located down at the bottom of the subs.php file...do

As far as I can see there is nothing wrong with these code.

Maybe you can better ATTACH your subs.php file for a complete overview of that file. So, not email, just attach with a posting here on the forum.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

ɔɔɔɔɔɔuɥoɾ

  'home' => array(
            'title' => $txt['home'],
            'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
            // 'target' => '_blank',
         ),

After this, before the next button code array begins, there should be 2 more sets of      "  ),   " before you see any more code.

Anywho, attach the file so it can be checked thoroughly


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

spamanfire

Ok, let me know how to attach an attachment..I dont see any attachment button sorry....Bill

spamanfire

Do I need to do anything else with the file,,,I changed it on the server,,,does smf read the subs.php from there? Do I need to copy it anywhere else?

ɔɔɔɔɔɔuɥoɾ

Instead of using the "Quick Reply", click reply below here, then click the + button on the left side of "Additional Options..." then you can see where you can add an attachment.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers



ɔɔɔɔɔɔuɥoɾ

#12
Your parse error is caused here:

function getLegacyAttachmentFilename($filename, $attachment_id, $dir = null, $new = false)
{
   global $modSettings;

SaveCancelClose;   // Remove special accented characters - ie. s?   $clean_name = strtr($filename, ' ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? , 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
   $clean_name


There are several parse errors after that too, probably caused by that one

Let me see what I can do about this.

Checking a clean copy of subs.php it seems to be different, Which SMF version are you using?

Lime Green Color = Where invalid or missing char caused a parse error


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers


ɔɔɔɔɔɔuɥoɾ

#14
If your using SMF 2 RC3, download and try this attachment.

I relpaced

SaveCancelClose // Remove special accented characters - ie. s? $clean_name = strtr($filename, '???????????????????????????, 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
$clean_name = strtr($clean_name, array('? => 'TH', '?' => 'th', '? => 'DH', '?> 'dh', '? => 'ss', '?' => 'OE', '?' => 'oe', '? => 'AE', '?=> 'ae', '?' => 'u'));


With


// Remove special accented characters - ie. sí.
$clean_name = strtr($filename, 'ŠŽšžŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝàáâãäåçèéêëìíîïñòóôõöøùúûüýÿ', 'SZszYAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy');
$clean_name = strtr($clean_name, array('Þ' => 'TH', 'þ' => 'th', 'Ð' => 'DH', 'ð' => 'dh', 'ß' => 'ss', 'Œ' => 'OE', 'œ' => 'oe', 'Æ' => 'AE', 'æ' => 'ae', 'µ' => 'u'));


It seems possible that a you or a mod may have changed something here, so If any mods are not working correctly after this, tell me which mod it is and I will see.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

spamanfire

can I just upload it to the server on top of the old one?

ɔɔɔɔɔɔuɥoɾ

Quote from: spamanfire on July 12, 2010, 07:42:17 PM
can I just upload it to the server on top of the old one?

Backup the old one 1st, I know it makes no sense, since its not working anyway, but you should always have a habit of backing up before making changes.

Then yes, overwrite.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

spamanfire

Your the man.....wow,,,you saved me from getting murdered.......now I can breathe again....thanks alot....Bill ;D ;D ;D ;D ;D

ɔɔɔɔɔɔuɥoɾ

Quote from: spamanfire on July 12, 2010, 07:55:14 PM
Your the man.....wow,,,you saved me from getting murdered.......now I can breathe again....thanks alot....Bill ;D ;D ;D ;D ;D

Your welcome, glad to help.

Remember to check your error log and check to make sure all your mods are working correctly.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

spamanfire


Advertisement: