This commit is contained in:
Joey Kimsey
2024-12-02 18:53:48 -05:00
parent 3eec88c228
commit b1b0da0c08
20 changed files with 939 additions and 195 deletions

312
app/config/config.json Normal file
View File

@ -0,0 +1,312 @@
{
"main":
{
"logo":
{
"type": "file",
"pretty": "Site Logo (Used mostly in emails)",
"default": "images/logo.png",
"value": "images/logo.png"
},
"name":
{
"type": "text",
"pretty": "Site Name",
"default": "TTP Example",
"value": "TableTop Elite"
},
"template":
{
"type": "text",
"pretty": "Default Site Template",
"default": "default",
"value": "default"
},
"tokenEnabled":
{
"type": "radio",
"pretty": "Enable CSRF Token for all forms.",
"default": true,
"value": true
},
"loginLimit":
{
"type": "text",
"pretty": "Maximum Login Attempts per hour",
"default": 5,
"value": "5"
}
},
"uploads":
{
"files":
{
"type": "radio",
"pretty": "Enable File Uploads",
"default": true,
"value": true
},
"images":
{
"type": "radio",
"pretty": "Enable Image Uploads",
"default": true,
"value": true
},
"maxFileSize":
{
"type": "text",
"pretty": "Maximum File Size",
"default": 5000000,
"value": "5000000"
},
"maxImageSize":
{
"type": "text",
"pretty": "Maximum Image Size",
"default": 500000,
"value": "500000"
}
},
"database":
{
"dbMaxQuery":
{
"type": "text",
"pretty": "Maximum results per query",
"default": 100,
"protected": true,
"value": 100
},
"dbEnabled":
{
"type": "radio",
"pretty": "Database Enabled",
"default": true,
"protected": true,
"value": true
},
"dbHost":
{
"type": "text",
"pretty": "Database Host (IE: http://localhost:3306)",
"default": "127.0.0.1",
"protected": true,
"value": "194.195.208.99"
},
"dbName":
{
"type": "text",
"pretty": "Database Name",
"default": "ttp-example",
"protected": true,
"value": "tte-com"
},
"dbPassword":
{
"type": "text",
"pretty": "Database Password",
"default": "",
"protected": true,
"value": "lsVb#$D74816"
},
"dbPrefix":
{
"type": "text",
"pretty": "Database table Prefix",
"default": "TTP_",
"protected": true,
"value": "TTP_"
},
"dbUsername":
{
"type": "text",
"pretty": "Database Username",
"default": "root",
"protected": true,
"value": "joeyk"
}
},
"group":
{
"defaultGroup":
{
"type": "customSelect",
"pretty": "The Default Group for new registrations.",
"default": 5,
"value": 5
}
},
"logging":
{
"admin":
{
"type": "radio",
"pretty": "Enable Admin Action Logging.",
"default": true,
"value": true
},
"errors":
{
"type": "radio",
"pretty": "Enable Error Logging",
"default": true,
"value": true
},
"logins":
{
"type": "radio",
"pretty": "Enable Login Logging",
"default": true,
"value": true
}
},
"bugreports":
{
"enabled":
{
"type": "radio",
"pretty": "Enable Bug reporting.",
"default": true,
"value": true
},
"sendEmail":
{
"type": "radio",
"pretty": "Email the user after submitting.",
"default": true,
"value": true
},
"emailTemplate":
{
"type": "text",
"pretty": "Email Template",
"default": "BugReportEmail",
"value": "BugReportEmail"
}
},
"bugtracker":
{
"enabled":
{
"type": "radio",
"pretty": "Enable Bug tracking.",
"default": true,
"value": true
}
},
"calendar":
{
"enabled":
{
"type": "radio",
"pretty": "Enable Calendar.",
"default": true,
"value": true
}
},
"chat":
{
"enabled":
{
"type": "radio",
"pretty": "Enable Chat.",
"default": true,
"value": true
}
},
"dice":
{
"enabled":
{
"type": "radio",
"pretty": "Enable dice usage.",
"default": true,
"value": true
}
},
"dnd":
{
"enabled":
{
"type": "radio",
"pretty": "Enable D&D plugin.",
"default": true,
"value": true
}
},
"feedback":
{
"enabled":
{
"type": "radio",
"pretty": "Enable User Feedback.",
"default": true,
"value": true
},
"sendEmail":
{
"type": "radio",
"pretty": "Email the user after submitting.",
"default": false,
"value": false
},
"emailTemplate":
{
"type": "text",
"pretty": "Email Template",
"default": "feedbackEmail",
"value": "feedbackEmail"
}
},
"initiativeTracker":
{
"enabled":
{
"type": "radio",
"pretty": "Enable tracker usage.",
"default": true,
"value": true
}
},
"npcGeneration":
{
"enabled":
{
"type": "radio",
"pretty": "Enable NPC-Generator usage.",
"default": true,
"value": true
}
},
"rng":
{
"enabled":
{
"type": "radio",
"pretty": "Enable rng usage.",
"default": true,
"value": true
}
},
"tablefinder":
{
"enabled":
{
"type": "radio",
"pretty": "Enable the table finder.",
"default": true,
"value": true
}
},
"timers":
{
"enabled":
{
"type": "radio",
"pretty": "Enable timer usage.",
"default": true,
"value": true
}
}
}

