color map - new design

In the event that a client has an existing color scheme, but doesn’t have a website - a dummy file can be created that contains a list of colors - with the syntax:


color: #839482;
color: #900321;

Since the color mapping code does not differentiate between how the colors are used, it can map any color in.

limitations

The color mapper only acts on CSS files. If you have other files, such as HTML or PHP files - with colors embedded, this code will probably need to be extended.

It should still work, the only adjustments would likely be in the script that gets the colors. It will need to read different files (.html, .htm, .php, etc), and the code that finds the color specifications may need to be changed to act on color= instead of color:.

Application management

cPanel/Fantastico has a very cool feature that checks the version of installed applications against that which is currently available and alerts the administrator if an upgrade is recommended or required.

This type of application would be very valuable for a web company that installs open source software. Most of the time, each installation is the latest version, and when the project is done, maintenance is often forgotten or delayed.

Imagine a script like cPanel/Fantastico that could alert the company when an upgrade should be done.

It’s not that simple, though.

Open source is very easy to modify, and additional modules or plugins are often included. If an application has an active community, there can be hundreds or thousands of addins, which will all be maintained slightly differently.

There is no easy answer. However, if you set security as the primary goal (which you should), write a very simple script to get the application version strings from applications, and then use RSS feeds or other simple tools to check on the current status of the applications, as well as security reports/updates from the vendors, you should be able to track when upgrades need to be done.

Another approach would be to continuously monitor and upgrade applications with every version update. This would probably not be cost effective.

If you can run several sites through the same application installation, with separate databases, you may reduce the cost of maintenance, although the complexity of managing the applications increases exponentially.

blog skin

This is the same blog skin as the http://know-waste.com web notes blog, except that it was run through the color mapper.

The only manual change required was to source the common CSS files (from /rsc/css) out of the local directory, so they could be mapped, too.

Other than that, the colors on this page were read from another site’s CSS file and substituted into the CSS files using the code and process described.

eZ publish meta tag class and template

Meta tags may be valuable for SEO. A very nice implementation is to create a class with includes object relation lists to point to nodes that you would like to assign specific tags to.

The way it works is to find the reverse related objects (those objects that point to this node), and then extract out the tags. Depending on the complexity of your content architecture, this may require some tuning, but the basic concept is simple and has been used very successfully.


{* Add these lines to page_head.tpl to use this class *}

    {def $meta_tags=fetch( 'content', 'reverse_related_objects',
           hash( 'object_id',$node.contentobject_id,'all_relations',FALSE))}
 
      {if count($meta_tags)|ne(0)}

      <meta name="keywords" content="{$meta_tags.0.data_map.keywords.content|wash}" />
      <meta name="description" content="{$meta_tags.0.data_map.description.content|wash}" />
      <meta name="robots" content="{$meta_tags.0.data_map.robots.content|wash}" />

      {else}
  
        {section name=meta loop=$site.meta}
        <meta name="{$meta:key|wash}" content="{$meta:item|wash}" />

        {/section}
      {/if}

    {undef}

The package file isn’t posted due to security issues. It is reasonably easy to determine the class attributes from the template code.