Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Mick. on January 25, 2013, 06:50:34 AM

Title: Alert box for announcements
Post by: Mick. on January 25, 2013, 06:50:34 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3623)

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

Demo: Alerts (https://www.idesignsmf.com/index.php/page,page1511.html)

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.

(https://www.idesignsmf.com/images/idesignadvert.png) (https://www.idesignsmf.com)
Title: Re: Alert box for announcements
Post by: Mick. on January 25, 2013, 08:33:23 AM
[Reserved]
Title: Re: Alert box for announcements
Post by: 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  ::) ;)
Title: Re: Alert box for announcements
Post by: NanoSector on January 25, 2013, 09:02:17 AM
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 :)
Title: Re: Alert box for announcements
Post by: Mick. on January 25, 2013, 09:07:41 AM
lol latin was used for demo purposes.
Title: Re: Alert box for announcements
Post by: 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.
Title: Re: Alert box for announcements
Post by: NanoSector 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?
Title: Re: Alert box for announcements
Post by: Mick. on January 25, 2013, 09:15:26 AM
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.
Title: Re: Alert box for announcements
Post by: 4Kstore on January 25, 2013, 05:05:19 PM
This is a perfect mod, thanks for share with us!
Title: Re: Alert box for announcements
Post by: bolubeyi61 on January 26, 2013, 07:50:04 AM
Thank you.
Title: Re: Alert box for announcements
Post by: Mick. on January 26, 2013, 09:36:45 AM
Glad you guys like it. ;)
Title: Re: Alert box for announcements
Post by: azirion on August 02, 2013, 12:08:12 AM
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
Title: Re: Alert box for announcements
Post by: 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?
Title: Re: Alert box for announcements
Post by: br360 on October 26, 2013, 10:43:32 PM
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)
Title: Re: Alert box for announcements
Post by: Arantor on October 26, 2013, 10:46:21 PM
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...
Title: Re: Alert box for announcements
Post by: br360 on October 27, 2013, 12:37:16 AM
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.
Title: Re: Alert box for announcements
Post by: Apllicmz on October 15, 2014, 04:35:40 AM
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>
Title: Re: Alert box for announcements
Post by: stanhelman on July 14, 2015, 05:40:25 PM
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
Title: Re: Alert box for announcements
Post by: pocttopus on November 29, 2018, 03:04:29 PM
How can I disable this mod for regular members?  :-\
Only available for admins and moderators.
Title: Re: Alert box for announcements
Post by: Massl on January 05, 2019, 10:05:35 AM
Many thanks for this mod 😉
Title: Re: Alert box for announcements
Post by: minimono on May 17, 2019, 06:48:08 AM
My theme Softer not show same Demo.

