Skip to content

A Java based forum checker for phpBB (Tested on V2)

Notifications You must be signed in to change notification settings

saxicek/phpBB_forum_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

phpBB forum checker

A Simple Java based forum checker for phpBB (Tested on V2)

Currently under development. It was created as a way to poll a forum Topic to check for new updates. (Rather than recieve emails for all topics)

It is designed to be run as a CRON task taking in a config file path as it's only argument. (See below for config file example)

Config File

NOTE parts of this config file don't actually do anything yet. These are

  • alerts:allType
  • alerts:replies
  • mailTo:body
  • storage:maxTopics

The config file is a JSON file as described below:

{
    "alerts": {
	"active" : true,
        "type": "one",
        "allType": "separate",
        "replies": false
    },
    "debug": {
        "active": true,
        "clearList": true,
        "dumpFileBase": "/tmp",
	"dumpFileName": "forumPage"
    },
    "forum": {
        "baseURL": "http://www.someForum.com/forum",
        "pageID": 24
    },
    "ignore" : {
	"users" : ["user1", "user2"],
	"posts" : [21,22,23],
	"stickyPosts" : true
    },
    "posts" : {
	"details"  : true,
	"original" : true,
	"replies"  : {
		"active" : true,
		"extractDetails" : false
	}
    },
    "mailFrom": {
        "address": "<username>@gmail.com",
	"name" : "Flight Alert",
        "port": 465,
        "host": "smtp.gmail.com",
        "username": "<username>@gmail.com",
        "password": "<gmail password>"
    },
    "mailTo": {
	"addresses" : [
		"<username>@gmail.com"
	],
        "subject": "New Forum Post {{title}}",
        "body": "/path/to/mustache/file.mustache"
    },
    "storage": {
        "redisKey": "forumTopics",
        "client" : "127.0.0.1",
        "maxTopics": 25
    }
}

Note that dumpFileName is appended with ".html" PageId should be the pageID specified in the page's query string e.g. http://www.someForum.com/forum/viewforum.php?f=24 pageID would be 24 (You SHOULD NOT need to specify viewforum.php in the baseURL)

The body and subject attributes are rendered using mustache https://github.com/spullara/mustache.java Available tags : {{title}} = the thread's title {{url}} = the url to link to the thread (this should be placed inside the href attribute of an <a> tag)

The body attribute may be specified as EITHER a file path to a mustache file OR raw mustache

Ignore: stickyPosts = true means the system WILL NOT alert for sticky posts, false means it will alert for sticky posts

Example mustache file

<html>
	<body>
	    <p>New Forum Post!</p>
	    <p></p><a href="{{url}}">{{title}}</a></p>
	</body>
</html>

TODO

  • concat multiple topics into 1 message
  • allow/disable reply notifications
  • clear out old topics using maxTopics (this may change to a date)

Dependencies

  • redis

NOTE I'll package up a JAR file with project dependancies such as JavaMail and Jedis once I get through the TODO list above

Future Plans

Plugins to do things like (these may/may not happen):

  • extract key details from the posts (who, where, contact number)
  • Check Google Calendar to check schedule for forums which relate to activites
  • Add to calendar if schedule free
  • Move alerts out into a plugin
  • Custom callbacks - shell scripts etc

About

A Java based forum checker for phpBB (Tested on V2)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published