Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged theme



1 2 Next »
add home link
1 597 posted 13 years ago by screamwork
0 459 posted 14 years ago by sennesaelium
themes the primary links adding spans (useful for sliding doors technique) and nice ID's based on the link title rather than the standard ugly menu-851 classes etc.
1 768 posted 14 years ago by ReeceMarsland
Wizzlern, a Dutch Drupal trainer, has a Dutch article online on how to remove the "search this site" label in the Drupal search-block.
2 771 posted 14 years ago by berkes
I pieced together this code when I had to do this for a client: - show the first image attached to a post (based on sort order in gallery tab) in medium size - put all the other images attached to the post into an imageset so that when you click on...
1 834 posted 14 years ago by zartgesotten
2 526 posted 15 years ago by spark9
Create theme override file: `upload_attachments.tpl.php` in your theme directory. [CSS styles](http://snipplr.com/view/11848)
2 707 posted 15 years ago by zachharkey
2 499 posted 15 years ago by zachharkey
Few different ways to output primary links in your page.tpl.php template.
3 989 posted 15 years ago by zachharkey
uri: http://organic.qualitywordpress.com/
0 508 posted 15 years ago by ChaosKaizer
The code for my wordpress Archives page, there have been a few people who asked how I did it.
0 662 posted 15 years ago by kristin
A per-region override. ogt_blocks is ran for a region, if a region contains blocks, we search for a theme function named theme_region_regionname(). If exists, we run that, else we just return the concatenated blocks for that region.
1 768 posted 16 years ago by berkes
Place the first function, phptemplate_links() in your template.php file. Alternatively (and IMO better) is to name the function your_theme_name_links() where your_theme_name is the name of your theme. From here on, you can add theme functions like...
2 765 posted 16 years ago by berkes
Removes the core, and node styles from the $style variable. You most morbably already defined _phptemplate_variables($hook, $vars), in that case just add the two lines there. _sympal_theme.. is the name of the theme where we use this.
3 717 posted 16 years ago by berkes
Shortens a string, and adds a span with a title of the full string. Function is useful for listings where you don't want wraping; or for places where a long string liek a username can break the layout.
1 706 posted 16 years ago by berkes
This snipped adds columnstriping to cells. It works fine for most cases, but will behave strange when combined with colspan. Cells get an additional class 'even-col' or 'odd-col'
2 787 posted 16 years ago by berkes
Put classes around your bodyy, to allow different colors for seperate pages and areas on your site. IT will simply add a css-safe version of the first argument in an url. Say the url is /about_us/our_company the class will be body.about-us Require...
2 637 posted 16 years ago by berkes
This snippet is for use with image module, a small contributed module for image handling. (Yes: in Drupal you need a /contributed/ module for this o_O. The template snippet links the images to their own node.
2 592 posted 17 years ago by berkes
1 2 Next »