Customizing SMF > SMF Coding Discussion
Show unread posts/Show new replies.
ROGUE-Master:
I'm using an older version of the SMF template and I'm trying to put the "Show unread posts since last visit." and "Show new replies to your posts." functions in my template. I've been searching through the files and I cannot find the function so I can copy/paste it where it needs to be. Could you tell me what file in my themes folder where these functions are located, and if you could copy/paste them here I would appreciate it.
Spaceman-Spiff:
You can add something like the following into index.template.php:
--- Code: --- echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';/
--- End code ---
ROGUE-Master:
I got this error when I did that:
"Template Parse Error!
There was a problem loading the /Themes/ROGUE/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly."
Did you forget something in your code?
[Unknown]:
If this doesn't work:
--- Code: --- echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
--- End code ---
Please try:
--- Code: --- <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a><br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />
--- End code ---
-[Unknown]
ROGUE-Master:
When I did that it doesn't work probably because I am forgetting to add something else. Sorry I'm a PHP newbie could someone post what else I need to add before and after the code besides the "echo '"
Navigation
[0] Message Index
[#] Next page
Go to full version