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 | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$database = 'db'; | |
$user = 'user'; | |
$pass = 'pass'; | |
$host = 'localhost'; | |
$dir = dirname(__FILE__) . '/dump.sql'; | |
echo "<h3>Backing up database to `<code>{$dir}</code>`</h3>"; |
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 | |
//----------------------------------------------------------- | |
// getDate | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
* EXAMPLE USAGE | |
* [[!getDate:strtotime:date=`%y%m%d`:toPlaceholder=`now`]] date = YearMonthDay |
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 | |
//----------------------------------------------------------- | |
// fbPageGraph | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
* @description: Returns the number of fans for a facebook fanpage (via the graph api) | |
* @version 1.0.0 - 2018-11-22 |
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
//----------------------------------------------------------- | |
// Collections Customrenderer | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
*/ | |
// ------------------------------ |
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 | |
//----------------------------------------------------------- | |
// emailPrefix | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
*/ | |
/* |
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 | |
//----------------------------------------------------------- | |
// noaccents | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
*/ | |
/* |
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 | |
//----------------------------------------------------------- | |
// formatPhone | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
*/ | |
// $input = '04 94 39 28 49'; |
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 | |
//----------------------------------------------------------- | |
// copyrightYear | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
*/ | |
// Usage : [[copyrightYear? &since=`2010`]] or with only the current year [[copyrightYear]] |
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
jQuery(document).ready(function( $ ){ | |
// Get page title | |
var pageTitle = $("title").text(); | |
// Change page title on blur | |
$(window).on('blur', function() { | |
$("title").text('💔 Vous nous manquez !'); | |
}); |
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 | |
//----------------------------------------------------------- | |
// randomChunk | |
//----------------------------------------------------------- | |
/* | |
* @author: Steeve from lawebfabric | |
* @website: http://www.lawebfabric.com | |
* @tutorial modx website: http://www.tutocms.fr/ | |
* | |
* Created on: 08/10/18 |