This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo dirname(__FILE__)."<br>"; | |
$locales = ["af_NA", "af_ZA", "af", "ak_GH", "ak", "sq_AL", "sq", "am_ET", "am", "ar_DZ", "ar_BH", "ar_EG", "ar_IQ", "ar_JO", "ar_KW", "ar_LB", "ar_LY", "ar_MA", "ar_OM", "ar_QA", "ar_SA", "ar_SD", "ar_SY", "ar_TN", "ar_AE", "ar_YE", "ar", "hy_AM", "hy", "as_IN", "as", "asa_TZ", "asa", "az_Cyrl", "az_Cyrl_AZ", "az_Latn", "az_Latn_AZ", "az", "bm_ML", "bm", "eu_ES", "eu", "be_BY", "be", "bem_ZM", "bem", "bez_TZ", "bez", "bn_BD", "bn_IN", "bn", "bs_BA", "bs", "bg_BG", "bg", "my_MM", "my", "ca_ES", "ca", "tzm_Latn", "tzm_Latn_MA", "tzm", "chr_US", "chr", "cgg_UG", "cgg", "zh_Hans", "zh_Hans_CN", "zh_Hans_HK", "zh_Hans_MO", "zh_Hans_SG", "zh_Hant", "zh_Hant_HK", "zh_Hant_MO", "zh_Hant_TW", "zh", "kw_GB", "kw", "hr_HR", "hr", "cs_CZ", "cs", "da_DK", "da", "nl_BE", "nl_NL", "nl", "ebu_KE", "ebu", "en_AS", "en_AU", "en_BE", "en_BZ", "en_BW", "en_CA", "en_GU", "en_HK", "en_IN", "en_IE", "en_JM", "en_MT", "en_MH", "en_MU", "en_NA", "en_NZ", "en_MP", "en_PK", "en_PH", "en_SG", "en_Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
write all formvalues as well as the complete formit config into modx error log | |
*/ | |
$modx->log(xPDO::LOG_LEVEL_ERROR, "snippetname values: " . print_r($hook->getValues(), true)); | |
$modx->log(xPDO::LOG_LEVEL_ERROR, "snippetname config: " . print_r($hook->formit->config, true)); | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
by kairon - http://www.unchi.co.uk/author/admin/ | |
Get all members of a user group in MODx Revolution. This can been done by accessing the database in the following way. | |
<?php | |
$usergroup = 4; | |
$c = $modx->newQuery('modUser'); | |
$c->innerJoin ('modUserProfile','Profile'); | |
$c->innerJoin ('modUserGroupMember','UserGroupMembers'); | |
$c->innerJoin ('modUserGroup','UserGroup','`UserGroupMembers`.`user_group` = `UserGroup`.`id`'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sample plugin to add a "createdby and createdon" field on a resource form | |
* Background: Issue #12305 "Adding createdon/createdby/publishedby/etc. to settings" | |
* https://github.com/modxcms/revolution/issues/12305 | |
* | |
* Original author: rtripaul | |
* Original source: https://gist.github.com/rtripault/7306c8487a39fd1ce0db5f334c99be57 | |
* | |
* @var modX $modx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* seoSuiteRecoverLongtitle v:0.0.1 | |
* Last edited: 2022-05-01 | |
* | |
* AUTHOR: | |
* info@pepebe.de | |
* | |
* PLUGIN EVENT(S): | |
* OnDocFormRender |
tail -fn20 /log/error.log
Backup of a an article write by Susan Ottwell in February 2008
The original source seems to be lost but there is still a copy a archive.org
- https://web.archive.org/web/20150307042916/http://sottwell.pogwatch.com/datagrid-1.html
- https://web.archive.org/web/20150307042916/http://sottwell.pogwatch.com/datagrid-2.html
- https://web.archive.org/web/20150307042916/http://sottwell.pogwatch.com/datagrid-3.html
Disclaimer: I didn't check the code for potential problems with current versions of MODX. If you find something that breaks the code, post it in the comments below.
Collections is a handy tool to display the child resources of a parent inside a configurable grid. Each column can get its own configurable editor so you can edit a resource right from the grid.
Editors can be attached by editing the collections column settings: