use DBI;
use Getopt::Std;
-###################################################
-# GLOBALS
-$dbname = "phpgroupware";
-$dbhost = "192.168.0.2"; # This can be an IP address or name
-$dbport = 3306;
-$dbuser = "phpgroupware"; # This may require an additional '\@localhost'
-$dbpass = "phpgroupware";
-###################################################
+$mydir = `cd \$(dirname $0) 2>/dev/null; pwd`; chomp($mydir);
+unshift @INC,("$mydir/../setup");
+if( -f "$mydir/../setup/db_config.local") { require "db_config.local"; }
+else { require "db_config"; }
%hometeaching_data = ();
%membership_data = ();
use DBI;
use Getopt::Std;
-###################################################
-# GLOBALS
-$dbname = "phpgroupware";
-$dbhost = "192.168.0.2"; # This can be an IP address or name
-$dbport = 3306;
-$dbuser = "phpgroupware"; # This may require an additional '\@localhost'
-$dbpass = "phpgroupware";
-###################################################
+$mydir = `cd \$(dirname $0) 2>/dev/null; pwd`; chomp($mydir);
+unshift @INC,("$mydir/../setup");
+if( -f "$mydir/../setup/db_config.local") { require "db_config.local"; }
+else { require "db_config"; }
###################################################
# Connect to the database
use DBI;
use Getopt::Std;
-###################################################
-# GLOBALS
-$dbname = "phpgroupware";
-$dbhost = "192.168.0.2"; # This can be an IP address or a name
-$dbport = 3306;
-$dbuser = "phpgroupware"; # This may require an additional '\@localhost'
-$dbpass = "phpgroupware";
-###################################################
+$mydir = `cd \$(dirname $0) 2>/dev/null; pwd`; chomp($mydir);
+unshift @INC,("$mydir/../setup");
+if( -f "$mydir/../setup/db_config.local") { require "db_config.local"; }
+else { require "db_config"; }
%hometeaching_data = ();
%membership_data = ();
https://eq.pippins.net/eq.tar
It can also be obtained via the GIT revision control system by pulling from here:
- http://git.pippins.net/eq/
+ http://git.pippins.net/eq/.git
Installing
need to assign this app to the users you want to have be able to use it.
Enable it for each user by going to Site Admin -> User Accounts -> <username> -> edit
Make sure the "eq" application has a checkmark next to it under "Permissions this user has"
- 4) Edit the LOCAL CONFIGURATION section of eq/inc/class.eq.inc.php
- Make sure you update the path locations for your specific:
- upload_target_path & script_path
- 5) Edit the GLOBALS section of the eq/bin/import_ward_data script and fix the permissions
- 6) Edit the GLOBALS section of the eq/bin/parse_ward_data script and fix the permissions
- 7) Try to run eq/bin/import_ward_data & parse_ward_data scripts from the commandline
+ 4) Copy the setup/db_config to setup/db_config.local and change the values in .local appropriately.
+ 5) Copy the setup/eq_config to setup/eq_config.local and change the values in .local appropriately.
+ Make sure you update the path locations for your specific installation locations:
+ upload_target_path & application_path
+ 6) Try to run eq/bin/import_ward_data & parse_ward_data scripts from the commandline
to check for any missing perl library dependencies and mysql connection.
Just run them without command line args.
Install the right perl modules until the scripts run without any errors.
- 8) A graphical representation of the mysql schema used by this application can
+ 7) A graphical representation of the mysql schema used by this application can
be found here: eq/sql/eq.jpg
- 9) Click on the Admin tool in the EQ app to import your initial set of ward data
+ 8) Click on the Admin tool in the EQ app to import your initial set of ward data
obtained from MLS into the EQ application.
- 10) Click on the Admin tool and update the EQ Presidency Table appropriately.
+ 9) Click on the Admin tool and update the EQ Presidency Table appropriately.
The most important thing at this point is to get your district leaders added
for each district you have in your quorum.
- 11) I highly recommend installing phpmyadmin to view/edit/debug mysql tables related to this tool.
+ 10) I highly recommend installing phpmyadmin to view/edit/debug mysql tables related to this tool.
Requirements
function eq()
{
- // LOCAL CONFIGURATION. PLEASE UPDATE AS APPROPRIATE.
- $this->upload_target_path = "/home/users/eqpres/eq_data";
- $this->script_path = "/usr/share/phpgroupware/eq/bin";
- $this->default_ht_num_months = 3;
- $this->default_ppi_num_months = 3;
- $this->default_ppi_num_years = 0;
- $this->default_int_num_quarters = 1;
- $this->default_int_num_years = 0;
- $this->default_att_num_quarters = 1;
- $this->default_vis_num_years = 1;
- $this->max_num_districts = 4;
- $this->time_drop_down_lists = 1;
- $this->monthly_hometeaching_interviews = 0;
- $this->time_drop_down_list_inc = 15;
- $this->default_visit_appt_duration = 45;
- $this->default_ppi_appt_duration = 30;
+ if(file_exists('setup/eq_config.local')) {
+ include('setup/eq_config.local');
+ } else {
+ include('setup/eq_config');
+ }
+
+ $this->script_path = "$this->application_path"."/bin";
$this->max_presidency_members = 99;
$this->max_appointments = 32768;
- // END LOCAL CONFIGURATION
$this->db = $GLOBALS['phpgw']->db;
$this->db2 = $this->db;
$stat_data = "<tr><td><b><font size=-2>$num_companionships Companionships<br>Interview Quarterly Totals:</font></b></td>";
// Print the hometeaching interview stats
- if($this->monthly_hometeaching_interviews == 0) { //Quarterly
+ if($this->monthly_hometeaching_interview_stats == 0) { //Quarterly
for($m=$num_months; $m >=0; $m--) {
$month = $current_month - $m;
if(($month % 3) == 1) { $quarter_total = $ints[$m]; }
}
// Display the totals
- if($this->monthly_hometeaching_interviews == 0) { //Quarterly
+ if($this->monthly_hometeaching_interview_stats == 0) { //Quarterly
$quarter_total = 0;
$totals = "<tr><td><b><font size=-2>$total_companionships Total Comps<br>Interview Quarterly Totals:</font></b></td>";
for($m=$num_months; $m >=0; $m--) {
--- /dev/null
+################################################################################
+# This is a perl module included by the perl scripts for this EQ application.
+# You must modify these values to match your system configuration.
+# Save the resulting file as "db_config.local" in this setup dir.
+# This will prevent your settings from being overwritten by future code updates.
+################################################################################
+
+$dbname = "phpgroupware";
+$dbhost = "192.168.0.2"; # This can be an IP address or name
+$dbport = 3306;
+$dbuser = "phpgroupware"; # This may require an additional '\@localhost'
+$dbpass = "phpgroupware";
+
--- /dev/null
+<?php
+
+///////////////////////////////////////////////////////////////////////////////////
+// This is a configuration/preferences file for your EQ application.
+// You must modify these values to match your system configuration.
+// Save the resulting file as "db_config.local" in this setup dir.
+// This will prevent your settings from being overwritten by future code updates.
+///////////////////////////////////////////////////////////////////////////////////
+
+// The full path to a directory readable and writable by your webserver user
+// that will be used to dump the MLS data uploaded via the web interface to.
+$this->upload_target_path = "/home/users/eqpres/eq_data";
+
+// The full path to the installation location of this module
+$this->application_path = "/usr/local/www/data-dist/phpgroupware/eq";
+
+// Use drop down lists when specifying times in the scheduling tools.
+// If set to 0, free form text fields for the hour and minutes will be used instead.
+// If set to 1, drop down lists will be used for the hour and minute fields
+$this->time_drop_down_lists = 1;
+
+// Compute hometeaching interview stats per month or per quarter
+// If set to 0, stats will be computed per quarter.
+// If set to 1, stats will be computed per month.
+$this->monthly_hometeaching_interview_stats = 0;
+
+// Specify the minute interval increment to use in the time drop down lists
+$this->time_drop_down_list_inc = 15;
+
+// The default visit appointment duration in minutes
+$this->default_visit_appt_duration = 45;
+
+// The default ppi appointment duration in minutes
+$this->default_ppi_appt_duration = 30;
+
+// The default number of months of hometeaching history to show
+$this->default_ht_num_months = 3;
+
+// The default number of months of ppi history to show
+$this->default_ppi_num_months = 3;
+
+// The default number of years of ppi history to show
+$this->default_ppi_num_years = 0;
+
+// The default number of quarters of hometeaching interviews to show
+$this->default_int_num_quarters = 1;
+
+// The default number of years of hometeaching interviews to show
+$this->default_int_num_years = 0;
+
+// The default number of quarters of attendance to show
+$this->default_att_num_quarters = 1;
+
+// The default nubmer of years of visits to show
+$this->default_vis_num_years = 1;
+
+// The maximum number of districts you will ever need to create
+$this->max_num_districts = 4;
+
+?>