News:

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

Main Menu

Visual Warning Mod

Started by ruzster, March 12, 2006, 05:50:51 PM

Previous topic - Next topic

Vinspire

Quote from: onijin on May 11, 2006, 07:04:58 AM
this is how I got it working in Helios

in Display.template.php

find
                if ($message['can_remove'])

                        echo '

                                                                        <a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';


add after
if ($context['can_warn'])

echo '

<a href="', $scripturl, '?action=warnadd;topic=', $context['current_topic'], ';start=', $context['start'], ';user=', $message['member']['id'], ';msg=', $message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/warn.gif" alt="' . Warn . '" border="0" />' : Warn), '</a>';


and make sure you have the button in your "/images/english/" folder

i made this one:


Thanks onijin, manage to get it working with ur guide but i am having another problems where the warn.gif is displaying lower than the other button. Below is the screenshot of the problems.




onijin

O.o

can you post the code from

                // How about... even... remove it entirely?!

to

                // What about splitting it off the rest of the topic?


It's not supposed to do that.  It works just fine on mine


Vinspire

The codes ...

                // How about... even... remove it entirely?!
                if ($message['can_remove'])
                        echo '
                                                                        <a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';
   $warn_button = create_button('im_visualw.gif', 'visual_warn', 'visual_warn', 'align="middle"');   
if ($context['can_warn'])
         echo '
               <a href="', $scripturl, '?action=warnadd;topic=', $context['current_topic'], ';start=', $context['start'], ';user=', $message['member']['id'], ';msg=', $message['id'], '">', $warn_button, '</a>';
               // What about splitting it off the rest of the topic?

onijin

#63
I think this part is causing the issue:

$warn_button = create_button('im_visualw.gif', 'visual_warn', 'visual_warn', 'align="middle"');   

that code looks like it's designed for the default theme (im_visualw.gif).  When I was trying to get it working, the button that came with it wasn't meshing with helios.

try removing that.

From the looks of it, helios is trying to create 2 buttons.  Since it can't find the first one, it's not showing, but it's offsetting the second. If you compare the code between the warn and delete, delete doesn't have anything similar to that code.



this is what my code looks like

                // How about... even... remove it entirely?!

                if ($message['can_remove'])

                        echo '

                                                                        <a href="', $scripturl, '?action=deletemsg;topic=', $context['current_topic'], '.', $context['start'], ';msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt[154], '?\');">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/delete.gif" alt="' . $txt[121] . '" border="0" />' : $txt[31]), '</a>';

if ($context['can_warn'])

echo '

<a href="', $scripturl, '?action=warnadd;topic=', $context['current_topic'], ';start=', $context['start'], ';user=', $message['member']['id'], ';msg=', $message['id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/warn.gif" alt="' . Warn . '" border="0" />' : Warn), '</a>';

                // What about splitting it off the rest of the topic?

Vinspire

onijin, where did you place ur warn.gif button ? in which folder ?

onijin

themedir/heliosfolder/images/english/

Vinspire

Quote from: onijin on May 12, 2006, 09:10:28 AM
themedir/heliosfolder/images/english/

Copied ur codes & replaced it to my codes

Then put warn.gif at the right folder which is under the english folder

And the button is done ... right at the place it should be.

Thanks a lot onijin :)

onijin



^_^


just glad I was able to help.


I always get helped in here, so just trying to give back~

Vinspire


nekto

#69
hi,

i have a problem with the mod using the HELIOS theme.

the warn.gif appears correctly, but after I click on warn this happens:



can someone help me ???

and i have a doubt, when i go to the ADMIN zone, something weird happens: (space between "Users" and "Users Groups")


yellow1912

For some reason guests can see all the warning on my site, any idea how to fix it pls?
My SMF forum ^^
An Ecommerce site I help to build

onijin

Meaning they can see the warning buttons, or they can see that a member has been warned?  Because if it's the latter, it's supposed to be like that.  Sort of a public humiliation thing...  ^_^

yellow1912

Quote from: onijin on May 14, 2006, 11:15:23 PM
Meaning they can see the warning buttons, or they can see that a member has been warned?  Because if it's the latter, it's supposed to be like that.  Sort of a public humiliation thing...  ^_^
The later, which I dont think any other than the warned member himself should see. I mean it's good enough for the member knows that he has been warned, that's all, why let others see it too. It may kinda discourage the members from posting a lot, and some other members can mock them too.
My SMF forum ^^
An Ecommerce site I help to build

HaxXxoR

I am having a few problems with this my self.



Any Ideas??
Droppin' shells like a hailstorm, and bodys like a plague!
Http://www.tasty-fragism.com

PillsburyHitman

In short, how do I allow Moderators to use the Warn features added by the Visual Warning Mod for 1.1 RC2 (http://mods.simplemachines.org/index.php?mod=283)?

Currently only administrators are able to use the Warn feature on a post.


Bigguy

I made a new NON post group called Moderators and then gave them permission to warn ppl, works good.

Vinspire

Quote from: HaxXxoR on May 17, 2006, 03:54:07 PM
I am having a few problems with this my self.



Any Ideas??

I saw the pic that you post but i dont understand your problems as you didn't give any further explaination regarding the problems.

PillsburyHitman

Quote from: Bigguy on May 19, 2006, 08:42:28 AM
I made a new NON post group called Moderators and then gave them permission to warn ppl, works good.

But where do I give a group permission to Warn people? Can't find it anywhere!

Bigguy

Goto permissions===>Settings===>and put a check mark next to all 3 of the options then go to "Permissions by Membergroup" and modify a group all permissions should now be visible. This is for smf 1.1rc2

Advertisement: