CKEditor Skin

CKEditor default skins are fugly, up until now I've been using the Office2003 skin due to lack of available skins for ckeditor that don't look like puke, I've started on my own. Not all parts are themed, just the functions I use. Icons are Famfamfam silk and base skin is Office2003 from ckeditor. I've tried to keep it simple, colourless and plain. I plan to update the skin as i discover bugs and or require new features. Please send comments or contact me if you have any suggestions, etc.

Now that jQuery UI is included in D7 core, we'll see a lot more application style functions using the UI library. Here's a quick example for adding an accordion to node content (enable and select PHP filter) demonstrating how easy it is to add jQuery UI effects and widgets in Drupal 7.

I would like to share a code snippet for a site I'm currently developing which I thought was particularly cool.

The following code adjusts the page margins in a dynamic fashion and is nice on the liquid layout I'm designing. Basically it sets the page margins (or padding in this case) logarithmically (sort of) so in a really wide screen there's heaps of margin and on low res (1024 wide) there is very little. Percentages didn't cut it.

  1. Lack of attention to title tags or leaving title tags as automatically generated on important pages or having duplicate titles. The single most important thing you can do to improve Drupal SEO is improve page titles - Page Title module
  2. No quality backlinks. This will take a huge effort, back-links or inbound links from related sites, suppliers and clients will help bring traffic and build SEO. For goodness sake do not buy back-links.

I've been working on the Drupal 6.x dev version of the Andreas03 theme (http://drupal.org/project/andreas03) for which there is no left sidebar region. I was kind of stuck on the regions where on a fresh installation, enabling the theme automatically put the navigation/login in the header by default.

I've recently changed the submitted date on my blog posts and added a little CSS magic, thanks to Jonathan Snook's article on Text Rotation with CSS

Essentially it's a few lines of code, I didn't show the full CSS, there is a fair bit more to it than below. Feel free to Inspect Elements on my node teasers to see the inner workings.

Kill IE6

Being a good citizen I've put up a nice upgrade informational pop-up for visitors still using IE6. This has been in place for over a year.

I decided to stop being polite about it and out-right ban IE6 users from my site with a big nasty message and no content. Really, enough is enough it's freaking 9 years since release. Are you people retarded? This has to be my biggest irritation when developing corporate sites but IE6 compatibility is still a requirement for these guys.

** Note for IE6 users: I absolutely refuse to allow your stinky browser from tainting my access logs. **

This is an awesome trick for hiding your e-mail address e-mail harvesting bots.

HTML

<span class="fu-spammers">moc.elpmaxe@sirhc</span>

CSS

.fu-spammers {
direction: rtl;
unicode-bidi:bidi-override;

The result: moc.elpmaxe@sirhc

Performing a case-sensitive search-and-replace through a table is easy with MySQL when you know how.

UPDATE table_name SET table_field = REPLACE(table_field, 'replace_that', 'with_this');

This has proved useful for updating Drupal's files table where the paths are incorrect. I hope this helps someone

I needed to add a body class for node edit pages. Heres the code for template.php

<?php
function phptemplate_preprocess_page(&amp;$vars, $hook) {
 
// node-edit class
 
if (arg(2) == 'edit') {
   
$vars['body_classes'] = $vars['body_classes'] .' node-edit';
  }
}
?>

Syndicate content