View File

@ -0,0 +1 @@
{"main":{"logo":{"value":"images\/logo.png"},"name":{"value":"Table-Top Elite"},"loginLimit":{"type":"text","pretty":"Maximum Login Attempts per hour","default":5,"value":5}},"database":{"dbMaxQuery":{"value":100},"dbEnabled":{"value":true},"dbHost":{"value":"194.195.208.99"},"dbName":{"value":"tte-com"},"dbPassword":{"value":"lsVb#$D74816"},"dbPrefix":{"value":"TTP_"},"dbUsername":{"value":"joeyk"}}}

View File

@ -133,5 +133,14 @@ if ( ! defined( 'CONFIG_DIRECTORY' ) ) {
define( 'DEFAULT_SESSION_PREFIX', 'TP_' );
// Token
define( 'DEFAULT_TOKEN_NAME', 'TP_SESSION_TOKEN' );
# Bugsnag
define( 'BUGSNAG_API_KEY', '88045bdc058de51139ac1a47dcd5694b' );
// define( 'BUGSNAG_API_KEY', 'cb94acd2a46160589b37cbaad0c61047' );
# Recaptcha
# Google Analytics
# Tell the app; all constants have been loaded
define( 'TEMPUS_PROJECT_CONSTANTS_LOADED', true );

1
app/config/install.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"bugReport":{"pretty":"Can Submit Bug Reports","default":false},"bugTrack":{"pretty":"Can Track Bugs","default":false},"useCalendar":{"pretty":"Can use the calendar feature","default":false},"createEvents":{"pretty":"Can add events to calendars","default":false},"chat":{"pretty":"Can use chat","default":false},"modAccess":{"pretty":"Access Moderator Areas","default":false},"dice":{"pretty":"Can use dice","default":true},"canCreateCharacters":{"pretty":"Can use the character creator","default":true},"canCreateClasses":{"pretty":"Can add Classes.","default":true},"canCreateItems":{"pretty":"Can add Items","default":true},"canCreateMonsters":{"pretty":"Can add Monsters","default":true},"canCreateRaces":{"pretty":"Can add Races","default":true},"canCreateSkills":{"pretty":"Can add Skills","default":true},"canCreateSourceBooks":{"pretty":"Can add SourceBooks","default":true},"canCreateSpells":{"pretty":"Can add Spells","default":true},"feedback":{"pretty":"Can Submit Feedback","default":false},"uploadFiles":{"pretty":"Can upload files","default":false},"useInitiativeTracker":{"pretty":"Can use the tracker","default":true},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"suggest":{"pretty":"Can create suggestions","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"useTableFinder":{"pretty":"Can use the table finder","default":true},"timers":{"pretty":"Can use timers","default":true}}

View File

@ -0,0 +1 @@
{"adminAccess":{"pretty":"Access Administrator Areas","default":false},"addRoute":{"pretty":"Add Custom Routes","default":false},"uploadImages":{"pretty":"Upload images (such as avatars)","default":false},"bugReport":{"pretty":"Can Submit Bug Reports","default":false},"bugTrack":{"pretty":"Can Track Bugs","default":false},"useCalendar":{"pretty":"Can use the calendar feature","default":false},"createEvents":{"pretty":"Can add events to calendars","default":false},"chat":{"pretty":"Can use chat","default":false},"modAccess":{"pretty":"Access Moderator Areas","default":false},"dice":{"pretty":"Can use dice","default":true},"canCreateCharacters":{"pretty":"Can use the character creator","default":true},"canCreateClasses":{"pretty":"Can add Classes.","default":true},"canCreateItems":{"pretty":"Can add Items","default":true},"canCreateMonsters":{"pretty":"Can add Monsters","default":true},"canCreateRaces":{"pretty":"Can add Races","default":true},"canCreateSkills":{"pretty":"Can add Skills","default":true},"canCreateSourceBooks":{"pretty":"Can add SourceBooks","default":true},"canCreateSpells":{"pretty":"Can add Spells","default":true},"feedback":{"pretty":"Can Submit Feedback","default":false},"uploadFiles":{"pretty":"Can upload files","default":false},"useInitiativeTracker":{"pretty":"Can use the tracker","default":true},"memberAccess":{"pretty":"Access Member Areas","default":false},"controlMemberships":{"pretty":"User can Access and Control user memberships.","default":false},"sendMessages":{"pretty":"Can send Messages","default":false},"sendNotifications":{"pretty":"Can send notifications","default":false},"suggest":{"pretty":"Can create suggestions","default":false},"redirects":{"pretty":"Can modify redirects","default":false},"useTableFinder":{"pretty":"Can use the table finder","default":true},"timers":{"pretty":"Can use timers","default":true}}

View File

@ -0,0 +1 @@
{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"dateFormat":{"pretty":"Date Format","type":"select","default":"F j, Y","options":{"1-8-1991":"n-j-Y","8-1-1991":"j-n-Y","01-08-1991":"m-d-Y","08-01-1991":"d-m-Y","January 8, 1991":"F-j-Y","8 January, 1991":"j-F-Y","January 08, 1991":"F-d-Y","08 January, 1991":"d-F-Y","Jan 8, 1991":"M-j-Y","8 Jan 1991":"j-M-Y","Jan 08, 1991":"M-d-Y","08 Jan 1991":"d-M-Y"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"timeFormat":{"pretty":"Time Format","type":"select","default":"g:i:s A","options":{"3:33:33 AM":"g:i:s A","03:33:33 AM":"h:i:s A","3:33:33 am":"g:i:s a","03:33:33 am":"h:i:s a","3:33:33 (military)":"G:i:s","03:33:33 (military)":"H:i:s"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"calendarPreference":{"pretty":"Default Calendar View","type":"select","default":"byMonth","options":{"Daily":"byDay","Weekly":"byWeek","Monthly":"byMonth","Yearly":"byYear","All Events":"events"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"weekStart":{"pretty":"First day of the week for the Calendar","type":"select","default":"sunday","options":{"Sunday":"6","Monday":"7"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"}}

View File

@ -0,0 +1 @@
{"gender":{"pretty":"Gender","type":"select","default":"unspecified","options":["male","female","other","unspecified"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"newsletter":{"pretty":"Receive our Newsletter?","type":"checkbox","default":"true","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"avatar":{"pretty":"Avatar","type":"file","default":"images\/defaultAvatar.png","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"timezone":{"pretty":"Timezone","type":"timezone","default":"America\/New_York","avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png","options":null},"dateFormat":{"pretty":"Date Format","type":"select","default":"F j, Y","options":{"1-8-1991":"n-j-Y","8-1-1991":"j-n-Y","01-08-1991":"m-d-Y","08-01-1991":"d-m-Y","January 8, 1991":"F-j-Y","8 January, 1991":"j-F-Y","January 08, 1991":"F-d-Y","08 January, 1991":"d-F-Y","Jan 8, 1991":"M-j-Y","8 Jan 1991":"j-M-Y","Jan 08, 1991":"M-d-Y","08 Jan 1991":"d-M-Y"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"timeFormat":{"pretty":"Time Format","type":"select","default":"g:i:s A","options":{"3:33:33 AM":"g:i:s A","03:33:33 AM":"h:i:s A","3:33:33 am":"g:i:s a","03:33:33 am":"h:i:s a","3:33:33 (military)":"G:i:s","03:33:33 (military)":"H:i:s"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"pageLimit":{"pretty":"Items Displayed Per Page","type":"select","default":"10","options":["10","15","20","25","50"],"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"calendarPreference":{"pretty":"Default Calendar View","type":"select","default":"byMonth","options":{"Daily":"byDay","Weekly":"byWeek","Monthly":"byMonth","Yearly":"byYear","All Events":"events"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"},"weekStart":{"pretty":"First day of the week for the Calendar","type":"select","default":"sunday","options":{"Sunday":"6","Monday":"7"},"avatar":"\/var\/www\/tabletopelite.com\/images\/defaultAvatar.png"}}

View File

@ -29,6 +29,11 @@ class Home extends Controller {
self::$title = '{SITENAME}';
self::$pageDescription = 'This is the homepage of your new Tempus Project Installation. Thank you for installing. find more info at https://thetempusproject.com';
Views::view( 'index' );
Template::addHeader( 'Access-Control-Allow-Origin: *');
$bugsnag = \Bugsnag\Client::make( BUGSNAG_API_KEY );
\Bugsnag\Handler::register($bugsnag);
$bugsnag->notifyException(new \RuntimeException("Test error"));
}
public function login() {

View File

@ -11,101 +11,8 @@
/**
* Automatically selects/de-selects all check boxes associated with that field
**/
function checkAll(ele) {
var checkboxes = document.getElementsByTagName( 'input' );
if (ele.checked) {
test = true;
} else {
test = false;
}
for ( var i = 0; i < checkboxes.length; i++ ) {
if ( checkboxes[i].type == 'checkbox' ) {
if ( checkboxes[i].name == ele.value ) {
checkboxes[i].checked = test;
}
}
}
}
function copyAll( ele ) {
var eleName = '#' + ele;
var text = $( eleName ).text();
text = text.replaceAll( "''", "\n" ).trim();
text = text.substring( 1, text.length - 1 );
navigator.clipboard.writeText( text );
console.log( '#' + ele );
}
function insertTag( box, tag ) {
var Field = document.getElementById( box );
var currentPos = cursorPos( Field );
var val = Field.value;
var before = val.substring( 0, currentPos );
var after = val.substring( currentPos, val.length );
Field.value = before + '(' + tag + ')' + after;
}
import BugsnagPerformance from '//d2wy8f7a9ursnm.cloudfront.net/v1/bugsnag-performance.min.js'
function cursorPos( el ) {
if ( el.selectionStart ) {
return el.selectionStart;
} else if ( document.selection ) {
el.focus();
var r = document.selection.createRange();
if ( r == null ) {
return 0;
}
var re = el.createTextRange(),
rc = re.duplicate();
re.moveToBookmark( r.getBookmark() );
rc.setEndPoint( 'EndToStart', re );
return rc.text.length;
}
return 0;
}
function getRandomInt(min, max) {
const minCeiled = Math.ceil(min);
const maxFloored = Math.floor(max);
return Math.floor(Math.random() * (maxFloored - minCeiled) + minCeiled);
}
$(document).ready(function() {
$('select').each(function() {
var selectedValue = $(this).attr('value');
if (selectedValue) {
$(this).removeAttr('value');
$(this).find('option').each(function() {
if ($(this).attr('value') === selectedValue) {
$(this).prop('selected', true);
}
});
}
});
});
// with the dynamic footer, you need to adjust the content padding to make sure the footer doesn't overlap the content
window.onload = function () {
function updateFooterPadding() {
var footer = document.querySelector('footer');
var container = document.querySelector('.container-fluid.top-pad');
if ( ! container ) {
return;
}
// footer has no height but its children do!
var footerHeight = Array.from(footer.children).reduce((totalHeight, child) => {
return totalHeight + child.offsetHeight;
}, 0);
footerHeight += 20; // Add 20px for padding
// console.error(footerHeight);
container.style.setProperty('--footer-height', footerHeight + 'px');
}
// Update padding on initial load
updateFooterPadding();
// Update padding on window resize
window.addEventListener('resize', updateFooterPadding);
};
BugsnagPerformance.start({ apiKey: '88045bdc058de51139ac1a47dcd5694b' });

View File

@ -34,6 +34,17 @@
<link rel="stylesheet" href="{BOOTSTRAP_CDN}css/bootstrap.min.css" crossorigin="anonymous">
<!-- Custom styles for this template -->
{TEMPLATE_CSS_INCLUDES}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ETGVZS7PZW"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-ETGVZS7PZW');
</script>
<!-- Bugsnag -->
<script language="JavaScript" crossorigin="anonymous" type="text/javascript" src="https://d2wy8f7a9ursnm.cloudfront.net/v1/bugsnag-performance.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">