Customizing SMF > SMF Coding Discussion
Template parse error on pm number installing
(1/1)
TiPsY:
Greetings everybody, I've burned my eyes out to fix this one but still can't figure out what's wrong
Here's the code (on /Themes/default/index.template.php and any other theme)
--- Code: (find) --- echo '
<ul>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
--- End code ---
--- Code: (replace) --- echo '
<ul>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' <li>' . $txt['hhypm1'] . ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ' . $txt['hhypm2'] . '</a> ' . $txt['hhypm3'] . ' <a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'], '</a> ' . $txt['hhypm4'] . '</li>';
echo ' <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
--- End code ---
Here are the English texts on modifications.english
--- Code: ---$txt['hhypm1'] = 'You have';
$txt['hhypm2'] = 'Private Messages';
$txt['hhypm3'] = '';
$txt['hhypm4'] = 'new';
--- End code ---
I can normally install this, yet again there's another line on my forum that I need to be kept
Here's the current code on my index.template
--- Code: ---echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
--- End code ---
Whatever I change I get the following error upon refresh
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.
You can also try refreshing this page.
Any help would be appreciated!
mashby:
Maybe this?
--- Code: ---echo '
<p class="avatar">', $context['user']['avatar']['image'], '</p>';
echo '
<ul class="reset">
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>';
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo ' <li>' . $txt['hhypm1'] . ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ' . $txt['hhypm2'] . '</a> ' . $txt['hhypm3'] . ' <a href="', $scripturl, '?action=pm">', $context['user']['unread_messages'], '</a> ' . $txt['hhypm4'] . '</li>';
echo ' <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
--- End code ---
To replace your existing code that you provided last.
TiPsY:
--- Quote from: mashby on August 01, 2012, 09:18:53 PM ---Maybe this?
To replace your existing code that you provided last.
--- End quote ---
Thanks, it worked!
Navigation
[0] Message Index
Go to full version