News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[Free] A little help for editing the icons of a style

Started by dimbadboy_bg, October 04, 2014, 03:17:42 PM

Previous topic - Next topic

dimbadboy_bg

Hello,

I hate gif icons, so I have decided to change them to png format. I started and most of them are already changed, but unfortunately I hit a hole . Can someone tell me in which file exactly I need to edit so to change it to search for png icons instead for gif icons. Bellow I will add the picture. I want to edit the red circle which is next to the topic. Thanks in advance.



Greetings,
D. Stoimenov

mashby

I think it's MessageIndex.template.php.
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
Always be a little kinder than necessary.
- James M. Barrie

dimbadboy_bg

That worked, thank you so much but unfortunately I hit another hole. I want to change the "Message Icons" to png format too. I enabled the option to edit "Message Icons" from the admin panel but there only gifs are allowed. Is there a way to change it from gif to png ? Thanks in advance, again!

Greetings,
D. Stoimenov

mashby

I would think it would be in here:
Themes/default/ManageSmileys.template.php

Not sure where in there. Did a quick look for .gif and didn't quite see what I thought I was gonna. Hmm.
Always be a little kinder than necessary.
- James M. Barrie

mashby

Yeah, it ain't in there! It's in Sources/ManageSmileys.php...
// Editing/Adding an icon?
elseif ($context['sub_action'] == 'editicon' && isset($_GET['icon']))
{
$_GET['icon'] = (int) $_GET['icon'];

// Do some preperation with the data... like check the icon exists *somewhere*
if (strpos($_POST['icon_filename'], '.gif') !== false)
$_POST['icon_filename'] = substr($_POST['icon_filename'], 0, -4);
if (!file_exists($settings['default_theme_dir'] . '/images/post/' . $_POST['icon_filename'] . '.gif'))
fatal_lang_error('icon_not_found');
Always be a little kinder than necessary.
- James M. Barrie

dimbadboy_bg

I tried editing this file but didn't manage to solve the problem. After the edits from the upper code I manage to remove the message that I am allowed only to add images with ".gif" format. Unfortunately this doesn't help. Now when I am trying to edit the images and when I am changing, for example, xx.gif to xx.png when I hit the save button it is again "xx.gif". The same is when I am adding new images they are appearing in the table with ".gif" ending. Any ideas why is this like this ? Thanks in advance.

Greetings,
D. Stoimenov

dimbadboy_bg

After a long process of searching and researching I found it. After editing "MessageIndex.template.php." you need to edit "Post" and "Subs-Editor" too. Now everything is working fine.

PS: Sorry for the double post.

Advertisement: