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 Drupal by Aaron Ellison
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 PHP by Srikanth Rayabhagi
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 PHP by Ben Palmer
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 EE by Eugene Gbeze
Get Gravatar Pic
<?php
$gravatar_link = '//www.gravatar.com/avatar/' . md5(<<**SelectionInsertionPlaceholder**>>) . '?s=32';
echo '<img src="' . $gravatar_link . '" />';
?>
Make Div Clickable
$("<<**SelectionInsertionPlaceholder**>>").click(function(){
window.location=$(this).find("a").attr("href");
return false;
});
RegExp For Detecting a URL
/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'$1'
Set Text Selection Color
/* Mozilla based browsers */
::-moz-selection {
background-color: #FFA;
color: #000;
}
/* Works in Safari */
::selection {
background-color: #FFA;
color: #000;
}