Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4215
Latest: Proxitane
New This Month: 6
New This Week: 1
New Today: 1
Stats
Total Posts: 42796
Total Topics: 7456
Most Online Today: 34
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 44
Total: 44

Author Topic: Boards Icon  (Read 821 times)

0 Members and 1 Guest are viewing this topic.

Offline mickjav

  • Full Member
  • ***
  • Posts: 141
    • 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

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16235
    • 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

  • Full Member
  • ***
  • Posts: 141
    • 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

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline mickjav

  • Full Member
  • ***
  • Posts: 141
    • 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'], '" />';

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16235
    • 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

  • Full Member
  • ***
  • Posts: 141
    • 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

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline mickjav

  • Full Member
  • ***
  • Posts: 141
    • View Profile
    • Database Dreams
Re: Boards Icon
« Reply #6 on: September 18, 2021, 02:13:43 pm »
Worked a treat thanks

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

 

Related Topics

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

+- Recent Topics

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Permissions query by davejo
March 26, 2023, 04:43:48 am

prettyurls - TroubleShooting.wiki by SMFHacks
March 25, 2023, 01:49:35 pm

Download Gallery Option by SMFHacks
March 23, 2023, 09:34:02 am

Lost attachments by pete
March 22, 2023, 10:24:17 am

Additional Permissions by mickjav
March 18, 2023, 05:21:23 am

[Mod]Discord Web Hooks by SMFHacks
March 17, 2023, 08:48:30 am

Site upgrade to 2.1 by SMFHacks
March 12, 2023, 08:51:19 am

Theme/CSS design wanted by mickjav
March 11, 2023, 12:10:11 pm

Category Images by Anmer
March 10, 2023, 06:20:04 am

Powered by EzPortal