SMF Support > SMF 1.1.x Support

FIXED: How do I change the default template from the cpanel ? Site is down.

(1/2) > >>

sammy1028:
 How do I change the default template from the cpanel ? I was getting a PARSE ERROR after changing a few lines of code, so I tried to figure it out, and thought I had it, but no such luck.
 My site is www.indianainfo.net/newforum/index.php   and I'm using 1.1.7
When-ever I go to my site now I get the below, and that's all it shows.
______________________________________________________________________

The main sub template above the content. function template_main_above() { global $context, $settings, $options, $scripturl, $txt, $modSettings; // Show right to left and the character set for ease of translating. echo '

', empty($context['robot_no_index']) ? '' : ' ', '

'; // The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly. echo ' '; /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...) Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual. Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big. Standards compliance mode happens when you use xhtml... */ if ($context['browser']['needs_size_fix']) echo ' '; // Show all the relative links, such as help, search, contents, and the like. echo ' '; // If RSS feeds are enabled, advertise the presence of one. if (!empty($modSettings['xmlnews_enable'])) echo ' '; // If we're viewing a topic, these should be the previous and next topics, respectively. if (!empty($context['current_topic'])) echo ' '; // If we're in a board, or a topic for that matter, the index will be the board's index. if (!empty($context['current_board'])) echo ' '; // We'll have to use the cookie to remember the header... if ($context['user']['is_guest']) { $options['collapse_header'] = !empty($_COOKIE['upshrink']); $options['collapse_header_ic'] = !empty($_COOKIE['upshrinkIC']); } // Output any remaining HTML headers. (from mods, maybe?) echo $context['html_headers'], ' '; // the routine for the info center upshrink echo '

'; echo '
'; if (!empty($context['user']['avatar'])) echo '
'.$context['user']['avatar']['image'].'
'; if ($context['user']['is_logged']){ echo '', $txt['hello_member'], ' ', $context['user']['name'], '
'; // Only tell them about their messages if they can read their messages! if ($context['allow_pm']) echo $txt[152], ' ', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.
'; echo '', $txt['unread_since_visit'], '
', $txt['show_unread_replies'], '
';} // Now, onto our second set of info, are they logged in again? if ($context['user']['is_logged']) { // Is the forum in maintenance mode? if ($context['in_maintenance'] && $context['user']['is_admin']) echo '', $txt[616], '
'; // Are there any members waiting for approval? if (!empty($context['unapproved_members'])) echo '', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' ', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], ' ', $txt['approve_members_waiting'], '
'; echo '
'; } // Otherwise they're a guest - this time ask them to either register or login - lazy bums... else { echo ' ', $txt['welcome_guest'], '
', $txt[35], ' : ', $txt[36], ' :
', $context['current_time'],'
'; } echo '
'; echo '
'; echo '
'; // Search within current topic? if (!empty($context['current_topic'])) echo ''; // If we're on a certain board, limit it to this board ;). elseif (!empty($context['current_board'])) echo ''; echo '
'; echo '
'; // Show a random news item? (or you could pick one from news_lines...) if (!empty($settings['enable_news'])){ echo '

', $txt['102'], ' ', $context['random_news_line'], '
';} echo ' '; echo '
',template_menu(),'
'; }Unable to load the 'main_above' template.

Kindred:
1- please use code tags
2- it looks like you messed up your index.template.php

If you don't have any mods installed, then get a copy of the SMF distribution archive (I suggest "large upgrade" package) and over-write your site files with the files from that archive.

sammy1028:
 I've got several mods installed. I would also worry about losing my members, or member list if I did it that way.
 How about if you can tell me how to re-do this from my back-up files. I have things backed up, just don't know how to use them.
  Coding is not one of my stronger points, and that's why I got in this mess anyway.
Thank you Kindred

Kindred:
well, you won't lose any messages or users. All of that data is in the database - not in files.

If you have a backed up copy of your site, then either a) restore everything or b) restore the file index.template.php to your theme directory.

if all else fails, you can do the file overwrite and reinstall the mods.

sammy1028:
How do I do the restore. I've tried it a couple different ways, but nothing seems to work.
Could be I'm not in the right place. I found my back-ups in the package manager and tried to move them to the index.template.php  But when I looked I couldn't find them.
 How do I overwrite the files ? I've never done this before so please be as specific as you can. I'm trying, but not exactly sure what I'm doing.
  Also, is it alright to delete old back-up files ? I found lots of them that go back to 2008. I've never been in these files before today.

Ok, I just downloaded 2.0.2 and have it in my files. So how do I get it to work ? I didn't see anyway to activate it and don't know what to do next.
Thanks

Navigation

[0] Message Index

[#] Next page

Go to full version