Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Is their anyway to turn off message icons?

Aloittaja eric123, tammikuu 22, 2005, 11:31:31 AP

« edellinen - seuraava »

eric123

What the title says...i dont want to display fmessage icons next to each thread, any ideas on how to do

A.M.A

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="" />
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

eric123

i dont have a file called that

and this is what i dont want to show:

Trekkie101


eric123

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

[Unknown]

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?

-[Unknown]

eric123

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

[Unknown]

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]

eric123

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?

[Unknown]

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]

eric123

I mean this right here:

I want to remove the column where the images used to be, would that mess somethign up?

eric123


[Unknown]

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]

Puchu

#13
Edit: I must have had the coding wrong at some point for it works now...

guider

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?

[Unknown]

Are you sure you followed my instructions exactly?  That should have left you with an "xx" (standard) icon.

-[Unknown]


[Unknown]

Actually, the changes to Post.template.php are more important.  See the part where it says "xx"?  Are you sure that's there?

-[Unknown]

guider


[Unknown]

I'm afraid that looks like it hasn't seen any of this topic's changes at all.

-[Unknown]

guider


guider

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?

DeadMetal

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?

guider

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

[Unknown]

Please don't bump your posts, it makes me not want to answer you.

-[Unknown]

guider

There was a 24-hour gap. Since you are a regular I was afraid you missed it.

guider


helenbpd

#27
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!

guider

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.

helenbpd

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.

Puchu

#30
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...

Puchu

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...

Puchu

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>

Advertisement: