Welcome To Snipplr


Everyone's Recent Snippets Tagged drupal



The following code lets us designate "menu links" that will not actually link anywhere.
0 1377 posted 17 years ago by aleprieto
If you want to use a specific node.tpl.php for a node, paste or merge this code into your template.php
1 1487 posted 17 years ago by aleprieto
prints and punctuates multiple cck values
1 1178 posted 17 years ago by robotoverlord
Allows to customize the search results page.
0 1145 posted 17 years ago by aleprieto
Makes Drupal Advanced Search form non collapsible and expanded by default.
0 1225 posted 17 years ago by aleprieto
Here is a simpler list format without the Term name, sorted by date, filtered for published and images, and is rendered correctly by the theme.
1 1600 posted 17 years ago by aleprieto
Use the code below to build a custom block that shows the related nodes to the current node by taxonomy term. For example: If the current node in display has a taxonomy term "fish", a bunch of links that link to nodes that have the "fish" term is to...
1 1654 posted 17 years ago by aleprieto
This is a simple little block that displays a list of terms in a vocabulary as a list of links to /taxonomy/term/tid pages. Items are listed in the order set for the vocabulary. You could probably use the php sort() function to change that if desired...
0 2046 posted 17 years ago by aleprieto
Fairly simple way to match sidebar content with the main content for several pages without the need to create multiple blocks or the hassle of putting content in a block. For example, your Home, About and Contact pages all have a sidebar with some...
1 1890 posted 17 years ago by aleprieto
This code snippet make use of the API to accomplish a block with links to related content.
1 1817 posted 17 years ago by aleprieto
PHP Template override by Benjamin Melançon of Agaric Design.
3 2226 posted 17 years ago by shrop
Drupal helper function to debug a table. Returns the contents and some explanation of a database table in a rendered format (HTML table). **NOTE** You REALLY do not want to put this function behind any kind of menu_callback and/or on other pages....
1 2567 posted 17 years ago by berkes
This will create a general site blog teaser list at /blog. It requires a cck type named blog. This view also generates an RSS feed for the blog. This is compatible with Views1 for Drupal 5.
2 1462 posted 17 years ago by shrop
This is useful if you are changing a Drupal site's file upload path and/or changing from a private to a public file store.
3 2646 posted 17 years ago by shrop
1 1399 posted 17 years ago by zachharkey
3 1699 posted 17 years ago by shrop
From Drupal 5 Themes book.
2 1340 posted 17 years ago by shrop
From Drupal 5 Themes book.
2 1266 posted 17 years ago by shrop
From Drupal 5 Themes book.
3 1605 posted 17 years ago by shrop
From Drupal 5 Themes book.
2 1435 posted 17 years ago by shrop
From Drupal 5 Themes book.
1 1268 posted 17 years ago by shrop
Creates a category list showing the number of posts in each category similar to some blogging platforms. The view exposes a block and page.
2 1729 posted 17 years ago by shrop
Place this code in the template.php file of your custom Zen sub-theme to create a friendly reminder that this site uses their LDAP password. In this example, we use Novell Directory Services as our LDAP provider.
1 1321 posted 17 years ago by tgbdad
1 1358 posted 17 years ago by wesbaker
Allow for easier editing of content by users who didn't make the site.
1 1265 posted 17 years ago by EvanL
2 1408 posted 17 years ago by cr4zyguy
Using this convention, you can override any system table setting.
1 1379 posted 17 years ago by shrop
I use this code to place in blocks or pages to show a link to the user registration page if the user is not currently logged in. An example is a block I have setup on the home page of http://www.lightentheload.net. If the user is logged in, the block...
0 1423 posted 17 years ago by shrop