Tag Archive


2.7 8.10 9.04 9.10 100th acquisition advertising amd aol apache api apple assp ati beta black hole blog browser bug building business caching callback CAN-SPAM can spam act centos chrome clamwin code collider comments compression computer css datacenter delayed development digg documentation earth Edward W. Felten email encryption encyclopedia of life enery eu exploit family fatherhood fedora firefox first plugin folding@home free freeware game Gaming gaming_rig gimp google guides hardware header history home house HPN-SSH HTC icann IE image improvement Infoworld intel Internet ipv6 IT jail javascript kubuntu ldap Leap Day lhc Linux locked files mac mail_server malware map me memory microsoft misc money mouse moved Mozilla msdn mysql network solutions nvidia oem open-source os paint_shop_pro patch pc pentium phising phone php plugin post post-revision protocol ram RC record release review rollover safari samba scammers science SCP screenshots script script kiddies security SEO Series server service pack society software son Sony SP3 spam species squirellmail SSH storage stupidity styling sun svn tape tech Techozoic theme threaded tip tips ubuntu Unix update utility video card virtualization vista vlite vmware vsphere web weird WHS windows windows 7 wordpress work worm wsus XP xray

Google Maps API

In a recent project it was asked to provide a Google map on a number of pages. It would have been too time consuming to create a custom map and manually place the code on each page. Instead using the Google Maps API was a better choice because the address could be pulled from a custom field in the post and used to create the map. With the code below adding a Google Map is simple.

The first step is signing up for a API key, as with most Google products is free and only requires a Google account. After you’ve received your key, you can then edit the functions.php file of your current theme. The below code has some key spots to take note of and maybe change some values. I will highlight these after the full code.

Read the rest of this entry »

WordPress Self-Hosted Plugin Update API

Have a plugin that can’t be submitted to the official repository?

Code is now on GitHub please see here for updated version.

Many reasons exist but the biggest is that the plugin/support is sold therefore can’t be downloaded for free. But why should the end user be punished after all they bought the plugin and updates should be just as seamless as from the official repo. With this script this can be accomplished. Examples and a package of sample code can be downloaded below.
Read the rest of this entry »

WordPress Theme Developers Tip – Theme Update Noticifications

While doing some work for a client, they were wanting to tie into the update notifications that a user gets when a theme has an updated version in the WordPress theme directory. The catch is this was a premium theme that was being sold so couldn’t be submitted to the directory. While not as robust as the WordPress update system it doesn’t need to be most premium themes require you to log in to download updates. So a simple notification was sufficient. Please read more to see code and explanations. Read the rest of this entry »

Techozoic Fluid now on Google Code

Techozoic Fluid LogoI’ve just setup proper project management for my Techozoic Fluid theme using Google Code. I have also designed a logo for my theme. If you would like to always have the latest version of Techozoic you may now use Subversion to checkout a copy. If you are like me and keep up with the latest WordPress nightly releases then you’ll know how to checkout code using svn. I use Linux but I’m sure svn works the same for Windows as well.

View the Techozoic Fluid project page.

Svn Checkout Instructions

#cd /path/to/your/blog/wp-content/themes/
#svn checkout http://techozoic-fluid.googlecode.com/svn/trunk/ techozoic-fluid

WordPress Theme Developers Tip – Call Dynamic CSS the Right Way

While developing my Techozoic theme, I’ve progressed from adding custom CSS into the head section, to having an external file and using $_GET variables to pull options from the database, to now I believe is the right way to do it, using add_filter and a custom query in WordPress. By using this new method I’ve done away with unsafe $_GET variables and can now use any builtin WP functions in the external file.
First you’ll need to edit your functions.php file and add this block of code.

	add_filter('query_vars', 'add_new_var_to_wp');
	function add_new_var_to_wp($public_query_vars) {
		$public_query_vars[] = 'my_theme_custom_var';
		//my_theme_custom_var is the name of the custom query variable that is created and how you reference it in the call to the file
		return $public_query_vars;
	}

This sets up WP to now accept a new variable in a query called my_theme_custom_var the format of the query would be http://www.yourblog.com/index.php?my_theme_custom_var=css . The ? mark tells WP that this is a query and the = sign tells what the query variable should be set to.

Now to actually setup the function that will call the external file. I found this gem when looking at how popular WP theme called Atahualpa handled it’s external CSS.

	add_action('template_redirect', 'my_theme_css_display');
	function my_theme_css_display(){
		$css = get_query_var('my_theme_custom_var');
		if ($css == 'css'){
			include_once (TEMPLATEPATH . '/style.php');
			exit;  //This stops WP from loading any further
		}
	}

This code now will check if a query is passed to WP with the value my_theme_custom_var and if it is and has the value of css then it includes the style.php file which is our dynamic CSS file. Then the code exits which stops any other functions from happening other wise the whole home page is outputted along with the style.php file, which isn’t what is needed only the file.
Now you can use any WP functions on the style.php file as it is included from the functions.php file which is a standard WP file.
Source : Will Norris