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.
Options

New Extension: Announcement

edited January 2007 in Vanilla 1.0 Help
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
«134

Comments

  • Options
    Ah very cool, nice work :)
  • Options
    Cool!
  • Options
    very nice..... : )
  • Options
    Is this separate from the Message of the Day extension?
  • Options
    I don't see that one on the Add-Ons page?
  • Options
    Great work, Alex. Many thanks for this extension! Best from Ireland.
  • Options
    Hey BigRed,
    Great Extension, works a treat.
    Although I changed the CSS to align left with 10px padding.
  • Options
    I installed the ext, looks great, but sadly forum gets stuck when it tries to fade away. IE shows an error in the details bar at the bottom. Any ideas what it could be clashing with? It worked great in your demo
  • Options
    @iambigred: The extension installs and I can configure it but when I then go to the Discussions page to try it out I'm getting the following error message: Fatal error: Cannot instantiate non-existent class: announcement in /home/lookhere/public_html/forum/extensions/Announcement/default.php on line 69 Any ideas? TIA
  • Options
    good stuff I really like it!
  • Options
    edited July 2006
    Thanks for your comments, it would be nice to see how you've used it if you could post URL's to your forums :)

    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
  • Options
    May i suggest as an addition to wanderers idea you could also make them role specific?
  • Options
    hurray, more things to check off in the giant roles list! ;)
  • Options
    TreyTrey Charlotte NC New
    I installed it on my forum and I havent customized it up at all yet but it works great for me! you can check it out if you wish forum.skem9.com
  • Options
    Sorry, got mine to work in the end. I just re-uploaded the ext. (?)
  • Options
    Strange, at least it works now :)

    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
  • Options
    Looks like a cool add-on! A few ideas for the future (if not already implemented, in which case I apologise for posting!): * ability to schedule messages: i.e. set start and end-dates and (hence) * ability to have several messages "queued up"
  • Options
    Is there a way to display the announcements globally? Like on all the pages instead of just the main discussions page?
  • Options
    If you want to get dirty you could edit line 51 of the default.php file from:
    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.
  • Options
    Alex, this is JUST what I need! Thank you!
This discussion has been closed.