Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 11803
Latest: VXP
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 41605
Total Topics: 7273
Most Online Today: 98
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 56
Total: 56

Author Topic: Boards Icon  (Read 442 times)

0 Members and 1 Guest are viewing this topic.

Offline mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 72
    • View Profile
    • Database Dreams
Boards Icon
« on: September 18, 2021, 08:38:34 am »
Noticed That the boards Icon always shows as new items is there a way to change this.

https://www.databasedreams.co.uk/charts/index.php?action=forum

thanks mick

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15752
    • View Profile
Re: Boards Icon
« Reply #1 on: September 18, 2021, 12:45:37 pm »
Open themes/default/boardindex.template.php
Find
Code: [Select]
// Loop though each Classifieds Category

foreach ($context['classifieds_boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="icon windowbg" ' , !empty($board['subcats_linktree']) ? 'rowspan="2"' : '' , '><a href="', $scripturl, '?action=classifieds;cat=', $board['ID_CAT'], '">';

// If the board is new, show a strong indicator.

echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant'], '/on2.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';



Change to
Code: [Select]
// Loop though each Classifieds Category

foreach ($context['classifieds_boards'] as $board)
{
echo '
<tr class="windowbg2">
<td class="icon windowbg" ' , !empty($board['subcats_linktree']) ? 'rowspan="2"' : '' , '><a href="', $scripturl, '?action=classifieds;cat=', $board['ID_CAT'], '">';

// If the board is new, show a strong indicator.

echo '
<img src="', $settings['images_url'], '/' .$context['theme_variant'], '/on.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';


Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 72
    • View Profile
    • Database Dreams
Re: Boards Icon
« Reply #2 on: September 18, 2021, 01:28:17 pm »
Sorry didn't work Should there be a switch between the off and on image, I'm probably missing it lol

thanks mick

Offline mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 72
    • View Profile
    • Database Dreams
Re: Boards Icon
« Reply #3 on: September 18, 2021, 01:36:18 pm »
I might be able to addapt this from the same template.

Code: [Select]
if ($board['new'] || $board['children_new'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
// Is it a redirection board?
elseif ($board['is_redirect'])
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
// No new posts at all! The agony!!
else
echo '
<img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15752
    • View Profile
Re: Boards Icon
« Reply #4 on: September 18, 2021, 02:04:23 pm »
I would try off.png instead of on.png in my above code.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 72
    • View Profile
    • Database Dreams
Re: Boards Icon
« Reply #5 on: September 18, 2021, 02:11:00 pm »
lol did think of doing that, but wanted to see first thanks

Offline mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 72
    • View Profile
    • Database Dreams
Re: Boards Icon
« Reply #6 on: September 18, 2021, 02:13:43 pm »
Worked a treat thanks

 

Related Topics

  Subject / Started by Replies Last post
3 Replies
6469 Views
Last post May 28, 2006, 04:10:41 am
by gamesmad
3 Replies
7945 Views
Last post October 08, 2006, 12:11:23 pm
by SMFHacks
7 Replies
5025 Views
Last post October 20, 2010, 12:13:37 am
by SMFHacks
1 Replies
2550 Views
Last post February 01, 2011, 12:42:55 pm
by SMFHacks
3 Replies
1215 Views
Last post October 16, 2018, 03:08:00 pm
by SMFHacks

+- Recent Topics

How to change the font on a photo in SMF Gallery Pro? by SMFHacks
November 18, 2021, 09:28:11 am

Bulk Upload Many Pictures - File Name by SMFHacks
November 17, 2021, 08:58:50 am

Schedule or direct download link by SMFHacks
November 16, 2021, 10:57:33 am

Download Expire by Vincent Volmer
November 16, 2021, 02:40:47 am

prettyurls - TroubleShooting.wiki by SMFHacks
November 14, 2021, 02:18:59 pm

Error With Delete Download by mickjav
November 10, 2021, 04:49:12 pm

No ads on left or right by coyote
November 08, 2021, 04:57:13 pm

Now accepting Cryptocurrency by SMFHacks
November 05, 2021, 05:33:27 pm

Latest Version Pretty Urls SEO Pro by SMFHacks
November 04, 2021, 03:46:53 pm

Downloads Pro 6.0 Released by mickjav
November 03, 2021, 05:13:47 pm

Powered by EzPortal