Follow Me on Twitter!

Last Update: 27 November 2006

Plugin Name: Easy Announcement
Version: 1.1
Plugin URI: http://www.cypherhackz.net/plugins-themes/easy-announcement/
Description: An easy way to display announcement on your site without have to edit your theme file.
Author: Fauzi Mohd Darus
Author URI: http://www.cypherhackz.net

Download: cypher_easy-announcement.zip

How to Install

  1. Download the plugin file.
  2. Extract file cypher_easy-announcement.zip.
  3. Upload easy_announcement folder into your Wordpress plugin folder.
  4. CHMOD easy_announcement folder to 755 and announce.txt file to 666.
  5. Activate the plugin in your Plugins admin panel.
  6. Put this function < ?php easy_announcement(); ?> in your theme file. Eg: index.php
  7. Done!

How to Upgrade

  1. Download the plugin file.
  2. Extract file cypher_easy-announcement.zip.
  3. Upload easy_announcement.php to easy_announcement folder to replace the previous version plugin.
  4. Done!

How to Update the Announcement

  1. In your Admin Panel, go to Plugins.
  2. Scroll down to Easy Announcement plugin.
  3. Under Description there is a hyperlink text “HERE”.
  4. Click on it and update your annoucement.

Version History

  • 1.1
    - Add Edit Announcement link in the announcement
    - Now can use newline instead of using
    - Bugs fixed
  • 1.0
    - Initial Release

40 Responses to “WP Plugin: Easy Announcement”

  1. ben
    November 29th, 2006 | 1:47 pm | Reply

    plugin doesn’t even show after i chmod the appropriate files to 666 as instructed.. so how am i supposed to activate it :)
    please let me know man!

    thanks!

  2. CypherHackz
    November 29th, 2006 | 2:36 pm | Reply

    the CHMOD used because we want to edit/write to the file. the announcement should display properly after you put the plugin code and activate it. let me know if you still have any problems. :)

  3. ben
    November 29th, 2006 | 3:40 pm | Reply

    i didnt understand ?? i did CHMOD the files… but the plugin ( in the plugins area) doesnt show… so i cannot even activate it. you understand what im saying?

  4. CypherHackz
    November 29th, 2006 | 5:37 pm | Reply

    i guess i know what could be the problem. try download back the plugin and upload file easy_announcement.php into easy_announcement folder. than refresh your plugin page and you will see the activate link. hope this helps. :)

  5. ben
    November 30th, 2006 | 1:29 am | Reply

    i did a chmod 777 on the folder and now it is being displayed and it works fine… :)
    any idea why this is?

    just a general questions cypher:
    what should the permission be on the folder /plugins/ and /wp-content/ and /themes/
    any idea?

  6. CypherHackz
    November 30th, 2006 | 12:42 pm | Reply

    i’m not sure. like i said in previous comment, we chmod it because we want to write the file.

    about the question, chmod them to 755 is just fine. :)

  7. ben
    November 30th, 2006 | 12:56 pm | Reply

    thanks cypher…. last question… can you add html to it? like a

  8. CypherHackz
    November 30th, 2006 | 1:01 pm | Reply

    did you mean put html tag in the announcement? yes you can. try it. :)

  9. ben
    November 30th, 2006 | 1:07 pm | Reply

    i will :D :D

    thanks!

  10. dirk
    February 2nd, 2007 | 7:19 pm | Reply

    I do not understand how to add a plugin.Where and how do I do this.When I download it asks me if I want file saved to disk how do I get it onto my blog.
    If I was to give you access could you do it for me…

  11. CypherHackz
    February 2nd, 2007 | 7:24 pm | Reply

    read my How to Install in the readme included. :) if you still got problems, feel free to ask me.

  12. craig
    February 22nd, 2007 | 12:18 am | Reply

    when i activate the plugin and drop the dode in my index.php it breaks my blog.

    I get this error: Fatal error: Call to undefined function: easy_announcement() in /home/content/c/m/o/cmolway/html/blog/wp-content/themes/amalgam/index.php on line 5

    anything after the easy_announcement code is blank.

    any ideas? I tried both CHMOD 666, 755 on the files listed in the readme file.

  13. craig
    February 22nd, 2007 | 12:46 am | Reply

    I tried it again from scratch and now I am getting this error:
    Warning: file(): URL file-access is disabled in the server configuration in /home/content/c/m/o/cmolway/html/blog/wp-content/plugins/easy_announcement/easy_announcement.php on line 16

    Warning: file(http://www.craigmolway.com/blog/wp-content/plugins/easy_announcement/announce.txt): failed to open stream: no suitable wrapper could be found in /home/content/c/m/o/cmolway/html/blog/wp-content/plugins/easy_announcement/easy_announcement.php on line 16

    Warning: implode(): Bad arguments. in /home/content/c/m/o/cmolway/html/blog/wp-content/plugins/easy_announcement/easy_announcement.php on line 17

    al least the blog is still there.

  14. craig
    February 22nd, 2007 | 12:52 am | Reply

    the CHMOD breaks the blog. CHMOD 775 causes the second error.

  15. CypherHackz
    February 26th, 2007 | 9:27 am | Reply

    you chmod the folder to 755 and the announce.txt to 777

  16. craig
    February 26th, 2007 | 11:32 am | Reply

    made the change but it is still giving me an error:

    Warning: file(): URL file-access is disabled in the server configuration in /home/content/c/m/o/cmolway/html/blog/wp-content/plugins/easy_announcement/easy_announcement.php on line 16

    Warning: file(http://www.craigmolway.com/blog/wp-content/plugins/easy_announcement/announce.txt): failed to open stream: no suitable wrapper could be found in /home/content/c/m/o/cmolway/html/blog/wp-content/plugins/easy_announcement/easy_announcement.php on line 16

    Warning: implode(): Bad arguments. in /home/content/c/m/o/cmolway/html/blog/wp-content/plugins/easy_announcement/easy_announcement.php on line 17

  17. CypherHackz
    February 26th, 2007 | 12:01 pm | Reply

    does your hosting provider allow you to read from file?

  18. chatca
    March 28th, 2007 | 1:31 am | Reply

    too difficult to find plugin like this, increase the power of wordpress theme.

  19. Teo
    April 1st, 2007 | 10:49 am | Reply

    Great plugin!
    I’ve added it to my blog and will use it in future to announce special offers to my subscribers. Your plugin will make sure they won’t miss it.
    Currently I just have a Welcome message there.
    Thanks again,

  20. CypherHackz
    April 2nd, 2007 | 9:30 am | Reply

    [Comment ID #33785 Will Be Quoted Here]

    [Comment ID #34971 Will Be Quoted Here]

    thanks for your comments. it motivated me to make more plugins. :)

  21. benja22
    April 8th, 2007 | 1:12 pm | Reply

    My current theme uses sidebar widgets. How can I make the announcement a widget that I can manipulate in my columns?

  22. CypherHackz
    April 9th, 2007 | 10:50 am | Reply

    i’m not sure. maybe i will release this plugin to make it works with widget. :)

  23. benja22
    April 12th, 2007 | 11:12 am | Reply

    That would be fantastic! I hope it goes really well for you.

  24. Steve Hill
    June 20th, 2007 | 12:45 am | Reply

    I too was having the same problem that Craig mentions above, and it rang a bell with a similar problem I had before. It is to do with the host, in my case DreamHost. I adapted your plugin to accomodate the solution, which I found here.

    Here is my updated version:

    function easy_announcement() {

    $path = get_settings('siteurl') . "/wp-content/plugins/easy_announcement/";
    $announcefile = "announce.txt";
    $url = $path.$announcefile;

    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout

    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);
    curl_close($ch);

    // display file
    echo $file_contents;

    global $user_ID; if ( $user_ID ) {
    echo '[Edit Announcement]';
    }

    }
    ?>

    Hope this helps someone.

  25. Steve Hill
    June 20th, 2007 | 12:50 am | Reply

    Sorry. Some of that formatting with the code didn’t work right. And I made a change at the bottom to get the nl2br thing back to how it was in the original.


    function easy_announcement() {

    $path = get_settings('siteurl') . "/wp-content/plugins/easy_announcement/";
    $announcefile = "announce.txt";
    $url = $path.$announcefile;

    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout

    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);
    curl_close($ch);

    // display file
    print nl2br($file_contents);

    global $user_ID; if ( $user_ID ) {
    echo '[Edit Announcement]';
    }

    }
    ?>

  26. Muse
    September 22nd, 2007 | 11:52 pm | Reply

    Cool plug in. Already use for my site…

    http://www.klblues.com/v2/

    Keep it up bro!.

  27. amin2u
    February 25th, 2008 | 3:33 pm | Reply

    Bro…How do I enable my editor and author to update the annoucement? And is it possible to put html or at least image?

  28. Malte
    April 17th, 2008 | 10:49 pm | Reply

    Hi,
    i really like Easy Announcement, but there is, as far as I see, no templates.php in WordPress 2.5?

    What I do now? I copied the old templates.php in my wp-admin-folder, but I don’t really like that.

    Thanks for the plugin anyways!

  29. Kim
    April 19th, 2008 | 9:46 pm | Reply

    This doesn’t appear to work in Wordpress 2.5

  30. DeKaN
    May 6th, 2008 | 11:02 pm | Reply

    Hi Cypher, I want to make a shoutout on my blog. I want to have more reader friendly version. May I alter your widget for this? If you can do that earlier than me, let me know. I’ll just download yours. :)

  31. fornetti
    August 31st, 2008 | 12:23 pm | Reply

    I do not believe this

  32. Rumait
    August 2nd, 2009 | 4:48 pm | Reply

    If its work, I will try

Leave a Reply