Skip to content

Instantly share code, notes, and snippets.

View DESIGNfromWITHIN's full-sized avatar

Menno Pietersen DESIGNfromWITHIN

View GitHub Profile
@pepebe
pepebe / getTVLabel.snippet.php
Last active September 9, 2015 08:26
Proof of concept for toggling tv groups with a select TV in MODX.
<?php
/*
getTVLabel snippet for modx 2.3
Version:
------------------
v0.0.1 (2015-03-06 16:44)
Author:
------------------
@em-piguet
em-piguet / sample.htaccess
Last active September 22, 2022 18:16
Add this in your .htaccess to get a better note on gtmetrix :)
# Make sure .htc files are served with the proper MIME type, which is critical
# for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
AddType text/x-component .htc
# If your server is not already configured as such, the following directive
# should be uncommented in order to set PHP's register_globals option to OFF.
# This closes a major security hole that is abused by most XSS (cross-site
@pepebe
pepebe / ppbHelpManager.plugin.php
Created April 13, 2014 23:07
Initial BETA of ppbHelpManager Plugin for MODX
<?php
/*
ppbHelpManager Plugin
by [email protected]
Version: 0.0.1e - This is a BETA version. Use it at your own risk!
DESCRIPTION:
* hides descriptions of tvs in collapsibles,
* adds modals windows to some or all of them.
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@christianseel
christianseel / modxcloud nginx web rules
Last active March 31, 2016 20:32
# x-ua-xompatible # expire headers for assets # www.mydomain.com -> mydomain.com # filename-based cache busting # trailing slash redirect # statcache rewrite # modx furls rewrite
# x-ua-xompatible header
add_header X-UA-Compatible IE=edge,chrome=1;
#default charset uft-8
charset utf-8;
# allowed domains
set $rewrite_var 0;
@opengeek
opengeek / optimized.html
Created September 18, 2012 17:08
Example of optimizing conditional filters using a Chunk wrapper
[[[[*page-image:notempty=`$wrapImgThumb? &src=`*page-image` &alt=`[[*pagetitle]]` &thumbOpts=`w=480&h=320``]]]]
@christianhanvey
christianhanvey / modx-snippets.php
Last active June 14, 2023 13:02
Useful snippets for MODX Revo
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
@irae
irae / _Stay_standalone.md
Last active January 29, 2024 12:38 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.