Syndicate

Subscribe to Syndicate

CKEditor Wysiwyg hook

Wed, 15/05/2013 - 14:51 -- kevin

This hook stops CKEditor stripping out your syles, classes and ID's

/**
 * Implements hook_wysiwyg_editor_settings_alter().
 */
function d7dev_admin_wysiwyg_editor_settings_alter(&$settings, &$context) {
  if ($context['profile']->editor == 'ckeditor') {
   $settings['allowedContent'] = TRUE;
  }

}

You probably will want to also select /check
Preformatted and Apply source formatting from Cleanup and Output
admin/config/content/wysiwyg/profile/full_html/edit

Hiding admin menu buttons in WordPress

Tue, 02/04/2013 - 11:24 -- kevin

Hiding individual admin buttons in WordPress backend is really easy.

WordPress ease of use and administration interface is probably second to none. Almost everyone who has deployed WordPress to a new client has instructed them to avoid certain menu items and settings interface as they could potentially break the site.

A better solution is to hide the menu items. This tip shows you how to use WordPress API functions, introduced in version 3.1, to remove the Links editor and Permalinks settings menu items.

Custom Post Type Validation without javascript

Sun, 31/03/2013 - 17:28 -- kevin

Validating content in WordPress Custom Post Types is not particularly simple in WordPress without the use of a plugin or Javascript (normally jQuery).

What I am going to show you here is how to validate input and replace the default admin message with our own error message.

Here is a very simple custom content type that contains just a title field.  I have built this as a plugin but it could just as easy be inside the theme function file.

The end product will look like this

PyroCMS has no future

Thu, 07/03/2013 - 11:39 -- kevin

An article posted on nettuts called "What's PyroCMS?" has caused some debate.

In my opinion PyroCMS has no future as a serious CMS (Content Management System) or CMF (Content Management Framework) for a number of simple reasons:

PyroCMS is built on Codeigniter, which for me is a brilliant PHP set of libraries. You can put together (and I have a number of large commercial sites) a website/application with ease. Now Codeigniter is not Cake or Symphony but a very loosely coupled MVC framework which has a nice set of helpers and classes to take out the tedious part of putting an app together. Phil Sturgeon, the original author of PyroCMS, was (but no longer thankfully) lead on Codeigniter Reactor. Phil wanted to take Codeigniter forward but in a direction that not everyone wanted it to go - Codeigniter is not and will never be a CMS or CMF out of the box.

Tags: 

Ionize Error On Articles

Fri, 23/11/2012 - 12:02 -- kevin

Codeigniter, Ionize version 0.9.7

When editing an article you will see the php error (image above).

line 934 application/controllers/admin/article.php

if ($context['link'] !='')

change to

if (isset($context['link'] && $context['link'] !='')

Will solve the problem.

UPDATE:

I've just noticed that in the github version changes have been made

Tags: 

Hawkes Bay Cricket

Sat, 10/11/2012 - 14:15 -- kevin

I have the proud honour of being a Cricket Umpire for Hawke's Bay, New Zealand. Cricket is just one of those games that you love or hate. Being in the former group but being a little bit old too play competition cricket, not enough time to manage or coach anymore the role of Umpire is perfect.

Cricket is a game of stats and I've built a website for Hawke's Bay Cricket Umpires' and scorers' association that displays news and features plus a content type that shows the weekly appointments, this wil also be used to show the umpires' profiles and activities over the coming years.

Pages

Subscribe to Kevin Phillips RSS