Need help with the Topic Icons

Started by dopeitspaul, September 24, 2014, 08:02:23 PM

Previous topic - Next topic

dopeitspaul

Hey everyone, I'm trying to edit my topic icons. I want to remove the concept of hot topics and hot polls, etc. And I just want to make the icons the normal ones. 

Here's an image of my message index.


Notice the poll icon is "hot poll" and not normal. I want to remove hot & a very hot using their normal icons.
As for stickies, I just want them to use the sticky icon on the left.

How can I achieve this? Thanks


Steve

One way would be to save the normal icon with the names of the ones you want to get rid of and then upload and replace the originals.
DO NOT pm me for support!

dopeitspaul

Quote from: Steve on September 24, 2014, 09:04:36 PM
One way would be to save the normal icon with the names of the ones you want to get rid of and then upload and replace the originals.

I tried, but for some reason it didnt work. It was still showing the same image I don't know want it to be

Ninja ZX-10RR

And another easy way would be to go here: Forum » Administration Center » Posts and Topics » Topic Settings and put the settings for "Number of posts for a hot topic" and for "Number of posts for a very hot topic" to something like 1000000 making it impossible to reach them :P

You will have a little problem though with both ways. When in topics you will see the icons telling you "Hot Topic (More than 15 replies)" and also "Very Hot Topic (More than 25 replies)" (see attached) and that wouldn't look great. You will have to get rid of the language strings for each language, in /{your theme}/languages/index.{language}.php be sure to get rid of the second part of the string, like Hot Topic (More than %1$d replies), also you would have to replace both hot topic and very hot topic icons with another image completely transparent with the lowest possible size (1px * 1px) so that it will find the images but they will be transparent :P
Oh, of course remember to handle EVERY possible case, since topics can be very hot in which you have posted in (an icon), hot in which you have posted in (icon), and also locked or even sticky... You will have to replace all those images with the non-hot ones ;) it is very tedious since I have replaced all icons on my forum and rest assured, it IS tedious XD

EDIT: remember to clear both browser cache and also forum cache via the maintenance function ;)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dopeitspaul

^ Thank you. I will go ahead and do that instead.

As for sticky topics. How can I change the icons? Regardless of what kind of sticky topic it is, I just want it to be the blue pin only.

Ninja ZX-10RR

Just copy the blue pin and rename it accordingly ;) Basically one copy for each file in /{your theme}/images/topics containing the word "sticky" should be replaced. :)
Oh you're welcome :D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Antechinus

The way I do it is to just ditch the code for all that crap in the template, and just recode it to call the icons I want. :)

<li class="topic_row ', $color_class, '">
<div class="topic_info">
<div class="topic_icons">
', $topic['is_poll'] ? '<img src="'. $settings['images_url']. '/icons/poll.png" class="topic_icon" alt="" />' : '<img src="'. $topic['first_post']['icon_url']. '" class="topic_icon" alt="" />', '
', $topic['is_posted_in'] ? '<img src="'. $settings['images_url']. '/icons/fred2.png" class="fred" alt="" />' : '','
</div>


Don't try and put that straight in a default template, since it's from a totally revamped file with non-standard markup. The way the conditionals are set up is the key to it though. What is does is assign the default poll icon if the topic is a poll. Otherwise it just assigns whatever icon is used for the OP of the topic. If it's a topic you have posted in, it adds an icon for that too. Nothing else. All the five million default gifs are deprecated.

You could easily add a conditional for is_locked if you wanted to. Set it up however you want it.

Ninja ZX-10RR

That's the coder way instead XD I knew you would have explained it though. I was waiting to see "Antechinus" in the last reply. :P Nice that way too, I have been wandering for a while how to do it that way and I gave up lol
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Antechinus

Well you have that array in the template too, before the actual markup. That gives you a list of useful conditionals.

foreach ($context['topics'] as $topic)
{
// Is this topic pending approval, or does it have any posts pending approval?
if ($context['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked'])
$color_class = 'stickybg locked_sticky';
// Sticky topics should get a different color, too.
elseif ($topic['is_sticky'])
$color_class = 'stickybg';
// Locked topics get special treatment as well.
elseif ($topic['is_locked'])
$color_class = 'lockedbg';


Those can be applied to anything you like (calling icons, making text bounce up and down, whatever).

The first post icon stuff is already in the default template. I just used it in a slightly different way.

<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>


The is_poll and is_posted_in are ones that are in Sources/MessageIndex.php IIRC. I know I went and found them somewhere. Sometimes you have to dig around a bit in the back end coding.

Ninja ZX-10RR

That's another reason why I suggested my way... It's not exactly... User-friendly ya know? :P
*stares at that stuff not knowing what the heck is...*
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Antechinus

It takes a while to get the hang of it, but if you dive in and go for it you'll eventually reach a stage where you can read SMF templates almost as easily as you can read plain text. That gives you a lot of scope for customising things just the way you want them.

Gwenwyfar

Replacing the image icon should have worked too, maybe you didn't reset your cache and it was just showing the old image. You can reset the cache by pressing ctrl+f5
"It is impossible to communicate with one that does not wish to communicate"

kat

You MIGHT need to empty the forum's cache, too (Forum maintenance).

Ninja ZX-10RR

Quote from: ♦ Ninja ZX-10RR ♦ on September 24, 2014, 09:27:19 PM
EDIT: remember to clear both browser cache and also forum cache via the maintenance function ;)
:D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dopeitspaul

Gahhh, for some reason emptying both the browser and forum cache is still not working. I took the "quick_sticky.gif" and then I renamed it to "normal_post_sticky.gif" and for some reason, the image has not changed.

Here's a direct link to the gif
http://indieraptalk.com/forum/Themes/default/images/topic/normal_post_sticky.gif

Somehow its still that one. When right now on my ftp the normal_post_sticky.gif is just the pin

Ninja ZX-10RR

If you are using some service such as Cloudflare you might need to clear the cache from there as well. Plus, try another browser and you might wait a few minutes too when you do these kind of things. I had to wait 2 minutes because I was seeing the previous images as well :P
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dopeitspaul

^ I'm not using Cloudflare.

I'm using Filezilla for my ftp. But I don't know where to refresh the cache. Also, my webhosting is ipage.com, if that helps.

Ninja ZX-10RR

If you did the procedure correctly it's flatout impossible that it doesn't update. Clear your browser cache (usually in options) and also the forum cache from Forum » Administration Center » Forum Maintenance » Routine "Clear the forum cache", plus did you try from another browser as I suggested? It is to verify if that works, because if it does work then it's something with your main browser, otherwise something else :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dopeitspaul

^ I emptied the cache for both browser and forum. I did the same for a different web browser too. Somehow, the image still remains the same.

I have a feeling it's either my webhosting or ftp. But I can't find the option to clear their cache.

Steve

Quote from: dopeitspaul on September 25, 2014, 01:30:36 PM
Gahhh, for some reason emptying both the browser and forum cache is still not working. I took the "quick_sticky.gif" and then I renamed it to "normal_post_sticky.gif" and for some reason, the image has not changed.

That seems backward to me. You should d/l the normal_post_sticky.gif and rename IT to quick_sticky.gif and u/l it, replacing the old one (I usually rename the old one to something like quick_stickyold.gif and leave it there in case I need it back but that's just me).
DO NOT pm me for support!

Advertisement: