aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2024-05-24 18:45:04 -0400
committeralyx <alyx@aleteoryx.me>2024-05-24 18:45:04 -0400
commit46adf996902fb8fb4ce8dbb9b2b0db6203f841e8 (patch)
tree8bff6127d1f3b5f54835a33ba5d89f7d7142a72c
parent07ade7e943105831ad501da0f9bc67eaa3517842 (diff)
downloadvisitors_dot_php-46adf996902fb8fb4ce8dbb9b2b0db6203f841e8.tar.gz
visitors_dot_php-46adf996902fb8fb4ce8dbb9b2b0db6203f841e8.tar.bz2
visitors_dot_php-46adf996902fb8fb4ce8dbb9b2b0db6203f841e8.zip
Config Options
-rw-r--r--.gitignore1
-rw-r--r--visitors.php78
2 files changed, 79 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 61668ce..c6fd4ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.sqlite
*.db
*.json
+*.jsonl
diff --git a/visitors.php b/visitors.php
new file mode 100644
index 0000000..2b5001b
--- /dev/null
+++ b/visitors.php
@@ -0,0 +1,78 @@
+<?php
+
+$config = array();
+define('VERSION', '0.0.1');
+define('GIT_REPO', 'https://git.aleteoryx.me/cgit/visitors_dot_php/');
+
+
+/* CONFIG OPTIONS - COSMETIC */
+
+// Custom CSS: string
+//
+// Will be injected below the builtin CSS. Respects `use_path_info` when being served.
+
+//$config['custom_css'] = 'body { background: red; }';
+
+
+// Use builtin CSS: bool
+//
+// Toggles the builtin CSS
+
+$config['builtin_css'] = TRUE;
+
+
+// Form mode: choice
+//
+// 0 - Only ask for name
+// 1 - Ask for name and website
+// 2 - Ask for name, website, and email
+// 3 - Ask for name and (website or email)
+//
+// Any entries in one mode will display fine in any other.
+
+$config['form_mode'] = 0;
+
+
+// E-Mail display mode: choice
+//
+// 0 - Show an icon with a `mailto:` link
+// 1 - Show an icon with a `mailto:` link, or use the username text as the link if no website is present
+// 2 - Show the text `[e-mail]` with a `mailto:` link
+// 3 - Show the text `[e-mail]` with a `mailto:` link, or use the username text for the link if no website is present
+// 4 - Show the e-mail as escaped text, e.g. 'alyx at aleteoryx dot me'
+
+$config['email_display'] = 0;
+
+
+// E-Mail icon: string
+//
+// Should be the link to an icon for email display modes 0 and 1. Supports base64. If null or empty, defaults to a builtin image.
+
+//$config['email_icon'] = '/static/my_cool_email_icon.gif';
+
+
+/* CONFIG OPTIONS - BACKEND */
+
+// Send assets via PATH_INFO: bool
+//
+// If true, assets like CSS, GIFs, etc, will be served from `/visitors.php/foo.css`.
+// Otherwise, inline them into a single HTML document.
+
+$config['use_path_info'] = FALSE;
+
+
+// Database path: string
+//
+// The path to the database file, in one of 3 formats.
+//
+// *.json - use a JSON array
+// *.jsonl - use newline-delimited JSON objects
+// *.csv - use CSV
+// *.db, *.sqlite, *.sqlite3 - use Sqlite3
+
+$config['db'] = 'visitors.csv';
+
+
+/* --- END OF CONFIG, CODE BELOW, PROBABLY DON'T EDIT PAST THIS POINT --- */
+
+