News:

Wondering if this will always be free?  See why free is better.

Main Menu

Unread Posts Link

Started by Gatlin1, May 21, 2010, 10:40:21 AM

Previous topic - Next topic

ARG01

Any idea on how to get rid of the "Unread Posts" link that at the top right of each board Category? I removed it from default/Languages/index.english.php but it's still showing. Cannot find it in any other file.

;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

NanoSector

It's part of SMF so I think it cannot be removed
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

ARG01

I am sure it can be removed. Anything file can be edited to add or remove elements but I just cannot seem to locate it.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

NanoSector

Quote from: G1 on May 21, 2010, 11:06:32 AM
I am sure it can be removed. Anything file can be edited to add or remove elements but I just cannot seem to locate it.  ;)
Did you look into the Index.php? I'm sure it will not be far away from the top.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

live627

Look in ./themes/default/index.template.php

Which theme do you use?

Search for <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li> and replace it with <!-- <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li> -->

ARG01

@ live627. I am using Curve for the moment. Your solution had no effect but I appreciate the try.  ;)

@ Yoshi, the index.php only contains this:

<?php

// Try to handle it with the upper level index.php. (it should know what to do.)
if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
include (dirname(dirname(__FILE__)) . '/index.php');
else
exit;

?>
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

live627

There are two links at the top of the forum

# Show unread posts since last visit.
# Show new replies to your posts.

You want to remove the top one? What happens if you delete the code snippet I posted above? Also note you need to do that for each custom theme you plan on using

ARG01

No, I need to remove this Unread Posts link.



;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Allusion

Themes/default/BoardIndex.template.php
Code (Find) Select

if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';


Remove those 3 lines, or comment them out by replacing them with:

/*
if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';
*/

ARG01

Thanx Allusion, much appreciated.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

ARG01

Hey Allusion, I have one more for you. I also need to remove the Last Post link that shows while viewing a category.



;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Allusion

Themes/default/MessageIndex.template.php
Code (Find) Select

// Show a "select all" box for quick moderation?
if (empty($context['can_quick_mod']))
echo '
<th scope="col" class="smalltext last_th" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
else
echo '
<th scope="col" class="smalltext" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';

Code (Replace with) Select

// Show a "select all" box for quick moderation?
if (empty($context['can_quick_mod']))
echo '
<th scope="col" class="smalltext last_th" width="22%"></th>';
else
echo '
<th scope="col" class="smalltext" width="22%"></th>';


If the replacement code doesn't work well in some browsers, try this instead:

// Show a "select all" box for quick moderation?
if (empty($context['can_quick_mod']))
echo '
<th scope="col" class="smalltext last_th" width="22%">&nbsp;</th>';
else
echo '
<th scope="col" class="smalltext" width="22%">&nbsp;</th>';

ARG01

Ok, I'll give it a whirl. Thanx.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

ARG01

Success. Thanx again Allusion.  ;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Deezel

Is it possible to remove the whole section below the "Unread Posts" completely?

Aleksi "Lex" Kilpinen

G1, happy to see you got it sorted out, I'll mark this topic solved.

Quote from: deezel on October 05, 2010, 09:30:56 PM
Is it possible to remove the whole section below the "Unread Posts" completely?

Anything is possible, but I suggest you start a new topic for your question. :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: