I hereby claim:
- I am splittingred on github.
- I am splittingred (https://keybase.io/splittingred) on keybase.
- I have a public key whose fingerprint is DDFF 7D05 78C7 C3BD B1B9 45C5 6D10 B616 3AD3 FC69
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$event= $modx->newObject('modEvent'); | |
$event->fromArray(array ( | |
'name' => 'OnMyEvent', | |
'service' => 1, | |
'groupname' => 'MyGroup' | |
)); | |
$event->save(); | |
/* Then associate it with a plugin: */ |
if (!empty($options['showBoards'])) { | |
$c = array( | |
'board' => 0, | |
'groups' => $_groups, | |
); | |
if (!empty($scriptProperties['category'])) $c['category'] = (int)$scriptProperties['category']; | |
$cacheKey = 'discuss/board/user/'.$discuss->user->get('id').'/index-'.md5(serialize($c)); | |
$boardIndex = $modx->cacheManager->get($cacheKey); | |
if (empty($boardIndex)) { |
<?php | |
/** | |
* Use like so: | |
* [[!getTpl? &file=`/path/to/my/file`]] | |
*/ | |
$o = ''; | |
if (file_exists($file)) { | |
$o = file_get_contents($file); | |
} else { $o = 'File not found: '.$file; } | |
return $o; |
$thumbUrl = $item->get('thumbnail',array( | |
'w' => (int)$modx->getOption('imageWidth',$scriptProperties,500), | |
'h' => (int)$modx->getOption('imageHeight',$scriptProperties,500), | |
'zc' => (boolean)$modx->getOption('imageZoomCrop',$scriptProperties,0), | |
'far' => (string)$modx->getOption('imageFar',$scriptProperties,false), | |
'q' => (int)$modx->getOption('imageQuality',$scriptProperties,90), | |
)); | |
/* or */ | |
$thumbUrl = $item->get('thumbnail',array( |
<?php | |
$response = array(); | |
switch ($modx->event->name) { | |
case 'OnDiscussRenderHome': | |
$response['top'] = 'My custom stuff goes here!'; | |
break; | |
} | |
$modx->event->_output = $response; | |
return; |
<?php | |
$eventName = $modx->event->name; | |
switch ($eventName) { | |
case 'OnLoadWebDocument' : | |
$output = $modx->codeContent = $modx->resource->getContent(); | |
preg_match_all('/<pre.*?>(.*?)<\/pre>/ims', $output, $matches); | |
$i = 0; | |
if (empty($matches[1])) return; | |
if (empty($modx->codeMatches)) $modx->codeMatches = array(); |
- Q&A thread types, where specific replies can be marked as answers and moved to the top of the thread, and the title appends [Solved] | |
- Enable FURLs for boards | |
- Enable FURLs for users | |
- Enable ability for users to set "Display Name" | |
- Better post parsing to prevent HTML injection, mistyped tags, etc | |
- Lots of fixes and improvements to URL parsing, better abstraction on that front | |
- Add New Replies to Posts page | |
- Bad words filter | |
- Solr powered search | |
- Improved print page |
<?php | |
$c = $modx->newQuery('modUserGroupRole'); | |
$c->innerJoin('modUserGroupMember','UserGroupMembers'); | |
$c->innerJoin('modUserGroup','UserGroup','UserGroup.id = UserGroupMembers.user_group'); | |
$c->where(array( | |
'UserGroupMembers.member' => $userId, | |
'UserGroup.name' => $userGroupName, | |
)); | |
$role = $modx->getObject('modUserGroupRole',$c); |
<?php | |
/** | |
* Loads the edit file page | |
* | |
* @package modx | |
* @subpackage manager.system.file | |
*/ | |
class SystemFileEditManagerController extends modManagerController { | |
/** @var string The basename of the file */ | |
public $filename = ''; |