Different board Icons

Started by memo, March 15, 2004, 08:29:55 AM

Previous topic - Next topic

Gary

on.gif > New Posts in Parent Board
on2.gif > New Posts in Child Board
off.gif > No New Posts

-AwwLilMaggie
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

SleePy

Oh:
Want to add to the tip..
This really helped me..
I tweaked it some more and helped a lot..


// If the board is new, show a strong indicator.
if (in_array($board['id'], array(9,10,84,89,95,153)))
{
if ($board['new'])
echo '<img src="', $settings['images_url'], '/custboard/'.$board['id'].'.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/custboard/'.$board['id'].'.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
else
echo '<img src="', $settings['images_url'], '/topic/custom/'.$board['id'].'_off.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
}
else
{
if ($board['new'])
echo '<img src="', $settings['images_url'], '/onpost.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/onpost.gif" alt="', $txt[333], '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/offpost.gif" alt="', $txt[334], '" title="', $txt[334], '" />';
}


I put my custom images in another folder. so if you want to use this and dont want to use custboard as the folder change it in the coding..
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

VegasBoxers

Quote from: Kindred on September 06, 2005, 03:14:55 PM

replace it with this code:
// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on_' . $board['id'] . '.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2_' . $board['id'] . '.gif" alt="', $txt[333], '" title="', $txt[333], '" border="0" />';
// No new posts at all!  The agony!!
else
echo '<img src="', $settings['images_url'], '/off_' . $board['id'] . '.gif" alt="', $txt[334], '" title="', $txt[334], '" border="0" />';

I used Kindred's code after creating 45 icons for my 15 boards and it worked.  BUT... When I click on a parent board, and the page reloads to show just it and it's children, my icons no longer show.

Take a look at the forum: http://www.german-pride.com/SMF/  (It a Vintage Volkswagen based site.  NOT NeoNazi Racists! :D)

Can you help me?

THANKS!
VB

Bigguy

Try making an off2_10.gif and an on2_10.gif that might work, or have you got those already.

VegasBoxers

Quote from: Bigguy on September 15, 2006, 01:29:52 AM
Try making an off2_10.gif and an on2_10.gif that might work, or have you got those already.

I have a 10th board and it's icons are on_10.gif, on2_10.gif, & off_10.gif

Was your suggestion of "off2_10.gif" a typo, or do I need some off2_##.gif files too?

THANKS!
VB

Bigguy

I would try that and see if they show up. Just make an off2_10.gif, see what that does.

VegasBoxers

Quote from: Bigguy on September 15, 2006, 01:43:42 AM
I would try that and see if they show up. Just make an off2_10.gif, see what that does.

I'll have to give it a shot tomorrow.  I'm not sure what that would do though?

Did you go to my site and view the icons and then click on "Beetle Galleries" for example?  It will show all the child boards without their assigned icons.  It reverts back to theme default icons.   :(

Thanks!
VB

Bigguy

Yes I did see that. Did you try what I suggested. ???

VegasBoxers

I got a chance to make an off2_10.gif image today and to upload it into the appropriate directory, but it didn't solve my problem. 

My problem still exists where I have the different Icons displayed for all the parent boards, but the child boards do not access my custom icons.  They revert back to the default icons for my theme.  I'm not php expert, but I believe the problem lies in the php code.

I'm building a website for Vintage Volkswagen enthusiasts.  View my SMF by going here: www.german-pride.com/SMF/  When you click on the image of the Beetle at the top of the list of boards, you will see the child boards, and their reverted theme default icons.

Can anyone suggest some changes?

Thanks!
VB

Kindred

you do know that the child board have board numbers of their own?  i.e. board #8 is BEETLE - Late Model Legends - 1968-2003 VW Aircooled Beetles
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

VegasBoxers

#130
Kindred,
    Thanks for the reply.  To answer your question, "Yes" I did know that each board has it's own ID #.  If you hover over the link, the board number is displayed in the status bar of your browser.  (That's how I knew which icon to assign to each board.)  I have a set of late model beetle icons that I created for that board called on_8.gif and on2.gif and off_8.gif.   For whatever reason, they are not displaying when you click on the parent board. 

Is it possible that there is another php file that needs to be altered with that same script that's listed earlier in this thread?

For instance if template.display.php is altered with that script, is there another php file that is accessed when a child board list page is displayed?

THANK YOU!
VB

Kindred

hmmm....   I's suggest looking in messageindex.template.php, since that is where the messages for the parent board are displayed...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

VegasBoxers

Thanks Kindred, but I've got a problem...  I don't know what I'd look for. :-[  :(

I can open up a php file and make changes, but I don't have any clue as to how it to write it.

Anybody got any suggestions?

THANKS!  You guys are the best volunteering your time to assist us newbies!
VB

VegasBoxers

I guess I could just kill the child boards and make them all parent boards, but I want to cut out the need for a lot scrolling on the main page. 

Got any ideas?

Thanks!
VB

Bigguy

This was submitted by one of my members, maybe it would help. PLEASE backup first before trying this:

Click

VegasBoxers

Bigguy,
   Thanks for the reply!  I read that post on your site, but the only problem I have is that I DO have seperate icons for every board.  It's just that for some reason, the child board icons don't show.  All the icons have been assigned to the various boards.

got any ideas?

THANKS!
VB

Bigguy

If the permissions are all right and the images are named right, and in the right folder AND you have double checked the code you have with the original code then....no, not right now I don't have anymore ideas but I will keep my eyes open for you, sorry I couldn't help more.

VegasBoxers

Quote from: Bigguy on September 20, 2006, 02:43:41 AM
If the permissions are all right and the images are named right, and in the right folder AND you have double checked the code you have with the original code then....no, not right now I don't have anymore ideas but I will keep my eyes open for you, sorry I couldn't help more.

Well, All I did was cut and paste what was here.  But everything else is right on.  Would it help for me to post up my display.index file? (Or whatever the file was that I had to alter to get the custom icons)

THANKS!
VB

Bigguy

Have you tried that code that was posted at my site. it might help. Sorry, it's getting late here.

Brain916

Hello
Does anyone still have the mod download for this?

When I go to the original source the download is down.

Advertisement: