Skip to content

Commit

Permalink
Merge pull request #4 from pjaudiomv/master
Browse files Browse the repository at this point in the history
update config settings, and notifier
  • Loading branch information
pjaudiomv authored Nov 27, 2018
2 parents fbae913 + c9ceb2f commit 6641024
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ its now possible to specify a service body parent, this is usefull for service b

* static $parent_service_body_id = '';

When using this feature if you also want to include the parent service body in the list you must add this to your config as well.

* static $include_parent_service_body_id = true;


These will be added as links to main menu if they exist in the config.
Expand All @@ -50,6 +47,8 @@ Sends an email with all BMLT changes in x amount of days
# install
download the repository and edit the config.php then put on a server and create cron job. the config $homanydays should be set to the same amount of time you set your cron job for.

static $notify_service_body_id = ''; must be set in the config and should probably be the service body parent.

# example
example cron job calls, this would set to call the script at 6pm on sunday

Expand Down
2 changes: 1 addition & 1 deletion bmltnotify.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// show beginning header
$message = "<H2>" .$service_body_name. " CHANGES</H2>Changes for last $howmanydays day(s) from " .date("l jS \of F Y h:i A") . "<br><hr>";

$url = $bmlt_server. "/client_interface/xml/?switcher=GetChanges&start_date=" .$dateminus. "&end_date=" .$today. "&service_body_id=" .$service_body_id;
$url = $bmlt_server. "/client_interface/xml/?switcher=GetChanges&start_date=" .$dateminus. "&end_date=" .$today. "&service_body_id=" .$notify_service_body_id;

// get xml file contents
$xml = simplexml_load_file($url);
Expand Down
6 changes: 3 additions & 3 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
static $service_body_name = '';
static $service_body_shortname = '';
static $service_body_website = '';
static $service_body_id = '1'; // the BMLT parent service body id number
static $parent_service_body_id = '1'; // the BMLT parent service body id number
static $howmanydays = '30'; // this should be set to the same number of days your cron job is set to


// Notifier Config Options
static $notify_service_body_id = ''; // this sets the service body id for the notifier and most likely should be set to parent service body

//static $from_name = 'Service Body Admin';
//static $from_email = '[email protected]';

static $smtp_to_name = '';
static $smtp_to_address = '';
Expand Down

0 comments on commit 6641024

Please sign in to comment.