Hello Guest
No Avatar
Sign In to Remove
Posts: 
10
Reputation: 
0
Posted: December 9, 2011, 10:59 AM
  • Group: Member
How would I go about putting a link to the Recent Unread Topics (similar to the Recent Posts link at the bottom of the skin, but I'd like topics and not posts) at the top of the skin, underneath the Personal Messages links?
Posts: 
400
Reputation: 
20
Posted: December 10, 2011, 3:20 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
1
Reputation: 
0
Posted: March 12, 2012, 10:28 PM
  • Group: Member
Posts: 
400
Reputation: 
20
Posted: March 13, 2012, 1:41 AM
  • Group: Administrator
  • AIM: mlm@visualpulse.net
  • deviantART: MadLittleMods
  • Photobucket: MadLittleMods
It did not work the MOD.  Any solution?

Thanks!

Well, if it isn't a feature to begin with then I can not just fabricate it for you...

Do you know if this page exists?

Here is a topic on the subject though:
http://docs.simplemachines.org/index.php?topic=1485.0
<3 Nerve, Sk8, Labradoodle, Austin
Posts: 
7
Reputation: 
2
Posted: March 20, 2012, 3:40 AM  -- Last Edit: March 20, 2012, 3:42 AM by sCeege
  • Group: Member
A slight rant on SMF: coming over from phpBB, I can't tell you how simple SMF is to use and customize. One of my favorite things about it is the ability to link features and settings in a webpage/post, and having fuctional dynamic information fed back to the person clicking the link. Anyways, for your particular problem, all you need to find the section of the template/index you want to make an edit to, and use the ?action=Unread feature.

So for example, if your SMF forum is http://website.com/forum/index.php , http://website.com/forum/index.php?action=Unread would display a page with a list of unread topics, so just make a link to it.

I'm also using the Vertex theme on my forum, with a few personal modifications, including adding a link to Unread posts.

Before I begin, just want to give props to MLM for making an awesome theme, as well as thank him/her for a well documented template. I have literally no training in PHP, much less SMF, so I couldn't of made nearly as many edits as I wanted to without the comments included in his/her theme file.

Now that's out of the way:
If you navigate to the root folder of the Vertex theme, open index.template.php
Scroll down to about line 225, or find this phrase in the file :
Code: [Select]
// If the user is logged in, display stuff like their name, new messages, etcand look below that line.

I don't know what the originals are anymore, it was originally all on one line if I recall correctly, and I put mine on different lines so I can see what's going on, and here's what it looks like in mine:
Code: [Select]
// If the user is logged in, display stuff like their name, new messages, etc. David-Addition: View New Posts
if ($context['user']['is_logged'])
{
echo '
', $txt['vp_help'] ,'
', $context['user']['name'], '
', $txt['bar_symbol'] ,' <a href="', $scripturl ,'?action=pm">', $txt['view_inbox'] ,'</a> ', $txt['bar_symbol'] ,' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], '
', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], '
', $context['user']['unread_messages'], '
', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] ,'.
', $txt['bar_symbol'] ,' <a href="', $scripturl ,'?action=unread">', $txt['view_unread_category'] ,' since your last visit</a>.
';
}
the next word in the line should be "else{echo...", so if you've pasted past that, you've gone too far.

By the way, the edit is actually really small, this should be the only additional code that wasn't included in the original file:
Code: [Select]
$txt['bar_symbol'] ,' <a href="', $scripturl ,'?action=unread">', $txt['view_unread_category'] ,' since your last visit</a>.
'

Hoped that helped, and hope you can sort of derive how to make your own edits for other stuff based on this.

anything