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 | |
require_once(TOOLKIT.'/class.event.php'); | |
Class eventmerge_get_param_arrays extends Event { | |
public $eParamFILTERS = array( | |
); | |
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
class Store_shipping_zones extends Store_shipping_driver | |
{ | |
/** | |
* Calculate the shipping total for an order. | |
* Use print_r($order) to see all the fields available to you. | |
* The fields available also match those in the Checkout tag: | |
* http://exp-resso.com/docs/store/tags/checkout.html | |
* | |
* @param array $order | |
*/ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<!-- | |
Name: DATA SOURCE PAGINATION | |
Version: 1.4 with custom elements | |
Author: Nick Dunn <[email protected]>, extended by Nils Hörrmann <[email protected]> | |
URL: http://symphony-cms.com/downloads/xslt/file/20482/ | |
Required Parameters: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<!-- | |
Name: DATA SOURCE PAGINATION | |
Version: 1.5 | |
Author: Nick Dunn <[email protected]>, | |
Nils Hörrmann <[email protected]>, | |
Ian Young <[email protected]> | |
URL: https://gist.github.com/ijy/6572186 |
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
<!-- | |
SEARCH & REPLACE | |
string: The text to be evaluated | |
search: The character or string to look for in the above string | |
replace: What to replace it with | |
The output will neatly concatenate the string with replacements made. | |
--> | |
<xsl:template name="search-and-replace"> |
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
<!-- | |
ALTERNATIVE SEARCH & REPLACE | |
string: The text to be evaluated | |
replace: The character or string to look for in the above string | |
with: What to replace it with | |
Slightly more long winded approach if that's how you prefer to roll. | |
--> | |
<xsl:template name="string-replace"> |
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
<!-- | |
CHECK IF A STRING IS NULL OR EMPTY | |
--> | |
<!-- Example XML --> | |
<group> | |
<item> | |
<id>item 1</id> | |
<CategoryName>blue</CategoryName> | |
</item> |
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
<xsl:variable name="html-ready"> | |
<!-- prepare the HTML as you want it --> | |
</xsl:variable> | |
<!-- stringify it --> | |
<xsl:call-template name="nodetostring"> | |
<xsl:with-param name="node" select="$html-ready"/> | |
<xsl:with-param name="esc-dblq" select="true()"/> | |
</xsl:template> |
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
<xsl:output | |
method="xml" | |
doctype-system="about:legacy-compat" | |
encoding="UTF-8" | |
indent="yes" /> |
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
<!-- Add the 'math' namespace to your XML stylesheet (so we can use 'math:random') --> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:math="http://exslt.org/math" | |
extension-element-prefixes="math"> | |
<!-- Pick a random number between 1 - 10 and set as a variable --> | |
<xsl:variable name="random-bg"> | |
<xsl:value-of select="(floor(math:random()*10) mod 10) + 1" /> | |
</xsl:variable> |