Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: eric123 - tammikuu 22, 2005, 11:31:31 AP

Otsikko: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 11:31:31 AP
What the title says...i dont want to display fmessage icons next to each thread, any ideas on how to do
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: A.M.A - tammikuu 22, 2005, 11:44:02 AP
If you mean in the message index .. then open MessageIndex.template.php look for and remove:
<img src="', $settings['images_url'], '/post/', $topic['first_post']['icon'], '.gif" alt="" />
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 12:36:10 IP
i dont have a file called that

and this is what i dont want to show:
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: Trekkie101 - tammikuu 22, 2005, 12:40:05 IP
Its called xx.gif if that helps in anyway.
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 12:48:22 IP
Well I kind of want to eliminate the entire column of the table, or not allow users to be able to selectt the message icon, either one
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - tammikuu 22, 2005, 01:04:43 IP
The file he referenced is Themes/yourtheme/MessageIndex.template.php.  You may also want to remove it from Post.template.php, like so:

Find:
</td>
</tr>
<tr>
<td align="right">
<b>', $txt[71], ':</b>
</td>
<td>
<select name="icon" id="icon" onchange="showimage()">';

// Loop through each message icon allowed, adding it to the drop down list.
foreach ($context['icons'] as $icon)
echo '
<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>';

echo '
</select>
<img src="', $settings['images_url'], '/post/', $context['icon'], '.gif" name="icons" border="0" hspace="15" alt="" />
</td>


Replace:
<input type="hidden" name="icon" value="xx" />
</td>


How do I modify files? (http://www.simplemachines.org/community/index.php?topic=24110.0)

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 01:26:14 IP
I don't have those fiiles though, i have settings.templates.php, index.templates.php, and index.php style.css, theme_info.xml, images folder and language folder and thats all
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - tammikuu 22, 2005, 01:34:53 IP
If you don't have them, copy them from the "default" folder (but I suggest you don't modify the default ones unless you know the consequences.)

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 01:56:21 IP
thanks that wroked one last thing, is their any way to get rid of the column that is thier now with no message icons or no?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - tammikuu 22, 2005, 02:09:46 IP
You mean the column in the database?  I wouldn't suggest it, it would make third party add-ons, mods, and such very confused :P,

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 02:16:18 IP
I mean this right here:

I want to remove the column where the images used to be, would that mess somethign up?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: eric123 - tammikuu 22, 2005, 05:23:56 IP
any ideas?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - tammikuu 22, 2005, 05:38:07 IP
Oh, sorry, I hadn't looked at what A.M.A suggested.

Find, MessageIndex.template.php:

<td width="9%" colspan="2"></td>

Replace:
<td width="5%"></td>

Remove:
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $settings['images_url'], '/post/', $topic['first_post']['icon'], '.gif" alt="" />
</td>


-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: Puchu - tammikuu 24, 2005, 03:56:39 AP
Edit: I must have had the coding wrong at some point for it works now...
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 06, 2005, 02:13:16 IP
Oops. Did that and see what happened:

http://www.guider.atwebhosting.com/mambo/index.php?option=com_smf&Itemid=124&?topic=5.0

See the broken image thing? How can I make sure that gets linked to the regular Post Icon like in the first post?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - helmikuu 07, 2005, 04:15:41 IP
Are you sure you followed my instructions exactly?  That should have left you with an "xx" (standard) icon.

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 07, 2005, 04:22:39 IP
Yeah, or I'm going crazy...

http://wwwguider.atwebhosting.com/files/MessageIndex.template.php.txt
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - helmikuu 07, 2005, 04:31:32 IP
Actually, the changes to Post.template.php are more important.  See the part where it says "xx"?  Are you sure that's there?

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 07, 2005, 04:55:26 IP
Think I trashed it.. could you fill me in on the missing gap?

http://www.guider.atwebhosting.com/files/Post.template.php.txt
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - helmikuu 07, 2005, 05:03:23 IP
I'm afraid that looks like it hasn't seen any of this topic's changes at all.

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 07, 2005, 06:51:39 IP
What's missing in the file?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 08, 2005, 07:54:53 AP
I just had a look at the original but I can't see any reference to xx in it either. COuld you take a look at the file I posted above and point the err?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: DeadMetal - helmikuu 13, 2005, 02:40:44 IP
Unknown: a fragment of the code from Post.template.php that you cited is
<select name="icon" id="icon" onchange="showimage()">';

