* Reset Whole View to page view, should still set the search option till it is ticked.
* Unticking Keep in Session should be honored on next browsing.
* Global view overrides. These get generated in the db if set on logon. And used instead of the normal view.
+ * Overrides must always show todays log entries, regardless of criteria.
* VIEW_OVERRIDE_SYSLOGS={0/1}, anon if set 1-true, will hide older than today system logs. Doesn't affect category and keywords searches/views.
* VIEW_OVERRIDE_WHERE={""/{your where clause}}, allows your own WHERE override. Doesn't affect category and keywords searches/views.
* i.e. <<VIEW_OVERRIDE_WHERE<"RTF==1 OR STICKY==1">>>, will show only these type of log entries.
- * i.e. <<VIEW_OVERRIDE_WHERE<"DATE<TODAY+30days">>>, will show only logs less then 30 days old.
+ * i.e. <<VIEW_OVERRIDE_WHERE<"DATE > DATE('now','start of month', '-2 month')">>>, will show only logs from current last two months.
* i.e. <<VIEW_OVERRIDE_WHERE<"ID_CAT!==(select id from cat where name like 'system log')>>>, same as setting <<VIEW_OVERRIDE_SYSLOGS<<1>>>.
* Page section plugins.
* Configured in main.cnf.
America/Texas=America/Chicago
>>
+/*
+ Global view overrides. These get generated in the db if set on logon. And used instead of the normal data view.
+ Overrides must always show todays log entries, regardless of criteria.
+ Overrides don't affect category and keywords desired searches and views. They are mainly useful to filter out
+ the not required to see on the main pages.
+ NOTE - These settings AND on VW_LOG_WITH_EXCLUDES if they are set. VW_ prefix signifies, database view,
+ meaning this will be created. Based on the settings bellow you make. An interesting concept, don't you think?
+*/
+
+#######################
+# VIEW_OVERRIDE_SYSLOGS overrides not to show system logs older than today.
+# Default for 0, disabled.
+<<VIEW_OVERRIDE_SYSLOGS<0>>>
+
+#######################
+# VIEW_OVERRIDE_WHERE overrides what to, or not to select.
+# Default is not being used. OLDER_THAN keyword translates to appropriate SQL.
+# By either months, days, hours. From current time.
+# i.e VIEW_OVERRIDE_WHERE<ID_CAT!=6 OR OLDER_THAN=2months>, this instructs skip older then to months logs and all sys logs.
+# i.e VIEW_OVERRIDE_WHERE<ID_CAT>=6>, this instructs skip all categories bellow and including sys logs..
+<<VIEW_OVERRIDE_WHERE<"">>>
+
<<CONFIG<4>
00|$RELEASE_VER = 2.1`LifeLog Application Version.
if(!$curr_tables{Settings->VW_LOG}) {
$db->do(Settings::createViewLOGStmt()) or LifeLogException -> throw("ERROR:".$@);
}
+ # From 2.2+
if(!$curr_tables{Settings->VW_LOG_WITH_EXCLUDES}) {
# To cover all possible situations, this test elses too.
# As an older existing view might need to be recreated, to keep in synch.
}
+sub createPageViewWhereOverrideSQL {
+
+ my ($where,$days) = ("",0);
+ my $parse = $PAGE_EXCLUDES;
+ my @a = split('=',$parse);
+ if(scalar(@a)==2){
+ $days = $a[0];
+ $parse = $a[1];
+ }
+ @a = split(',',$parse);
+ foreach (@a){
+ $where .= " ID_CAT!=$_ AND";
+ }
+
+ if(Settings::isProgressDB()){$where = "WHERE $where AND a.date >= (timestamp 'now' - interval '24 hours')"}
+ else{$where = "WHERE $where AND a.date >= date('now', '-24 hour')"}
+
+
+ return Settings::createViewLOGStmt(Settings->VW_LOG_OVERRIDE_WHERE,$where);
+
+}
+
sub populate {
# This is the default developer release key, replace on istallation. As it is not secure.
use constant CIPHER_KEY => '95d7a85ba891da';
use constant CIPHER_PADDING => 'fe0a2b6a83e81f13a2d76ab104763773310df6b0a01c7cf9807b4b0ce2a02';
-# Default VIEW for all pages.
+
+# Default VIEW for all pages, it lists and sorts on all logs, super fast server side.
use constant VW_LOG => 'VW_LOG';
-# Optional instructional VIEW from config file replacing above default.
+
+# Optional instructional VIEW from config file replacing VW_LOG.
+# Filtering out by category ID certain specified entries.
use constant VW_LOG_WITH_EXCLUDES => 'VW_LOG_WITH_EXCLUDES';
+# Optional instructional VIEW from config directly overriding the
+# where clause for data being delivered for pages.
+# This view will always return all last 24 hour entered log entries.
+# This view AND's by extending on VW_LOG_WITH_EXCLUDES, if is also set, which is something to be aware.
+# Otherwise, similar just replaces the VW_LOG to deliver pages.
+#
+use constant VW_LOG_OVERRIDE_WHERE => 'VW_LOG_OVR_WHERE';
+
+
+
#DEFAULT SETTINGS HERE!
our $RELEASE_VER = '2.1';
our $TIME_ZONE = 'Australia/Sydney';