-
PHP Email Validation
Email validation is something that is needed in a variety of situations, but I’ve always struggled to find a good one…. Well, here are 2! The first is something I…
-
PHP Get Defined Vars
Ever wanted to see the variables in a page? Warning!! It’ll show all of them…. <?php print_r(get_defined_vars()); ?>
-
FW: PHP Logout
A good logout script is needed in most applications, and here’s the one I use. I have this script in a ‘config’ file that I call at the beginning of…
-
SELECT inside a SELECT
I often forget the exact syntax of things like this… So here’s an example… $query1 = ‘SELECT * FROM `’.$dbName.’`.`users` WHERE email NOT IN (SELECT email FROM `’.$setupDBName.’`.`users`)’;
-
Great Hotspot Image Swap
Using ‘hotspots’ to swap images is pretty straight forward, and can be really effective…. try this method from Stackoverflow <img src=”nav.jpg” /> //set off state var nav_off = “/images/nav-off.jpg”; //…
-
FW: Fancybox
http://net.tutsplus.com/tutorials/wordpress/anatomy-of-a-wordpress-plugin/ http://wordpress.tv/2009/09/20/john-hawkins-plugin-building-portland09/ http://www.tipsandtricks-hq.com/wordpress-lightbox-ultimate-plugin-display-media-in-a-fancy-lightbox-overlay-3163
-
Javascript ‘Are You Sure?’ Message
This small but very handy piece of code… onclick=”javascript:return confirm(‘Are you sure you want to delete this?’)” For example: <input type=”submit” name=”button” value=”Delete Page” onclick=”javascript:return confirm(‘Are you sure you want…
-
Enable $_SESSION in WordPress
http://www.myguysolutions.com/2010/04/14/how-to-enable-the-use-of-sessions-o n-your-wordpress-blog/ So in order to activate session variables within your WordPress installation the only thing you have to do is call session_start(); before any output is send to the…
-
Limit the length of ‘the_excerpt’ in WordPress
Brilliant little snippet from Benjamin Reid http://www.nouveller.com/quick-tips/quick-tip-8-limit-the-length-of-the_excerpt-in-wordpress/ In his words… Right here’s the scenario. On one of your clients post page’s you use the_excerpt function to display an excerpt for…
-
Handling RSS feeds with Drupal View Module
This is a great way to pull information from an RSS feed… Spot on ‘Drews’! https://drupal.ucar.edu/forum/node/155











