Recently I have been working on a large project for a National Sporting team, It has been a process and it is almost finished.
As part of this system, we have developed an extended custom content management system.
Finding a WYSIWYG Editor for these types of sites is a tricky thing. Your editor of choice needs to be complex enough to let the user Manage their site, but not too hard that they can’t and don’t manage it, yet not give them so many options that your beautiful design gets listed on some of the ‘worst’ design sites due to ‘Crazy Customisation’, bright, huge highlighted words, 5mb images on every page and so on… like a ‘Client goes Crazy’ Video.
WordPress uses TinyMCE editor from MoxieCode, which is what we first implemented, but the design agency requested that they can add inline images in to the content. ( Bad thoughts crept in to my mind of a horror site coming out ) but I decided this would be a nesscarry change.
I went back to an old faithful that Ryan & I have used for years on other CMS’s.
The issue with this is it uses it’s own class, and interferes with CodeIgniter, the PHP FRamework that we are developing this site in.
After some googling, I found a solution on the CodeIgniter Wiki. After installing it, I first found I needed some small customizations, and that it wasn’t a new version, and didn’t have Safari support, which both us developers, and the advertising agency use. So I went to work on repackaging SPAW 18.104.22.168 for CodeIgniter with a few extra plugins.
I came accross this sweet WordPress Plugin called ‘WPTouch today and have just installed it on this blog.
Your site loads faster on EDGE and 3G connections
Ajax & jQuery are not loaded & used for comments, entries, excerpts etc.
When Gravatars Are Disabled:
Gravatar.com images are not shown beside commenter’s names
As a result, single post pages load faster on EDGE and 3G connections
It also allows for some customisation in how your blog is presented ( Icons, titles, Colours ).
Try it out on your iPhone or iPod touch, and if you are reading this from your iPhone already, then how do you like it ?
I have just launched my site with a theme that I have made myself completely from scratch.
It uses multiple colour sets and some ‘grunge’ style imagery. Let me know how you like it, and if you come across any bits and pieces that aren’t working.
The site uses CSS 2/3 and xHTML code, with a heavily modified version of WordPress 2.6.02.6.1
I have made all hacks to WordPress 99.9% upgradable so should be good to go with upgrading to the newly released WP 2.6.1. was simple.
I hide all CSS and JS with some simple PHP code and have a colour changer in the top right. This sets a PHP cookie for 7 days on your computer, and nothing is harmful about my cookies
I have built in the CSS/JS for the plugins is use to reduce code and scripts that WP inserts, I really hate how if you use a couple of plugins there gets a mess of included files in the <head> of the pages. Check out my source code, it is pretty, and you can’t view my CSS and JS files
When writing a post, I don’t often write it all in one go, then before I publish it, I save it and preview it, generally more than once.
WordPress has 2 Great ( or not ) features, Auto-Save, and Revisions.
When writing my last post Clean Dynamic Directory Listing with PHP I have some example code wrapped in <pre> tags and WordPress auto-validates code, which is a handy feature, but not here where I was trying to enter my example. So after several saves, and eventually getting in to my mySQL database to fix it and seeing that for hat this time only having 22 posts/pages, my database shows 199 records!
Ok.. I’m no prude, I have plenty of server space and mySQL storage, and the POST data isn’t exactly huge, but still Thats crazy! And before you ask, No I am not one of those people that go and delete all my old or unimportant emails!
Disable WordPress Auto-Saving my Posts!
So, I looked in to it and found people hacking their wp-ajax.php and post.php and thought, Oh Hell No! That is going to break every time I update WP, and who knows what else.
So.. a little bit of digging in to my code and found what I needed.
Open your WordPress Config File:
And after the first set of functions I added this line:
define( 'AUTOSAVE_INTERVAL', 900 );
By Default this value is set to 60 (seconds), 600 equals 1 Hour, 900 equals 1 1/2 hours, you can go higher, but i figure 1 1/2 hours in my case is good.
Disable WordPress Revisions!
I dont need or want 10 revisions of my posts, I am the only one editing them and this is not a Wiki! One Post, One Revision!
In the WordPress Config File:
And after the first set of functions I added this line:
define( 'WP_POST_REVISIONS', 0 );
By Default this value is On (1), but turn it off by setting it to Off (0) ( Zero ).
Sheldons revised WP-CONFIG.PHP
// ** MySQL settings ** //
define('DB_NAME', '*database*'); // The name of the database
define('DB_USER', '*username*'); // Your MySQL username
define('DB_PASSWORD', '*password*'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
// TURN OFF AUTO-SAVE AND SAVING REVISIONS
// THEY ARE MAKING A GOOD AWEFL MESS OF MY DB AND MESSING UP SETTINGS WHEN WRITING!
define( 'AUTOSAVE_INTERVAL', 600 ); // 60= 1 HOUR.
define ('WP_POST_REVISIONS', 0); // TURN OFF POST REVISIONS.
Cleaning up those extra 175 records!
Ok, I have disabled Auto-Saving and Saving Revisions, I am now a happy fella! But what about those 100's of old records?
A simple mySQL Query will fix those ! In your wp-config.php file, Right at the bottom after the "require_once(ABSPATH . 'wp-settings.php');" Paste this Query, Load any page in your site ONCE and then remove the line.
mysql_query("DELETE FROM `wp_posts` WHERE `post_status` = 'revision'");
This will Delete all those Auto-Saves and Revisions
Please post your Questions, Comments and Concerns!
Note: Back up your SQL database first! This is working good on my version of WordPress 2.6 with a few MOD’s.
All consideration and Care, but no responsibility – Sheldon
This Free WordPress Theme by Quake Media is a 3 column widget ready theme. It is XHTML Strict and a CSS 2.1 compliant and uses the author’s comment highlight hack. This theme is licensed under Share Alike and Attribute License.