Get it All

Only a very small handful of people from Rochester and the surrounding areas – those who like local music – will get the reference in the title of this post. Maybe a few people outside of the Rochester area. That’s OK. It’s a small homage to a favourite local band…

By now, most of us who are committed to social web development take it as a given that URLs should be as clean as possible for as much content on your site as possible[2. For a good discussion of clean URLs, their meaning and their use, see this article.]. Clean, clear URLs provide your audience with an intuitive way to understand the structure of your website, provide an easy method to return to favourite topics or sections of your site and not least-importantly, provide search engines with easily keyword-associated URLs to log and serve to their customers.

With CakePHP, clean URLs are part of the normal process of building pages, rather than an imposition. A URL to a given resource on your CakePHP website will have a format of…[1. If you’re not familiar with this format, have a look at this page, which is our topic of discussion, anyway.] Without knowing how your site will be organized, this is a fairly intuitive way of organizing URLs. Your controller name should be fairly descriptive of what it works with, “posts,” or “teeshirts”; your action will probably be fairly descriptive of what its meant to do, “edit,” “view,” “index,” and so forth.

But not in all cases does the standard formatting work. In the case of the site that I’m in the process of developing,, I needed to make some changes to the way CakePHP structured it’s URLs to make things slightly more intuitive to the layout of the website. For example, since the organization of data revolves around Metro areas containing one or more Towns having many Potholes, using /metros, /towns/ and /potholes didn’t make sense and wouldn’t have accurately reflected that organization.
Continue reading

For those who are serious about cataloging and displaying news from across the Internet in one blog, I’ve created the DFE News Harvester Plugin. DFENH allows you to register a variety of news feeds, read them within WordPress, select the articles you’d like to publish and publish them as posts in a blog.

DFENH also works with WP meta data to provide a number of bits of data that you might want in a news article, such as a title, a secondary “teaser” title, an image with credit and a brief summary. It’s up to you how you want to actually use this metadata on your site: DFENH does not offer any method of displaying metadata on the site.

Another feature of DFE News Harvester is it’s ability to automatically create tags for each article based on it’s title. When a list of articles is submitted for publication, DFENH automatically breaks the title up by words, eliminates unnecessary words like “by, the, if, etc” and creates tags for each of the remaining keywords.

This is a plugin which will work in either WordPress or WordPress MU. However, this is not a plugin meant to run in the /mu-plugins folder and I have not tested it for that use.

To install, simply download from, drop the entire /dfe_news_harvester folder into your wp-content/plugins folder and activate through the Control Panel of your blog.

Is This a Splog Plugin?

You can use this plugin however you like, but I would submit that there are far more efficient methods of creating a splog than this plugin provides. This plugin is geared towards providing updated news content in a way that is administration-heavy, relative to splogging tools. It does not harvest content off the original website by itself, it does provide a method of renaming links and providing your own summary of articles.

I trust that everyone who uses this plugin does so with the utter-most respect for original content on the web!

Download this plugin

Download Here

This one’s called a “Plug-n-Hack” because it relies on a lot more than just the basic plugin to work. It requires careful layout of your blog’s theme and editing the plugin in order to work correctly.

But for those of you who are running sites where you’d like to be able to keep the overall structure of individual blogs the same, while allowing your users to make some adjustments to the color scheme, this may be just the solution. With the Theme Styles Plug-n-Hack, you can create new color schemes as the administrator and offer them to your users to select from.

The plugin itself is very basic. All it does is add a new style element to the wp_head when the site loads. The elements within the style must be the same IDs and classes as you use regularly, because the new declarations will override your default settings for color. As such, it is imperative that before working with this plugin, you take stock of your current color scheme and determine how many colors you work with ordinarily and how many of those you’ll want to change. For example, my site uses five basic colors not counting the text, which I decided would always stay the same color.

Once you’ve determined what colors you’re going to change, you need to start creating a second style sheet (which will eventually replace the one in the plugin) that calls each of the affected elements and declares only those attributes which are related to color. By way of example, in my case:
#top_nav_1 {
background:#CD2626 none repeat scroll 0%;
border-bottom:1px solid #FFCC00;
border-top:1px solid #FFCC00;

Now that you have this list, you can begin to replace the RGB color codes with PHP substitutions. The plugin is currently setup to recognize five color variables:
$darkest, $dark, $medium, $light, $border
These variable names made sense to me, but feel free to edit the plugin to change them, if you prefer. Go ahead and start putting in your substitutions where they fit. In my case:
#top_nav_1 {
border-bottom: 1px solid <?php echo($borders); ?>;
border-top: 1px solid <?php echo($borders); ?>;
background:<?php echo($dark); ?>;

Now you can go ahead and insert that style list in place of the one in the plugin, starting at line 33 of the theme_styles.php file. Note also that at line 23, some default values are set. You’ll want to switch these around to your theme’s default colors! Defaults are also set for the admin area at line 208.

Once all this is done, you can upload the theme_styles.php file to your /plugins folder and test it out. By activating the plugin, you create two new menu items: one is for Site Admins only, which is located under the Site Admin tab and allows you to either create new styles or change the values of existing styles; the second allows users to select from the styles you’ve created and is located under the Presentation menu.

With a little bit of editing, I think you’ll find this a welcome addition to your website.

Summary:  Returns an array of all users who have Administrative roles on a given domain.

Detail:  This function checks the database for all Site Admin users on the specified domain ($sitedomain and $path).  The returned value is an associative array of usernames and passwords.  This function works not only site-wide but across multiple domains, if you’re environment is set up in that way.