Coda Clips

Drupal 6 theme info

name = Theme Name
description = A description of your theme
screenshot = screenshot.png
core = 6.x
php = 5.2.0
engine = phptemplate
;base theme = basetheme
stylesheets[all][] = css/cssfilename.css
scripts[] = js/javascript.js
;regions[left] = Left sidebar
;regions[right] = Right sidebar
;regions[content] = Content
;regions[header] = Header
;regions[footer] = Footer
;features[] = logo
;features[] = name
;features[] = slogan
;features[] = mission
;features[] = node_user_picture
;features[] = comment_user_picture
;features[] = search
;features[] = favicon
;features[] = primary_links
;features[] = secondary_links

Added to by Aaron Ellison

Install Clip


PHP usage in JavaScript

<script type="text/javascript">
<?php $count=0; ?>
for(var i=0;i<10;i++)
{
   <?php echo "Value of Counter".$count;?>
   <?php count++; ?>
}
</script>

Added to by Srikanth Rayabhagi

Install Clip


str_split function for PHP 4

function str_split($str) {
	$str_array=array();
	$len=strlen($str);
	for($i=0; $i<$len; $i++) {
		$str_array[]=$str{$i};
	}
	return $str_array;
}

Added to by Ben Palmer

Install Clip


EE Multi Site Manager

{exp:weblog:entries weblog="" site="" dynamic="off" disable="categories|member_data|pagination|trackbacks" sort="desc" limit=""}
{}
{/exp:weblog:entries}

Added to by Eugene Gbeze

Install Clip


Get Gravatar Pic

<?php
  $gravatar_link = '//www.gravatar.com/avatar/' . md5(<<**SelectionInsertionPlaceholder**>>) . '?s=32';
   echo '<img src="' . $gravatar_link . '" />';
?>

Added to by Johan

Install Clip


Make Div Clickable

$("<<**SelectionInsertionPlaceholder**>>").click(function(){
     window.location=$(this).find("a").attr("href");
     return false;
});

Added to by Johan

Install Clip


RegExp For Detecting a URL

/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'$1'

Added to by Johan

Install Clip


Set Text Selection Color

/* Mozilla based browsers */
::-moz-selection {
      background-color: #FFA;
      color: #000;
}
/* Works in Safari */
::selection {
      background-color: #FFA;
      color: #000;
}

Added to by Johan

Install Clip


Sponsored Links: