Skip to content

Instantly share code, notes, and snippets.

View plugin.seoSuiteRecoverLongtitle.php
<?php
/**
* seoSuiteRecoverLongtitle v:0.0.1
* Last edited: 2022-05-01
*
* AUTHOR:
* info@pepebe.de
*
* PLUGIN EVENT(S):
* OnDocFormRender
@pepebe
pepebe / 01_readme.md
Last active Apr 23, 2022
ConfigurePHP recursively searches all directories below its own position for php files. If a directory with at least one php file is found, a symlink to ./php.ini will be created.
View 01_readme.md

Found this script years ago on the 1und1 forum. It was a nice workaround to make sure that the php.ini file would work inside root and all directories below it.

View useful-console-commands.md
@pepebe
pepebe / 00-datagrid.md
Last active Feb 3, 2022
Data Grid Tutorial by Susann Ottwell
View 00-datagrid.md

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

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.

@pepebe
pepebe / readme.md
Last active Jan 7, 2022
pdoTools Kichensink
View readme.md

About this list

A currated list of useful pdoTools settings/examples

@pepebe
pepebe / CreateXpdoClasses.snippet.php
Last active Jan 6, 2022
pdoResources - load class with custom db prefix
View CreateXpdoClasses.snippet.php
<?php
/**
* @package = CreateXpdoClasses
*
* Create Xpdo Classes script
*
* This script creates xPDO-ready classes from existing custom
* database tables. Run it again whenever you change
* your schema.
*
@pepebe
pepebe / listLocales.php
Created Aug 9, 2021 — forked from Azeirah/listLocales.php
List supported locales
View listLocales.php
<?php
// this list is large, but might not be completely exhaustive.
// I retrieved it from this stackoverflow answer: http://stackoverflow.com/a/20818686/2302759
// and added zh_TW
$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_
@pepebe
pepebe / regClient.snippet.php
Last active Apr 23, 2021
regClient: Move stuff around inside your modx template
View regClient.snippet.php
<?php
/*
Reposition Blocks of Code:
--------------------------
[[!regClient?
&value=`code block or file url`
&option=`regClientCSS`
]]
&option - Pick one of the regClient functions
@pepebe
pepebe / checkWeekday.snippet.php
Last active Jan 13, 2021
Simple MODX Spamfilter
View checkWeekday.snippet.php
<?php
/*
Really primitive, but oddly efficient, anti-spambot validator for formit
1. Add weekday selectfield:
<div class="form-group [[!+fi.error.weekday:notempty=`has-error`]]">
<label for="weekday" class="col-sm-3 control-label">I'm not a robot! <sup>*</sup></label>
<div class="col-sm-9">
<select class="form-control" name="weekday" required>
@pepebe
pepebe / scroll.css
Last active Jan 27, 2020
CSS-Klasse per JavaScript hinzufügen, wenn sich ein Element im Viewport befindet
View scroll.css
.mein-element {
opacity: 0;
transition: opacity .5s ease-in-out;
}
.visible {
opacity: 1;
}