Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
New Extension: Announcement
I've just made an announcement plugin, which allows you to add an announcement onto the discussion index page, just above the discussion topics. The extension also allows you to modify the announcement text, colors, fade on/off and fade delay via the administrator settings. HTML is also allowed in the announcement text area.
You can see a demo here (no signin required) and download it here
Please let me know if you have any issues or have any suggestions,
Thanks,
Alex
You can see a demo here (no signin required) and download it here
Please let me know if you have any issues or have any suggestions,
Thanks,
Alex
0
This discussion has been closed.
Comments
Great Extension, works a treat.
Although I changed the CSS to align left with 10px padding.
I've noticed a minor bug that it converts " (which are used in HTML, eg for links) into " making links in the announcement break. If anyone knows how to fix this, please let me know!
@ Wanderer
I'll add the ability to change the padding as an option in the next version, as well as an option to select under what circumstances the announcement is shown (eg. all the time, when you are logged in, when you are not logged in). Perhaps also the ability to change which pages it is shown on too.
@ 0bvious
Sorry, I don't have a clue why it's doing that! Can you perhaps email me the rendered source code of your index page when it produces the error?
@ LoOkHerE
The 'announcement' class that the error on line 69 is refering to is definitely there (it's on line 73), and it's strange that it works fine on other peoples installs. I don't really know much about creating plugins, this is my first (which just goes to show that anyone can make a plugin). Are you using Vanilla 1.0, and do you have any other extensions that may somehow conflict with this? You could try disabling and re-enabling the extension, or perhaps deleting it from your server then re-uploading it. Sorry I can't help you further, perhaps someone more experienced in writing extensions could look at my code and see whats causing this.
@ Bergamot
This is what the 'Message of the Day' plugin became. I hadn't really planned out what I was going to do and I decided that 'Did you know' or 'motd' didn't really explain what the plugin did, where as 'Announcement' does. Sorry for any confusion
@ lament
It's definitely on the addon's page, it's here (or try searching for announcement).
Alex
Glad you all like it. I'll look into the improvements you've suggested, I've already added a few (see v1.1) which adds a few more customisable styling options.
If anyone can help out with getting the list of roles and displaying them as checkboxes please let me know. I've had a look at the Page Management extension which does exactly what I want with regards to displaying/formatting the list of roles along with checkboxes, although I can't quite figure out how to port that over into my extension.
Alex
if (in_array($Context->SelfUrl, array("index.php"))) {
to:
if (in_array($Context->SelfUrl, array("index.php","otherpages.php"))) {
with otherpages.php being the page you want to display it on aswell (comments.php, discussions.php etc you need to check the actual filenames i dont have them to hand)
It might be nice as a config option though.