<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/drupal5</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 00:15:11 GMT</pubDate>
<item>
<title>(PHP) Routine to update and set variables in Drupal using hook_update - berkes</title>
<link>http://snipplr.com/view/29499/routine-to-update-and-set-variables-in-drupal-using-hookupdate/</link>
<description><![CDATA[ <p>Drupal allows hook_update_N to run any sort of code. Most of the time, however, people only use this to alter the database scheme. 
But you can use it for much more. Like setting variables, creating nodes, importing views and so on. 
This code shows how to set a series of variables in Drupal.

When you deploy this code, running update.php will set all the variables as in the listing.

I typically catch this in a module called 'projectname_meta'. So this function would go in projectname_meta.install, and will be called from projectname_meta_install and projectname_meta_update_5002, for example.</p> ]]></description>
<pubDate>Tue, 09 Mar 2010 09:00:47 GMT</pubDate>
<guid>http://snipplr.com/view/29499/routine-to-update-and-set-variables-in-drupal-using-hookupdate/</guid>
</item>
<item>
<title>(PHP) Howto run your own functions on any forms submission. - berkes</title>
<link>http://snipplr.com/view/28546/howto-run-your-own-functions-on-any-forms-submission/</link>
<description><![CDATA[ <p>By using hook_form_alter, you can add your own callback functions to any Drupal form. 
These functions will be called when Drupal validates the form and when Drupal submits it.

In example below, a module called 'simple_checkout' adds its own handlers to a form called 'ideal_payment_api_issuer_form'. That latter is generated by another module, but we can fill our own tables and run our own validation *in addition to those by the originating module*.</p> ]]></description>
<pubDate>Thu, 18 Feb 2010 09:19:37 GMT</pubDate>
<guid>http://snipplr.com/view/28546/howto-run-your-own-functions-on-any-forms-submission/</guid>
</item>
<item>
<title>(PHP) Drupal mission statement include - reverend</title>
<link>http://snipplr.com/view/9217/drupal-mission-statement-include/</link>
<description><![CDATA[ <p>Include drupal 5 mission statement in views or other php enabled sections(i.e.: Views Header, etc.).</p> ]]></description>
<pubDate>Thu, 23 Oct 2008 15:28:06 GMT</pubDate>
<guid>http://snipplr.com/view/9217/drupal-mission-statement-include/</guid>
</item>
<item>
<title>(PHP) Drupal5 basic form page functions - sherakama</title>
<link>http://snipplr.com/view/5772/drupal5-basic-form-page-functions/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 10 Apr 2008 12:53:47 GMT</pubDate>
<guid>http://snipplr.com/view/5772/drupal5-basic-form-page-functions/</guid>
</item>
<item>
<title>(PHP) Drupal5 - menu item - sherakama</title>
<link>http://snipplr.com/view/5771/drupal5--menu-item/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 10 Apr 2008 12:52:44 GMT</pubDate>
<guid>http://snipplr.com/view/5771/drupal5--menu-item/</guid>
</item>
<item>
<title>(PHP) Import CCK definition from text file - WimLeers</title>
<link>http://snipplr.com/view/3891/import-cck-definition-from-text-file/</link>
<description><![CDATA[ <p>With thanks to joshk :)</p> ]]></description>
<pubDate>Sun, 14 Oct 2007 11:39:07 GMT</pubDate>
<guid>http://snipplr.com/view/3891/import-cck-definition-from-text-file/</guid>
</item>
</channel>
</rss>