Skip to content

Instantly share code, notes, and snippets.

View NatemcM's full-sized avatar

Nathanael McMillan NatemcM

View GitHub Profile
@NatemcM
NatemcM / sessionmanager.class.php
Created April 23, 2018 07:30 — forked from chrisdempsey/sessionmanager.class.php
SessionManager: A script that can be used for easy control over your session variables
<?php
/**
* SessionManager
* A script that can be used for easy control over your session variables.
* Put this script in your core/components/ folder, inside a sessionman/ subdirectory.
*
* Load this one in your snippets/plugins like;
*
* $sessman = $modx->getService('session','SessionManager', $modx->getOption('sessman.core_path',null,$modx->getOption('core_path').'components/sessionman/'), $scriptProperties);
* if(!($sessman instanceof SessionManager)) { $modx->log(modX::LOG_LEVEL_ERROR, 'Session manager could not be loaded..'); return ''; }
@NatemcM
NatemcM / modx-snippets.php
Created January 13, 2021 10:52 — forked from christianhanvey/modx-snippets.php
Useful snippets for MODX Revo
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php