News:

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

Main Menu

Automatic Message Icon

Started by Old Lynx, June 11, 2008, 04:04:11 AM

Previous topic - Next topic

Old Lynx

Problem ! :(

maybe I should have said this before > I'm sorry guys !

The reason I want to disable the Message Icon for other members is was because they weren't using the Standard icon > they were going and choosing other like thumbs up > thumb down > smily face ...etc >> it all looked messy ! So I want all their posts to be the standard icon !

after doing the above mod > I just relised (not two minutes ago) that even the standard icon has now been removed !!!!

What do I do to disable their choice of message icons > but make their posts automatically appear with a standard icon !!

thanks guys

Bulakbol

You can try this then. Disregard my other codes. In the Sources/Post.php find
// Collect all parameters for the creation or modification of a post.

add this line above it.
$_POST['icon'] = !empty($_POST['icon']) ? $_POST['icon'] : 'xx';

Then in the Post.template.php find
<b>', $txt[71], ':</b>
</td>
<td>

replace with

<b>', $txt[71], ':</b>
</td>
<td>';
if (($modSettings['hide_message_icon'] == 0) || $context['user']['is_admin'])
{
echo '


find

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


and replace with

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


Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Old Lynx

so do I undo the changes I did from your old instructions ?

Bulakbol

Yes, undo the first changes. Use the original files before the changes.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Old Lynx

Hi JohnyB :)

OK I un-did the previous changes then edit it again to the code above > but again the normal members can use whatever image icon they want to use !!

by the way I did the changes in the Default theme and in my current theme ! still doesn't work :(

Bulakbol

Woopppps sorry, I missed something. This line
if (($modSettings['hide_message_icon'] == 0) || $context['user']['is_admin'])

should be like this.
if ($context['user']['is_admin'])

sorry.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Jade Elizabeth

Or...

Admin > Smileys and Message Icons > Edit Message Icons (delete all but the one you want)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Old Lynx

Hi Alundra

but wouldn't that stop me from using them as well !! I want the admins to have access to all the message icons > but the members and Mods to have access to the Standard Message Icon only !!

JohnyB I tried your thing and I got this huge error :(

{{ Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page. }}

Please help :)

Bulakbol

Attach your Post.template.php and I'll edit it for you. You do the Sources/Post.php. :)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Old Lynx

Hi Johnny :)

attached are the post.template.php and the post.php

thanks man :)

Old Lynx

by the way > that post.template.php is from my current theme !!

thanks

Bulakbol

Here are your edited files.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Old Lynx

OMG thanks JohnnyB that Worked perfectly !!!

you are a genius who is a GREAT HELP

Thanks again bro

Bulakbol

No worries bro. I'm glad I could help too.
Solved.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Jade Elizabeth

Just look at his picture, it SCREAMS genius :P

I'm glad you got it sorted :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bulakbol

 :P Don't get deceived by illusion.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

locjan

are there no plugin to do it?
locjan.com - Free Korean Dramas OST shwoomp.com - Art of shwoomp

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

meemzo

I would very much like this to work for me also.  I know it's been a long time since it was posted, but maybe it's become enough of a thing for someone to jump in and help me.  My problem would be that I don't want to download the edited post files as I may loose mods that have been installed.  Can anyone tell me what lines to edit?  As a precursor I have uploaded my files.

Advertisement: