[INACTIVE][INFO] SimpleNews v0.5 - Lightweight server news and information plugin [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Gr3y, Jun 9, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Gr3y

    SimpleNews
    Version 0.5.2

    Announcement: Version 0.6 is in the works with a complete rewrite of the permissions code to support for PermissionsBukkit! Expect it around the new year... I hope! - Grey, 9th Dec

    SimpleNews is a very lightweight plugin that allows you to deliver news, information and announcements to your users. It is a far more elegant solution than trying to fit everything into the server MOTD!

    Features:
    • Permissions integration (Not required)
    • Color support!
    • Single or multiple named pages of news
    • News editing in-game and through files
    • No need to reload to see changes
    • Extremely lightweight and unobtrusive.
    • Auto-Updating!
    • Group news broadcasting
    • Display main news on player login (optional)
    Download
    SimpleNews v0.5.2 [Jar]

    Commands:
    Basic Commands (open)

    /news
    This command simply reads the "main" news file to the user, including a list of other news pages.
    Permissions required: simplenews.read.main
    Screenshot

    /news «entry name»
    This command will read the contents of the news page name specified.
    Permissions required: simplenews.read.<page name>
    Screenshot

    /setnews «entry name» «news content»
    This command will set the contents of the news file to whatever is specified in the content argument.

    Appending Text
    To append text to an existing page, append a "+" to the page name.
    eg, to append to the main article use:
    "/setnews main+ This is some appended text"

    Colors
    To add a color to an entry, use the "&" symbol followed by the color found here.
    eg, "/setnews main white demo &c red demo &9 blue demo &a green demo" - Screenshot

    Lines
    New lines can be added using "@" where a new line needs to be placed.
    Note: When editing the news via the files, use of "@" is not necessary. The use of "@" to denote new lines is only used when editing news in-game.

    News entries can also be edited (with no file extension) as text files from the filesystem.

    Important Note: Please refrain from using special characters, periods or spaces in page names - they are filtered for technical reasons.
    Advanced Usage & Custom Configuration (open)

    Display news on player login
    In the config.yml file (Found in the SimpleNews directory) change the following line:
    Code:
    newsonlogin: true
    Broadcast a news entry
    To broadcast a news entry to every player with read permissions for that entry (after it is updated, for instance), simply use the following command and flag:
    /news -broadcast «page name»

    The small text header displayed before the news broadcast can be changed (colors are supported using the "&" symbol) in the config.cfg file by adding the following line:
    Code:
    broadcastheader: «Your header»
    Permissions: The player must have the permissions node "SimpleNews.broadcast" in order to make a broadcast.

    Notify players of a news update
    To notify every online player (with read permissions for that entry) of a news update, use the following command and flag:
    /news -notify [entry name]
    If you do not specify an entry name, the default "main" is assumed.

    Reload SimpleNews configuration without restarting
    To make SimpleNews reload its configuration file without having to restart the server, use the following command and flag:
    /news -reload
    Permissions: The player must have the permissions node "SimpleNews.reload" in order to reload configuration.

    Explicitly define news entries
    Some users had problems with garbage files spamming their news listings.

    To fix this, you can add a list of explicit news entries to the "newsfiles" configuration line (comma delimited). Please ensure that your list is inside single quotes!

    By default it is set to "!all", which will display all (non configuration) files in the SimpleNews directory. To stop this functionality, remove the "!all" from the list.

    The /setnews command is set to append to this list automatically.

    Other flags
    SimpleNews also supports two other flags. No permissions are required to use them.
    -help : This displays some help information about the plugin.
    -version: This displays the version and author information.

    Installation:
    Installation (open)

    Simple download the jar file, place it into the plugins directory and start the server.

    The default news entry "main" will be created in the /plugins/SimpleNews directory. You should put your main news inside using the in-game commands or by editing the file manually.

    If you use Permissions, then you will need to apply the following:
    Regular Users: 'SimpleNews.read.*'
    Staff: 'SimpleNews.write'

    Permission to read individual entries can be given by applying the following Permission node:
    Selective entry permission: 'SimpleNews.read.[entry name]'

    Future Development
    Version 0.6
    • MySQL support (requested by Alfw)
    • Have an idea? Please post it! I am more than happy to help!
    Change Log:
    Version 0.5.2
    • Improved the update code to allow for release notes
    • Switched to the built-in Bukkit configuration method
    • Added functionality to define news pages explicitly
    Version 0.5.1b, 0.5.1c, 0.5.1d
    • Temporary fix: Plugin now works with Permissions plugin version 3.1.x and 2.7.x
    • Left some testing code in the plugin (oops!) - removed it.
    Version 0.5.1
    • Tidied up a lot of code
    • Changed news broadcasting to be group-aware
    • News listing now only shows pages that the player has permission to view
    Older Change Logs (open)

    Version 0.5
    • Changed the code structure significantly
    • ...made it a little messier too... :(
    • Implemented news broadcasting
    • Implemented the NewsOnLogin feature
    Version 0.4.1, 0.4.2 and 0.4.3- Minor Updates:
    • A few minor bug fixes, code restructure and cleanup
    • Improved auto-update capabilities
    • Added handler for file permission errors
    • Fixed an unhanded exception bug
    Version 0.4
    • Implemented auto-update script - courtesy of JayJay110
    • Added appending to news pages
    • Cleaned up code a little
    Version 0.3.1, 0.3.2 and 0.3.3 - Minor Updates:
    • Removed Permissions dependency bug
    • Fixed incorrect plugin.yml contents
    • Made some code corrections - courtesy of CaptainAwesome7 :)
    • Fixed a bug introduced that would duplicate news lines
    Version 0.3:
    • Public release of plugin
    • Enabled color support to news pages
    • Added automatic plugin directory setup
    Version 0.2
    • Enabled multiple news pages
    • Enabled permissions integration
    • Added error handlers in case of file read/write errors.
    Version 0.1
    • Initial release
    This plugin was based on Yet Another Rules Plugin by marvinbek, but has now been extensively modified.


    Note: The auto-updater will only function assuming that the plugin is working. If CraftBukkit is updated and the plugin breaks, you will have to update manually.

    Please, I ask that you let me know if this is even remotely useful to you! :)
     
    Undrtakr likes this.
  2. Offline

    fatmarley

    thanks for the update...will get crackin on it.

    Getting this now.

    Code:
    2011-06-29 20:45:26 [INFO] mat212 [/122.148.147.207:49894] logged in with entity id 4907 at ([world] 51.51448159611727, 68.0, -176.8816585836018)
    2011-06-29 20:45:26 [SEVERE] Could not pass event PLAYER_JOIN to SimpleNews
    java.lang.NoSuchMethodError: com.nijiko.permissions.PermissionHandler.getPrimaryGroup(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    at me.Grey.SimpleNews.SimpleNews.LoadPlayer(SimpleNews.java:510)
    at me.Grey.SimpleNews.SimpleNewsPlayerListener.onPlayerJoin(SimpleNewsPlayerListener.java:18)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:126)
    at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
    at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  3. Offline

    feildmaster

    It seems to be passing (or maybe it's a typo) the wrong data (or arguments) to the permissionhandler. @Gr3y should be able to fix that easily enough... (I'm not exactly looking at the plugin though)
     
  4. Offline

    Gr3y

    Right! Thanks for the bug tip-off!
    @fatmarley Are you using the latest Permissions plugin? The java.lang.NoSuchMethodError would suggest that you are using an older version...
     
  5. Offline

    fatmarley

    i'm still on 2.7.2, waiting for the mods i use to catch up.
     
  6. Offline

    Gr3y

    Ah, that could be the problem. I'll take a look at adding compatibility with 2.7.x, it seems I broke backwards compatibility with the last update...

    @fatmarley I have released a patched version that works with 2.7.x and 3.1.x. SimpleNews should update itself on its next restart.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  7. Offline

    fatmarley

    thx, really commendable how well and serious you are taking your development. It might not be much, but i would like to send you a few bucks as a thanks from our server.
     
  8. Offline

    Xerial

    Could you block the file .DS_Store from showing up in the news? It is a hidden file in a Mac that always generates.

    It shows up in the news: "News pages: .DS_Store, main, etc.

    Great plugin btw :3
     
  9. Offline

    zookalicious

    Whenever I log in to my server with Simple News installed, I get "Your group is Admin" (or the permissions group) at log in. I'm not sure why this comes up, but it's a bit annoying because it cuts off the rest of the welcome banner. I tested it thoroughly and it seems to be Simple News that causes this. Is there any way to disable this message? Also awesome plugin. I use it a lot.


    Also I second this. I'll be migrating to a Linux box soon, but this is a bit of a bug.
     
  10. Offline

    Gr3y

    @zookalicious ARGH! That was part of my testing.... I'll get rid of it ASAP. That should never have found its way into the public plugin =/

    EDIT: I have fixed this and released a new version. SimpleNews should update itself on its next restart and fix the issue.

    @Xerial I have also fixed the .DS_Store issue :)
     
  11. Offline

    zookalicious

    Holy Hell that was quick! Yeah I assumed it was part of testing :p

    Oh and the .DS_Store too! Awesome! I just updated and both fixes are implemented perfectly.

    Once again, fantastic plugin! My players love it and we've found a lot of uses for it (announcing PvP area results, new structures, contests, game times, etc). Thanks for all the work you've put in to it!

    EDIT: This might just be me having made a mistake, but I found in order to get rid of the .DS_Store file, I had to remove it once manually since it was still showing up. Once I turned off the server, deleted the file, and turned the server back on (while browsing that folder in Finder to regenerate the .DS_Store file) it ignored it properly :)
     
  12. Offline

    beowulf

    Actually, I think that the plugin should only list pages that have been added via the plugin or listed in its config. So the config file could have an area like this:

    Stories:
    main
    help
    gossip

    Meaning that the files main, help, and gossip are available, but no others. Then we could either edit config.cfg ourselves to add a file, or the /setnews command could add the line when needed.

    I think this is fundamental, because you can't possibly anticipate the crap that will be in everybody's folders. You need to make this more declarative and less inferential.

    For example, my text editor (the unsurpassed and undervalued EditPad Pro) allows me to keep backups of my text files automatically. There are many ways to do this, but I currently choose to store them in a hidden subdirectory called __history. I was testing the plugin tonight, but don't like what people see when they type /news:

    News Pages: config.cfg, main, __history​

    <and then the contents of main>​

    Clearly this is a problem, but should be easy to solve. I'd be happy to edit the file in return for the users not knowing the name of the config file or my backup folder. Thoughts?
     
  13. Offline

    rockiesfan1234

    @beowulf i second that. When people type /news the first thing it shows are the "News Pages" and the news pages that are shown are "config.cfg and main. But config.cfg is a config file not a file that i added news too..i also tried creating a folder in the SimpleNews directory called "Config" and put the config.cfg in there but it still showed up on the "News Pages." Is there a way to get rid of this or is this a bug?
     
  14. Offline

    Gr3y

    @rockiesfan1234 Thats a bug - config.cfg should never show up in your news pages. Can anybody else confirm this?

    @beowulf I shall update the plugin asap to be more selective with the news entries! :)
     
  15. Offline

    rockiesfan1234

    @Gr3y is there a way that i can fix this bug or will you fix in next update?
     
  16. Offline

    Mountainmon

    Can you set news to pop up at certain intervals? Like every 5 minutes the rules pop up for any new person that joins, or a random broadcast every 3 minutes.
     
  17. Offline

    Gr3y

    @rockiesfan1234 This will be fixed in the next update - My development environment is currently out of action, this may take a day or two :( I'm working on it now.

    @Mountainmon I will add this to the feature set for version 0.6. May I suggest that you use SimpleTips until this is implemented :)
     
  18. Offline

    rockiesfan1234

    @Gr3y take as much time as you need. i have not given anyone permission to read it yet. so i wont give them permission to read it till bug fixed :)
     
  19. Offline

    Gr3y

    @rockiesfan1234 The bug has now been fixed :)
    @beowulf With the 0.5.2 update, you can now explicitly define news entries! See the documentation for details. It is off by default...

    If you have any questions, let me know! :)
    And please report any bugs :p
     
  20. Offline

    rockiesfan1234

    Thank you! Works perfectly now! :)
     
  21. Offline

    beowulf

    Thanks @Gr3y!
     
  22. Offline

    EcoMaster21

    I just started using this plugin, and I have to say, it sure is simple and effective!

    If possible, though two features would make this plugin even better. One, I'd like to be able to use the Broadcast command from my server console. Right now, when I use any SimpleNews command in the console, the plugin simply returns the /news command syntax options. This would allow administrators to execute a broadcast through the plugin, which I think would be great.

    Then, I wonder, how hard would it be to assign write permissions per page? I'd like to give my users the opportunity to write their own content without being able to edit other pages. Perhaps a permissions system such as SimpeNews.write.<pagename> would work in this case?

    New features or not, this plugin accomplishes exactly what I needed on my server, and I'm grateful to have it around :D
     
  23. Offline

    Excalibur42

    Perhaps a command to delete news pages would be handy... /delnews ???
     
  24. Offline

    Undrtakr

    Thanks! Great plugin and works as simple as you named it!
     
  25. Offline

    fatmarley

    Color possible?
     
  26. Offline

    Zombiemold

  27. Offline

    Gr3y

  28. Offline

    JeffLeong51

    Can you make it like when a Player enter a game then they will see the news.The news will automatic pop out something like that
     
  29. Offline

    Gr3y

    @JeffLeong51 - Yes, please see the "Advanced Usage & Custom Configuration" section of the post.

    In the config.yml file (Found in the SimpleNews directory) change the following line:
    Code:
    newsonlogin:true
     
  30. Offline

    JeffLeong51

    Thanks bro :cool:
     
  31. Offline

    gartral

    Are there permissions that you forgot too document? I cant /news -broadcast or /news notify on my server, and I'm OPed
     
Thread Status:
Not open for further replies.

Share This Page