Skip to content

Instantly share code, notes, and snippets.

@sameronline
sameronline / gist:1304444
Created October 21, 2011 17:37
Ages & Stages block
Edit @templates/block/block-boxes-ages_stages_nav.tpl.php
<div class="ages-stages">
<h2 class="ir"><?php print $block->title ?><span></span></h2>
<div>
<?php print $block->content ?>
</div>
</div>
@admin/build/block/configure/boxes/ages_stages_nav
put your html code.. there
@sameronline
sameronline / README.html
Created October 25, 2011 15:34
Sign out to Home Page - Rule
1. copy the row content of rule.php file to that page..
2. paste it at: /admin/rules/ie/import
that's it!...
@sameronline
sameronline / gist:1409011
Created November 30, 2011 13:10
TP Topics: Featured Topics + Agest And Stages
<?php
'topic_feature_topics_horizontal' => array(
'title' => 'Topic: Featured Topics - Horizontal',
'type' => 'views', //views/block
'id' => array("topic_region_term","block_4"), //viewid:displayid
'attach' => array('field_region_terms','nid','title'),
'default' => array(
'title' => 'Featured @pterm Topics'
)
),
@sameronline
sameronline / +youtube.com
Created December 5, 2011 21:51
Ebay Description template
<p align="center">
<object height="385" width="640"><param
name="movie"
value="http://www.youtube.com/v/XXXXXXXXXXX?fs=1&amp;hl=en_US"><param
name="allowFullScreen" value="true"><param
name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/XXXXXXXXXXX?fs=1&amp;hl=en_US"
type="application/x-shockwave-flash" allowscriptaccess="always"
allowfullscreen="true" height="385" width="640"></object></span></strong></p>
@sameronline
sameronline / gist:1435978
Created December 5, 2011 23:54
customformatter example
<?php
function hook_field_formatter_info() {
return array(
'youtube_video' => array(
'label' => t('Youtube Video'),
'field types' => array('text'),
)
);
}
@sameronline
sameronline / all_users.sql
Created December 16, 2011 17:44
newsletters
SELECT
users.`name`,
users.uid,
content_type_user_profile.field_user_firstname_value,
content_type_user_profile.field_user_lastname_value,
content_type_user_profile.field_user_displayname_value,
content_type_user_profile.field_user_postalcode_value,
content_type_user_profile.field_user_tks_optin_value,
content_type_user_profile.field_user_agreeterms_value,
content_type_user_profile_newsletter.field_user_newsletter_tpages_value,
@sameronline
sameronline / correct.html
Created January 11, 2012 16:12
Featured Item block
<a href="#"><img src="_media/images/home/11.jpg" width="650" height="307" alt=""></a>
<div>
<h2><a href="#">How <em>she</em> does it?</a></h2>
<p><a href="#">Venenatis eleifend erat in fermen- tum. Etiam ornare urna non dolor egestas</a></p>
</div>
<?php
// add support/detection for DEPRECATED in case of 5.3 PHP || Settings fix
if(defined('E_DEPRECATED')){
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);
}else{
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
}
@sameronline
sameronline / sample.rss
Created January 16, 2012 16:35
RSS Feed sample
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Pregnancy</title>
<description>Get information on your pregnancy, baby, breastfeeding, baby food, newborn baby sleep, health, and the stages of growth and development.</description>
<link>http://tp.local</link>
<item>
<title>How to choose a baby name</title>
<description>Naming your baby is one of the hardest things you will ever do. Here are some do&amp;#039;s and don&amp;#039;ts</description>
<link>http://tp.local/pregnancy/baby-names/how-choose-baby-name</link>
@sameronline
sameronline / fix-conflicts.sh
Created January 17, 2012 01:22
TP Conflicts Fixing
drush fcr tp_feature_mobile box header_ad -y
drush fcr tp_feature_mobile box site_logo -y
drush fcr tp_feature_homepage box city_map -y
drush fcr tp_feature_homepage box connect_with_todays_parent -y
drush fcr tp_feature_homepage box facebook_activity -y
drush fcr tp_feature_homepage box search -y
drush fcr tp_feature_homepage box twitter -y