News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Alert box for announcements

Started by Mick., January 25, 2013, 06:50:34 AM

Previous topic - Next topic

Mick.

Link to Mod

Alert mod simply adds BBC codes to the post reply box. Useful for when creating announcements.

Demo: Alerts

Making this little mod was prompted to my head when i was clearing the cache in admin this morning. The green alert box called my attention.


Mick.


Shambles

I can see where this could be useful.

Not on my boards, though, as I doubt my members understand Latin  ::) ;)

NanoSector

Quote from: Shambles on January 25, 2013, 08:38:22 AM
I can see where this could be useful.

Not on my boards, though, as I doubt my members understand Latin  ::) ;)
Latin isn't that hard... Just 200 rows of grammar, 7293 words and a teacher.

Nice mod :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Mick.

lol latin was used for demo purposes.

Mick.

Not bad for an hour worth the work.   Im thinking making this for admins only. As it is, every user can use it. It may be abused.

NanoSector

I can see this being useful to the average user really. What about adding a switch to the admin panel?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Mick.

Quote from: Yoshi2889 on January 25, 2013, 09:10:39 AM
I can see this being useful to the average user really. What about adding a switch to the admin panel?
on/off?

I got a lil ahead yesterday. It has a dropdown just like the 'color change' dropdown. Only seen by users 1,2.

Something like this may be used...
[alert=green][/alert]

But im thinking im going the long way instead of the short way.

4Kstore

This is a perfect mod, thanks for share with us!

¡¡NEW MOD: Sparkles User Names!!!


Mick.


azirion

Hi

I would really like to have this mod, looks cool.

I had it installed, the options appear very well on the menu on top, but they have no effect on the text in the message.

I guess its the laguage Im using: Spanish ES

Im using also core theme and SPortal

Any help on making this work with this language?

Thanks

br360

Quote from: Mick. on January 25, 2013, 09:09:06 AM
Not bad for an hour worth the work.   Im thinking making this for admins only. As it is, every user can use it. It may be abused.

I like the mod as it works well for news items.

Was adding this as a possible admin only option still in the works? If not, I just played around a bit and removed the arrays in the subs-editor.php. Looks like the code still works when you manually type in [yellowalert],[/yellowalert] yet hides the bbc icons in the reply box.

Is there any harm in doing it this way?

br360

Quote from: br360 on October 09, 2013, 11:33:55 PM
Quote from: Mick. on January 25, 2013, 09:09:06 AM
Not bad for an hour worth the work.   Im thinking making this for admins only. As it is, every user can use it. It may be abused.

I like the mod as it works well for news items.

Was adding this as a possible admin only option still in the works? If not, I just played around a bit and removed the arrays in the subs-editor.php. Looks like the code still works when you manually type in [yellowalert],[/yellowalert] yet hides the bbc icons in the reply box.

Is there any harm in doing it this way?

Figured 2 1/2 weeks was enough of a wait time to bump this. ;)

Any update in an admin only option, or at the very least; any harm in removing the arrays in the subs-editor.php so members couldn't see the tags? (I would like to use this mod just for the news)

Arantor

Well, I don't know if you'd noticed, but Mick hasn't been active in over a month, so he wasn't going to answer you.

Removing the items from Subs-Editor.php prevents users seeing it, however it doesn't prevent them using it.

As I've found in the past with doing such things, there are all kinds of edge cases around such permission handling, and that it's generally not a smart idea except in very limited cases.

Personally if you have members that abuse it, a warning usually gets the point across...

br360

Yeah, I hear you. Kind of figured it wasn't the best way to do it. I think this is a great mod, but personally I really only wanted to use it for highlighting different updates in the news, and not really in posts. When installed there are 3 new bbc icons that appear, and it would be kind of tough to say to the members "here are new shiny buttons, but don't use them". ;)

I know vbulletin has something like this for board news specifically, and kind of thought it was cool.

Apllicmz

Nice Mod

when Update dont forget portuguese linguage

<file name="$themedir/languages/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['red_alert'] = 'Alerta vermelho';
$txt['blue_alert'] = 'Alerta azul';
$txt['green_alert'] = 'Alerta verde';
$txt['yellow_alert'] = 'Alerta Amarelo';
]]></add>
        </operation>
    </file>
   
    <file name="$themedir/languages/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['red_alert'] = 'Alerta vermelho';
$txt['blue_alert'] = 'Alerta azul';
$txt['green_alert'] = 'Alerta verde';
$txt['yellow_alert'] = 'Alerta Amarelo';
]]></add>
        </operation>
    </file>



stanhelman

Sorry to bump a topic thats a year old but I was wondering if the Compatible With: on the mods page could be updated to the latest version I mean it works with 2.0.10

pocttopus

How can I disable this mod for regular members?  :-\
Only available for admins and moderators.

Massl


Advertisement: