Skip to content

Instantly share code, notes, and snippets.

View makbeta's full-sized avatar

makbeta makbeta

View GitHub Profile
@makbeta
makbeta / isMobile.html
Created October 14, 2013 22:09
Setting isMobile session variable for Luminate Online
<!-- Copyright 2010 Convio, Inc. -->
<!--
Conditional for detecting mobile devices
[[?xx::x[[S80:isMobile]]x::
isMobile is not yet set
[[?xx::x[[S80:UserAgentLowerCase]]x::
UserAgentLowerCase is not yet set
Convert User-Agent from HTTP request header to lower case
[[U0:UserAgentLowerCase=[[E130:"[[S50:User-Agent]]" "A" "a" replaceall "B" "b" replaceall "C" "c" replaceall "D" "d" replaceall "E" "e" replaceall "F" "f" replaceall "G" "g" replaceall "H" "h" replaceall "I" "i" replaceall "J" "j" replaceall "K" "k" replaceall "L" "l" replaceall "M" "m" replaceall "N" "n" replaceall "O" "o" replaceall "P" "p" replaceall "Q" "q" replaceall "R" "r" replaceall "S" "s" replaceall "T" "t" replaceall "U" "u" replaceall "V" "v" replaceall "W" "w" replaceall "X" "x" replaceall "Y" "y" replaceall "Z" "z" replaceall]]]]
@makbeta
makbeta / reinitialize-addThis.html
Created November 30, 2012 02:23
reinitialized addThis after the ajax load
<script type="text/javascript">
function ReinitializeAddThis(){
if (window.addthis){
window.addthis.ost = 0;
window.addthis.ready();
}
}
</script>
@makbeta
makbeta / clo-donation-type-cond.html
Last active May 4, 2017 16:29
Convio Luminate Online: Donation: Thank you conditional based on recurring vs one time donation
[[?xx[[S120:dc:recurringFrequencyUnit]]xx::xxmonthsxx::
This is a recurring donation!
::
This is a onetime donation.
]]
@makbeta
makbeta / clo-logged-in.html
Created May 16, 2013 17:43
Luminate Online: Test if user is logged in
[[?xxnullxx::x[[S1:user_name]]x::
<!-- this person is not logged in -->
::
<!-- This person is logged in -->
]]
@makbeta
makbeta / clo-title.html
Last active May 4, 2017 16:28
Luminate Online: Render title based on application.
[[?x1x2x25x::x[[S4]]x::<h1>Events</h1>::]]
[[?x6x8x::x[[S4]]x::<h1>Store</h1>::]]
[[?x[[S4]]x::x5x::<h1>Tell a Friend</h1>::]]
[[?x[[S4]]x::x9x::<h1>Donate</h1>::]]
[[?x[[S4]]x::x41x::<h1>eCards</h1>::]]
[[?x[[S4]]x::x81x::<h1>Your Profile</h1>::]]
[[?x[[S4]]x::x82x::<h1>Your Interests</h1>::]]
[[?x[[S4]]x::x83x::<h1>Unsubscribe Options</h1>::]]
[[?x[[S4]]x::x85x::<h1>Preferences</h1>::]]
[[?x[[S4]]x::x186x::<h1>Service Center</h1>::]]
@makbeta
makbeta / clo-no-caching.html
Created August 27, 2013 23:25
Luminate Online: Add parameter to js or css files to prevent caching
nocache=[[S55:1000,99999]]
@makbeta
makbeta / wordpress-pods-2-featured-image.php
Last active September 22, 2016 01:10
WordPress Pods 2.0 Framework - rendering featured image in template
@makbeta
makbeta / conditional-navigation.html
Created February 6, 2013 02:26
Luminate CMS: Main navigation with active state CLO & CMS conditionals
<ul class="navigation">
[[?[[S8]]::/who-we-are/::<li class="selected">::<li>]]<a href="http://www.mydomain.com/who-we-are/">Who we are</a> </li>
[[?[[S8]]::/what-we-do/::<li class="selected">::<li>]]<a href="http://www.mydomain.com/what-we-do/">What we do</a> </li>
[[?[[S8]]::/where-we-work/::<li class="selected">::<li>]]<a href="http://www.mydomain.com/where-we-work/">Where we work</a> </li>
[[?[[S8]]::/what-you-can-do/::<li class="selected">::<li>]]<a href="http://www.mydomain.com/what-you-can-do/">What you can do</a> </li>
</ul>
<ul class="navigation">
<t:if test="matches(path,'.*/who-we-are/.*')"><li class="selected"></t:if><t:else><li></t:else><a href="http://www.mydomain.com/who-we-are/">Who we are</a> </li>
<t:if test="matches(path,'.*/what-we-do/.*')"><li class="selected"></t:if><t:else><li></t:else><a href="http://www.mydomain.com/what-we-do/">What we do</a> </li>
@makbeta
makbeta / wordpress-change-admin-title-text.php
Created October 29, 2013 20:14
CHANGE THE “ENTER TITLE HERE” TEXT IN WORDPRESS
<?php
function XXX_enter_title_here( $title ){
$screen = get_current_screen();
if ( 'custom_post_type' == $screen->post_type ) {
$title = 'Custom Post Type Title Text';
}
return $title;
}
@makbeta
makbeta / d7-node-fields-variables.php
Created September 26, 2013 16:25
Drupal7: Make node fields variables for global access
<?php
//this goes into template.php function
function theme_preprocess_page(&$variables, $hook) {
if(isset($variables['node'])) {
$node = node_load($variables['node']->nid);
if($node->type == 'homepage') {
$field_name1 = 'field_left';
$field_name2 = 'field_middle';
$field_name3 = 'field_right';