Skip to main content
Topic: Custom Message icon not visible (Read 5803 times) previous topic - next topic - Topic derived from Re: a new entry in the menu M...
0 Members and 1 Guest are viewing this topic.

Custom Message icon not visible

Quote from: augras – I add a new icon 18x18 camera.png in /themes/default/images/post. I can set this new icon with a new entry Video in the menu and i can choose this Message Icon when i write a post... but after the post is submited the icon is not display in my replie ! All the others icons works fine but there are all the default icons.

Quote from: radu81 – Not sure I understand well, the icon is visible when you start a new topic but not on replies? Could be a bug, I'll try to replicate this on a test forum.

I'd say it's a bug and here is what I noticed: 
- I created a new custom icon called mobile (I used a copy of one existing image file renaming it to mobile.png)
1.png
- when opening a new topic or posting a reply you can choose the custom icon from dropdown but it is not displayed in topic view. If you try to edit the post using the complete editor (More -> Edit) you will get the same result, custom icon displayed in editor but not visible in topic view
2.png 3.png
- strange is if I use the Quick Edit option I see the default icon instead of my custom icon. Changing the icon from Quick edit works and icon is visible after edit.
4.png 5.png
sorry for my bad english

Re: Custom Message icon not visible

Reply #1

Hi,
You are right : it's exactly the problem.
Philippe

EDIT1
The probem is for a new topic or a reply. An example :
Capture.JPG
Capture2.JPG
Philippe
Last Edit: May 03, 2018, 05:15:25 am by augras

Re: Custom Message icon not visible

Reply #2

This appears to be caused by MessageTopicIcons.class.php not loading in the custom icons, it only loads in the known default ones.  I have a fix proposal that I'll place on github for review.


Re: Custom Message icon not visible

Reply #4

Hi Spuds,
Thank you to try to solve this bug.
I don't understand what to do with the files in github ! I must just take these files and replace the same on a test forum ?
Philippe

 

Re: Custom Message icon not visible

Reply #5

If you want to test, you would take this version of MessageTopicIcons.class.php and replace sources/subs/MessageTopicIcons.class.php

You would then have to edit the file sources/subs/TopicUtil.class.php

Code: (find) [Select]
		$icon_sources = new MessageTopicIcons(!empty($modSettings['messageIconChecks_enable']), $settings['theme_dir']);
Code: (replace) [Select]
		$icon_sources = new MessageTopicIcons(!empty($modSettings['messageIconChecks_enable']), $settings['theme_dir'], $topics_info);

But not this is just a proposal at this point, there may be a better fix ;)

Re: Custom Message icon not visible

Reply #6

This issue should be tracked so hopefully it can be fixed before 1.1.4 is released.

Re: Custom Message icon not visible

Reply #7

Quote from: Spuds – But not this is just a proposal at this point, there may be a better fix ;)
Hi Spuds,
Your proposal is in test but nothing change : the new icon is stil not display after submit, but if i edit my message the icon is here.
Philippe

Re: Custom Message icon not visible

Reply #8

What I did fixed the icon not displaying correctly in the topic listing.   Unfortunately is a different error than the one being discussed here!

I've been looking into the error discussed above, and while doing that, I've found yet another issue with them!  Hope to have a proper fix for all of these issues soon.

Re: Custom Message icon not visible

Reply #9

Thank you Spuds ! :D
Philippe

Re: Custom Message icon not visible

Reply #10

Use this file and replace sources/subs/MessageTopicIcons.class.php

That should fix one more of the issues ...

Re: Custom Message icon not visible

Reply #11

A great thank you Spuds !
It works fine.
I would to clic to a like button but no Like button is display ! I can see somme Likes made by other users but buttons for me.
Philippe

Re: Custom Message icon not visible

Reply #12

Hi,
i'm back with the same problem !
I just installed the 1.1.7 package from 1.1.6 and the problem with the icon come back.
I had an error on the MessageTopicIcons.class.php to update to 1.1.7 and just now i understand it is because i changed the file to resolve an another problem !
Maybe is it possible to fix this bug in the 1.1.7 package ?
I let the bug like this for now.
Philippe
Last Edit: February 02, 2021, 03:54:35 pm by augras

Re: Custom Message icon not visible

Reply #13

I'll have to get into my wayback machine and see what I fixed the first time !

Could you describe what you are doing so I can fix this properly?  I made some 1.1.7 changes so that the default message icons now use SVG images, and only if you enable custom message icons will you see the non default ones.  Disabling custom message icons should also prevent former custom ones from showing.

Re: Custom Message icon not visible

Reply #14

Quote from: Spuds – Use this file and replace sources/subs/MessageTopicIcons.class.php

That should fix one more of the issues ...

3 years ago to solve this problem i just replaced the file by yours.
Is it what you need ?