-
Recent Posts
Recent Comments
Archives
Categories
Meta
Monthly Archives: November 2010
find events assosiated with elements
This will alert all functions associated to a given element… var elem = document.getElementById(‘ELEMENT_ID_HERE’); var str = ”; for(var prop in elem) { if(typeof elem[prop] == ‘function’) str += prop + ‘\n’; } alert(str);
get the title of a post
A gemn of a function found of the wordpress codex, very useful is get_the_title(ID) find it here: http://codex.wordpress.org/Function_Reference/get_the_title
WordPress Plugin Query
I am often cutting and pasting this in wordpress plugins $query = “SELECT id, post_title FROM ” . $wpdb->prefix . “posts WHERE post_type = ‘wpf_venue’ AND post_status=’publish’”; $venues = $wpdb->get_results ( $query, ARRAY_A );
Geographical Data
So may times you want to look up information on cities or suburbs, here’s the resource http://www.geonames.org You download and use or query via a web service
Incrementing values in Mysql
As the saga continue manipulating data this comes in handy to increment all the id’s in a table UPDATE jos_content_old SET id = id + 50 WHERE (id = id) Keep in mind the resulting id being set must be … Continue reading
Centering vertically in a block
This often comes up a whole lot of same sized blocks on a webpage with an image inside. gettting the image to center in the middle is easy but what happens when it needs to sit in the vertical middle … Continue reading
Cheap Software
So everyone likes cheap Software, and there are real places to get Cheap software online but there are also scams to get cheap online software. I was presented with this site http://royal-customers.net and immediately the unreal cheap online prices raised … Continue reading
Getting rid of files from the command line
Dreamweaver’s check in and check out functionality can be quite useful when working with more than one person on a site but it creates heaps of .LCK files. If you want to remove them from the command line go to … Continue reading
Speed up WordPress
After a bit of digging around inside wp-ecommerce the category images were loading like a 300 k progressive jpg on a 5.6k modem – not cool. So after a forum search on getshopped.org this plugin was recommened http://wordpress.org/extend/plugins/w3-total-cache/
moving data in sql
So after searching around the web looking for code to get data from one table intop another I found this example posted on the mysl dev forum mysql> INSERT INTO orders (customer_cust_id, orderdatetime, message, taxrate, shippingprice) -> SELECT ’1′, NOW(), … Continue reading