However, in 1.0 and 1.01 it is:
<select name="icon" onchange="showimage()">';

How come?
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 13, 2005, 02:48:35 IP
Yeah and the original contains no reference to xx at all. So I can't see where it went wrong as I editted out more than this topic describes. Have a look if you will and tell me what's missing.

http://www.guider.atwebhosting.com/files/Post.template.php.txt
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: [Unknown] - helmikuu 13, 2005, 11:05:38 IP
Please don't bump your posts, it makes me not want to answer you.

-[Unknown]
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 14, 2005, 07:00:57 AP
There was a 24-hour gap. Since you are a regular I was afraid you missed it.
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 16, 2005, 07:36:28 IP
Perhaps if you find the time...  :-\
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: helenbpd - helmikuu 16, 2005, 08:00:59 IP
Guider, go through the Post.template.php using any editor and use the search function to find all instances of .gif

From the source code of the thread you linked on your site, it looks like somewhere in the template you erased the xx from in front of a .gif  Just find the one .gif with no file name and put the xx back in.  :)


No, I misled you, I think.  Sorry!
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: guider - helmikuu 16, 2005, 08:12:37 IP
I love your support but that killed all the emoticons  ;D
I think it's some kind of formula. "THIS + THAT + .gif". So leave that stuff alone I guess. Oh well.
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: helenbpd - helmikuu 16, 2005, 08:15:14 IP
LOL - I just rushed back to holler STOP!  ;D

Yeah, it's something to do with the javascript & what it calls up - it's not putting the right name (or any name) onto those .gifs.
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: Puchu - tammikuu 08, 2006, 10:34:26 AP
Lainaus käyttäjältä: [Unknown] - tammikuu 22, 2005, 05:38:07 IP
Oh, sorry, I hadn't looked at what A.M.A suggested.

Find, MessageIndex.template.php:

Remove:
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $settings['images_url'], '/post/', $topic['first_post']['icon'], '.gif" alt="" />
</td>


-[Unknown]


Thats all you need to do with RC2 that I can tell...  had to go back and find out how to do it again and thought I would go ahead and help with it ;)


EDIT:

Find
<td width="9%" colspan="2" class="catbg3"></td>

replace with
<td width="5%" class="catbg3"></td>


that will let the columns line up to the column titles... stupid me...
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: Puchu - helmikuu 18, 2006, 05:14:58 IP
Okay, with the Helios TP 1.1 RC2 theme in the messageindex.template.php


the main code is different that needs removed...

Find and remove:
               <td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>


Find:
<td width="9%" colspan="2"></td>

Replace:
<td width="5%" class="catbg3"></td>

it might be that way with all RC2 theme files...
Otsikko: Re: Is their anyway to turn off message icons?
Kirjoitti: Puchu - helmikuu 18, 2006, 05:29:47 IP
tp remove the option to choose an icon in post.template.php


find and delete
// Start with message icons - and any missing from this theme.
echo '
var icon_urls = {';
foreach ($context['icons'] as $icon)
echo '
"', $icon['value'], '": "', $icon['url'], '"', $icon['is_last'] ? '' : ',';
echo '
};';

// The actual message icon selector.
echo '
function showimage()
{
document.images.icons.src = icon_urls[document.forms.postmodify.icon.options[document.forms.postmodify.icon.selectedIndex].value];
}';



find and delete:

<tr>
<td align="right">
<b>', $txt[71], ':</b>
</td>
<td>
<select name="icon" id="icon" onchange="showimage()">';

// Loop through each message icon allowed, adding it to the drop down list.
foreach ($context['icons'] as $icon)
echo '
<option value="', $icon['value'], '"', $icon['value'] == $context['icon'] ? ' selected="selected"' : '', '>', $icon['name'], '</option>';

echo '
</select>
<img src="', $context['icon_url'], '" name="icons" hspace="15" alt="" />
</td>
</tr>