Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11801
Latest: Dimon_1955
New This Month: 7
New This Week: 2
New Today: 1
Stats
Total Posts: 41510
Total Topics: 7264
Most Online Today: 47
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 48
Total: 49

Author Topic: Boards Icon  (Read 348 times)

0 Members and 1 Guest are viewing this topic.

Online mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 62
    • 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: 15709
    • 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/

Online mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 62
    • 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

Online mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 62
    • 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: 15709
    • 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/

Online mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 62
    • 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

Online mickjav

  • Badge Awards Customer
  • Jr. Member
  • *****
  • Posts: 62
    • 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
6424 Views
Last post May 28, 2006, 04:10:41 am
by gamesmad
3 Replies
7899 Views
Last post October 08, 2006, 12:11:23 pm
by SMFHacks
7 Replies
4977 Views
Last post October 20, 2010, 12:13:37 am
by SMFHacks
1 Replies
2530 Views
Last post February 01, 2011, 12:42:55 pm
by SMFHacks
3 Replies
1132 Views
Last post October 16, 2018, 03:08:00 pm
by SMFHacks

+- Recent Topics

prettyurls - TroubleShooting.wiki by SF
October 26, 2021, 04:39:52 pm

Stats Page by mickjav
October 19, 2021, 01:10:42 pm

Question (Gallery Pro) by mickjav
October 17, 2021, 11:59:10 am

Image View by SMFHacks
October 14, 2021, 11:55:21 am

From SMF Gallery Lite to SMF Gallery Pro by SMFHacks
October 11, 2021, 08:00:29 am

Picture Orientation by mickjav
October 09, 2021, 01:25:54 pm

4. Global Headers and Footers by mickjav
October 07, 2021, 12:22:09 am

S3 System For SMF Attachments by shuban
October 06, 2021, 07:58:50 am

Download Page images by mickjav
October 04, 2021, 01:28:07 pm

Agree To Licence by mickjav
October 03, 2021, 10:00:27 am

Powered by EzPortal