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
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
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
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
I can also email you the subs.php file if that will help....
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.
'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
Ok, let me know how to attach an attachment..I dont see any attachment button sorry....Bill
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?
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.
OK,,THANKS ALOT....
This is where I got the info for adding a button.....
http://www.simplemachines.org/community/index.php?topic=261880.0
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
2.0 RC3
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.
can I just upload it to the server on top of the old one?
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.
Your the man.....wow,,,you saved me from getting murdered.......now I can breathe again....thanks alot....Bill ;D ;D ;D ;D ;D
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.
Ok will do......thanks again....Bill