Coder1
Aricles and Screencasts by Mike Milano
Today is: 10 March, 2010
Check todays hot topics or new pictures
Aricles and Screencasts by Mike Milano
Today is: 10 March, 2010
Check todays hot topics or new pictures
Firefox SQLite Manager AddonI was looking around for a decent SQLite database manager and came across an addon that works just great! SQLite Manager by Tarakant Tripathy and Mrinal Kant It supports the SQLite3 format which gives you more robust support from more data types to views and triggers. Adding IDs to all FieldsetsA themer on a project I was recently working on needed a lot of CSS IDs added to fieldsets throughout the site. Fortunately, there's a theme_fieldset() function in includes/forms.inc I was able to copy that function into the phptemplate.php file, obviously change theme_ to phptempalte_ in the function name, and then add logic that adds an ID based on the fieldset name if an id does not already exist. Here's the code:
A Note from a Concerned Google Chrome Fan5 days after the beta release of the Google Chrome web browser for Mac & Linux, the (anonymous) Chrome user contacted me about this site:
Q-ViewsQ-Views is a module I came across while browsing through new modules on drupalmodules.com. It's been a while since I've been so impressed with a module. This allows you to create views based of SQL. You allow it to analyze your SQL and it will populate a list of options for each field your query returns. You can write module hooks to handle the query output on a per-field basis, or you can write the handler directly in the configuration. Carl Sagan Day"If you wish to make an apple pie from scratch ... I don't often move off the subject of code on this site, but Carl Sagan has always been an inspiration on numerous levels. November 7th, 2009, which is the 75th anniversary of his birth, has been declared the 1st annual Carl Sagan Day. ... And here's a nice remix tribute via Youtube to the man. Zend Server CE, Free LAMP Stack for Mac/Linux/WindowsI recently installed Zend Server CE on my MacBook Pro to check out the performance of the "partial page" caching Zend offers in their platform. I was pleasantly surprised how simple it was to get up and running. Zend Platform CE installs its own version of Apache, PHP. If you're installing it on Windows or Mac, it will also install MySQL. Everything is configured and controlled in your zend path. By default on the Mac it is /usr/local/zend. What cacherouter plugin do you prefer?APC 50% (1 vote) Memcache 0% (0 votes) DB 50% (1 vote) XCache 0% (0 votes) Eaccellerator 0% (0 votes) Total votes: 2 Subscribe All Users to a Simplenews NewsletterThere's been a couple times where I've had to subscribe all users to a new newsletter. I started out with a snippet I found which cleans up the subscriptions, but I lost the link or I would have referenced it here. Here's the code that will subscribe all users to newsletter node id 16. Note I'm using mysql_insert_id() as a quick fix so you will need to use another method if you're not using mysql.
Drupal do_search limit is hard coded to 10 - Here's a work-aroundRecently I had to implement a custom search function using Drupal's do_search() function. I needed to display many more results than 10, which is hard coded in the function. The simple solution was this: 1. Go to http://api.drupal.org/api/function/do_search/6 (make sure you get the function for the correct version of Drupal you are using) 2. Copy the function and rename it to something like do_search_custom. 3. Add a parameter called $limit and make it default to 10. ( $limit=10 ) 4. Replace pager_query argument at the bottom of the function with $limit. Disable TinyMCE in Node Body Based on Node TypeThere's been a few sites I've used WYSIWYG editors on recently where I've run into the issue of needing to disable it on certain text areas. TinyMCE supports this with a theme override just fine, however, it's not so simple when you have multiple text areas with the same name. Take the node edit form. For every node type, the body uses the same name. A practical example of when you would need to disable a WYSIWYG editor would be when filling a node body with previously designed HTML like when you design an HTML Newsletter. |
|||
|
Copyright © 2008, Mike Milano
|