(https://thai-access.000webhostapp.com/aspuppic/images/ASP-prn9ya-41.png)
Title: Re: Alert box for announcements
Post by: Mick. on May 17, 2019, 07:50:17 AM
Quote from: minimono on May 17, 2019, 06:48:08 AM
My theme Softer not show same Demo.

(https://thai-access.000webhostapp.com/aspuppic/images/ASP-prn9ya-41.png)
Uninstall the mod. Then, install the mod again and make sure you select the custom theme you are using.
Title: Re: Alert box for announcements
Post by: Mick. on May 17, 2019, 07:54:11 AM
Quote from: minimono on May 17, 2019, 06:48:08 AM
My theme Softer not show same Demo.

If that doesnt work, simply add this code at the very end of Softer theme's css index file...



.red_alert {
        border: 1px dashed #d10000;
padding: 10px;
        background: #ff7d7d;
}
.green_alert {
border: 1px dashed #00bf00;
padding: 10px;
background: #95fa89;
}
.blue_alert {
border: 1px dashed #1f35db;
padding: 10px;
background: #659cdb;
}
.yellow_alert {
border: 1px dashed #edb415;
padding: 10px;
background: #faf889;
}
Title: Re: Alert box for announcements
Post by: Arantor on May 17, 2019, 09:22:23 AM
Can we get a link to a post with this bbc in it?
Title: Re: Alert box for announcements
Post by: Arantor on May 17, 2019, 09:35:57 AM
Looks fine to me, as attached.

Your browser may have old CSS in it.
Title: Re: Alert box for announcements
Post by: minimono on May 17, 2019, 09:47:21 AM
Quote from: Arantor on May 17, 2019, 09:35:57 AM
Looks fine to me, as attached.

Your browser may have old CSS in it.
Thank you very much :-*

Okay then. ;D
because of cache in Chrome. Use CCleaner cleaning it Ok. :-[ :-[
Title: Re: Alert box for announcements
Post by: Tricky-Ricky on June 13, 2019, 09:30:23 AM
Hey Mick bud iv a little issue iv installed and there are two sets of buttons were do I find the code to remove. Thanks in advance bud
Title: Re: Alert box for announcements
Post by: Mick. on June 13, 2019, 10:13:43 PM
@TR, look in sources/subs.php. if not there,  look in sources/subs-editor
Title: Re: Alert box for announcements
Post by: Tricky-Ricky on June 14, 2019, 08:41:23 AM
Thanks bud perfect. I just missed the subs-editor code all is fantastic now.
Title: Re: Alert box for announcements
Post by: Mick. on June 14, 2019, 09:35:29 AM
Quote from: Tricky-Ricky on June 14, 2019, 08:41:23 AM
Thanks bud perfect. I just missed the subs-editor code all is fantastic now.
awesome;)
Title: Re: Alert box for announcements
Post by: pocttopus on December 24, 2019, 03:30:28 PM
Quote from: pocttopus on November 29, 2018, 03:04:29 PM
How can I disable this mod for regular members?  :-\
Only available for admins and moderators.
Nobody knows how to set up this issue?  ??? :-\
Title: Re: Alert box for announcements
Post by: Mick. on December 24, 2019, 03:33:37 PM
Quote from: pocttopus on December 24, 2019, 03:30:28 PM
Quote from: pocttopus on November 29, 2018, 03:04:29 PM
How can I disable this mod for regular members?  :-\
Only available for admins and moderators.
Nobody knows how to set up this issue?  ??? :-\
lemme take a look. I'm sure it needs a user is admin entry on there
Title: Re: Alert box for announcements
Post by: pocttopus on December 24, 2019, 03:35:05 PM
You need admin privileges?
Here is the link:
http://mkreef.com
Title: Re: Alert box for announcements
Post by: pocttopus on May 19, 2020, 09:37:20 AM
Is there any way to use this mod for 2.1RC2 version?
Title: Re: Alert box for announcements
Post by: Mick. on May 19, 2020, 09:53:51 AM
Quote from: pocttopus on May 19, 2020, 09:37:20 AM
Is there any way to use this mod for 2.1RC2 version?
I havent done much investigating on 2.1. I'm waiting for rc3 to come out so I can upgrade myself and study the new code.
Title: Re: Alert box for announcements
Post by: pocttopus on May 20, 2020, 06:05:11 AM
Thanks @Mick. for your response, you're very kind and keep it up. :)
Cheers. ;)
Title: Re: Alert box for announcements
Post by: punchy on May 23, 2020, 05:48:47 PM
Mick

Do you know if this will work with 2.0.17 ? This looks brilll, but it would need to have admin only rules
Title: Re: Alert box for announcements
Post by: Mick. on May 23, 2020, 06:29:47 PM
Quote from: punchy on May 23, 2020, 05:48:47 PM
Mick

Do you know if this will work with 2.0.17 ? This looks brilll, but it would need to have admin only rules
Yes. i'm also waiting on RC3 to come out to revamp the mod for admins only.
Title: Re: Alert box for announcements
Post by: Xpresskonami on September 27, 2021, 10:43:57 PM
I Found back the Alert mod
[greenalert] , [redalert], [bluealert], [yellowalert]
Title: Re: Alert box for announcements
Post by: landyvlad on September 28, 2021, 07:41:28 PM
Quote from: Mick. on May 23, 2020, 06:29:47 PMYes. i'm also waiting on RC3 to come out to revamp the mod for admins only.

Hey mate have you done any work on this for 2.1?
Just curious not hassling.

I can't see any demo etc of what its supposed to look like but does it do prominent announcements similar to this on xenforo:
(blue box near top)
eg https://yttalk.com/threads/anyone-wanna-collab.301449/
 
Title: Re: Alert box for announcements
Post by: shadav on September 28, 2021, 07:50:56 PM
Quote from: landyvlad on September 28, 2021, 07:41:28 PM
Quote from: Mick. on May 23, 2020, 06:29:47 PMYes. i'm also waiting on RC3 to come out to revamp the mod for admins only.

Hey mate have you done any work on this for 2.1?
Just curious not hassling.

I can't see any demo etc of what its supposed to look like but does it do prominent announcements similar to this on xenforo:
(blue box near top)
eg https://yttalk.com/threads/anyone-wanna-collab.301449/
 

no, arantor posted an image here of what it looks like
this just uses bbc in a post to stylize an "alert box" around the text
Quote from: Arantor on May 17, 2019, 09:35:57 AMLooks fine to me, as attached.

Your browser may have old CSS in it.