This file contains hidden or 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
| /*Custom Radio Buttons and Checkboxes using Font Awesome*/ | |
| input[type=radio], | |
| input[type='checkbox'] { | |
| display: none; | |
| } | |
| input[type=radio] + label { | |
| display: block; | |
| } | |
| input[type='checkbox'] + label:before, |
This file contains hidden or 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 | |
| function slugify($string, $replace = array(), $delimiter = '-') { | |
| // https://github.com/phalcon/incubator/blob/master/Library/Phalcon/Utils/Slug.php | |
| if (!extension_loaded('iconv')) { | |
| throw new Exception('iconv module not loaded'); | |
| } | |
| // Save the old locale and set the new locale to UTF-8 | |
| $oldLocale = setlocale(LC_ALL, '0'); | |
| setlocale(LC_ALL, 'en_US.UTF-8'); | |
| $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $string); |
This file contains hidden or 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 | |
| function array_to_tree(array $array, $parent_id = 0) | |
| { | |
| $array = array_combine(array_column($array, 'id'), array_values($array)); | |
| foreach ($array as $k => &$v) { | |
| if (isset($array[$v['parent_id']])) { | |
| $array[$v['parent_id']]['children'][$k] = &$v; | |
| } |
This file contains hidden or 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
| /* | |
| ajax-send.js - copyright Jake Bellacera (http://jakebellacera.com) | |
| This script uses JQuery & JQuery Validate (https://github.com/jzaefferer/jquery-validation) | |
| For this example, we will have a form named '#ajaxform', you can of course change this to whatever you'd like. | |
| */ | |
| $(function(){ | |
| $('#submitbutton').click(function() { |
This file contains hidden or 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
| AddDefaultCharset UTF-8 | |
| Options -Indexes | |
| <IfModule mod_deflate.c> | |
| AddOutputFilterByType DEFLATE application/javascript | |
| AddOutputFilterByType DEFLATE application/json | |
| AddOutputFilterByType DEFLATE application/x-javascript | |
| AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
| AddOutputFilterByType DEFLATE font/ttf |
This file contains hidden or 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 | |
| /* | |
| * Remote File Copy PHP Script 2.0.0 | |
| * | |
| * Copyright 2012, Sebastian Tschan | |
| * https://blueimp.net | |
| * | |
| * Licensed under the MIT license: | |
| * http://www.opensource.org/licenses/MIT | |
| */ |
This file contains hidden or 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 | |
| // Insert this file on server and go to the path from browser. | |
| set_time_limit(0); //Unlimited max execution time | |
| /* Source File URL */ | |
| $remote_file_url = 'http://origin-server-url/files.zip'; | |
| /* New file name and path for this file */ | |
| $local_file = 'files.zip'; |
This file contains hidden or 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 | |
| /** | |
| * Edit a Word 2007 and newer .docx file. | |
| * Utilizes the zip extension http://php.net/manual/en/book.zip.php | |
| * to access the document.xml file that holds the markup language for | |
| * contents and formatting of a Word document. | |
| * | |
| * In this example we're replacing some token strings. Using | |
| * the Office Open XML standard ( https://en.wikipedia.org/wiki/Office_Open_XML ) | |
| * you can add, modify, or remove content or structure of the document. |
This file contains hidden or 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
| $(document).ready(function($) { | |
| if(window.location !== window.parent.location){ | |
| $('header, footer').hide(); | |
| } | |
| }); |
This file contains hidden or 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 | |
| spl_autoload_register(function($class){ | |
| $directorys = array(PATH.VERSION.MODULES, INSTALL.MODULES, INSTALL.THEME.'modules/'); | |
| foreach($directorys as $directory): | |
| if(file_exists($directory.'class.'.$class.'.php')): | |
| require($directory.'class.'.$class.'.php'); | |
| return; | |
| endif; | |
| endforeach; |