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 | |
| /** | |
| * Config A: madebymayo https://github.com/madebymayo/ExpressionEngine-Environment-Config | |
| * Config B: webunder https://bitbucket.org/webunder/ee2_config_template | |
| * Config C: FocusLabLLC https://github.com/focuslabllc/ee-master-config | |
| * Config D: NSM Config Bootstrap http://ee-garage.com/nsm-config-bootstrap | |
| * Config E: https://gist.github.com/adrianmacneil/3862276 | |
| */ | |
| define('NSM_SERVER_NAME', 'nsm_server_name'); | |
| define('NSM_BASEPATH', '/abc/'); |
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
| /** | |
| * @author Abed Islam | |
| * | |
| * Use and abuse to your liking. | |
| * | |
| * Needed a solution for "no_results"-like tags. | |
| * (Where "no_results" can be customized to whatever tag you want.) | |
| * Stephen Lewis of Experience Internet talks about it and provides a solution here: | |
| * @link http://experienceinternet.co.uk/blog/ee-gotchas-nested-no-results-tags/ | |
| * |
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 | |
| // Just thought this was really cool and fast way to count occurrences of a string within a string | |
| // @author Thai | |
| // @link http://stackoverflow.com/a/4736219/781824 | |
| $needle = 'AGUXYZ'; | |
| $haystack = 'Agriculture ID XYZ-A'; | |
| $count = strlen($haystack) - strlen(str_replace(str_split($needle), '', $haystack)); |
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 | |
| // handy script from tycoonmaster at gmail dot com | |
| // http://fi2.php.net/manual/en/function.http-build-url.php#96335 | |
| // I didn't make this but I think it is useful so I store / share it here | |
| if (!function_exists('http_build_url')) | |
| { | |
| define('HTTP_URL_REPLACE', 1); // Replace every part of the first URL when there's one of the second URL | |
| define('HTTP_URL_JOIN_PATH', 2); // Join relative paths | |
| define('HTTP_URL_JOIN_QUERY', 4); // Join query strings |
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
| Testing how Mo Variables works with conditions | |
| <code>id: {get:id}. {if "{get:id}" == ""}1{/if}{if "{get:id}" != ""}2{/if}{if get:id}3{if:else}4{/if}{if "{get:id}"}got id{/if}{if "{get:id}" == 0}0{/if}</code> | |
| <pre> | |
| {!-- | |
| url: / | |
| result: id: . 4 | |
| url: /?id= | |
| result: id: . 140 |
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 | |
| // @author sparkweb | |
| // @url http://pastebin.com/fsfF0rdf | |
| //Set Globals and Get Settings | |
| $apikey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; | |
| //----------------------------------------------------- | |
| // TRANSACTION DATAFEED | |
| //----------------------------------------------------- |
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 | |
| // @author cowtan | |
| // @url http://forum.foxycart.com/discussion/4578/xml-datafeed-to-mysql-via-php/p1 | |
| // @url http://pastie.org/1868428 | |
| // ====================================================================================== | |
| // CHANGE THIS DATA: | |
| // Set the key you entered in your FoxyCart.com admin. | |
| // ====================================================================================== | |
| $myKey = 'CHANGE THIS TEXT to your own datafeed keyphrase'; // your foxy cart datafeed key |
NewerOlder