WordPress Pods: Food For Thought

March 18th, 2010 by Keith from shrewdies | Comments Off | Filed in Form, Function
The data-presentation link is vital. To get the best out of WordPress Pods, it pays to study the sample that is packaged with the Pods CMS plugin, and the more advanced examples in the Pods Packages directory.

It is also vital to have a clear plan of the presentation outcomes that you need.

When describing the data aspect of my first plugin, I wrote of the importance of thoroughly analyzing the relationship between the presentation of content required, and the structure of data needed to support it. Recently, I saw a question on the Pods Support Forum that seemed to relate to this area. I was particularly interested in it because the issues seemed to be similar to matters I had encountered with my shrewdBar WordPress menu bar plugin.

The difficulty with forum discussions is fully understanding what the issues are. If one is sat with a client, or even on a video link, it is easy to mock up a quick display and discuss what the presentation should actually look like. Difficulties are compounded with cultural and time-zone differences. But, “All is one in their own way,” and the power of the Internet allows the following attempt at understanding the problem and suggesting a solution.

I hope it solves the problem it tries to address, but even if it doesn’t, I’ve learned a neat CSS trick that I’ll be using again.

Basic Pods Data Display

First, create the Pod (Pods – Setup – Pods – Add new pod) using the data supplied.WordPress Pods Table
Second, Read the rest of this entry »

Tags: ,

Pods WordPress Plugins Double Overnight

March 15th, 2010 by Keith from shrewdies | Comments Off | Filed in Function
Today, the number of WordPress Pods plugins in the plugin database doubled.

My Happiness Today plugin release joins the Pods UI plugin to double the number of examples of Pods CMS use.

Though this is released as a teaching tool, you should not assume it is perfect. Though it works perfectly, there are a few rough edges in the implementation. But that is the point of Open Source tools – we can improve all aspects of Happiness Today, collectively.

I like the idea of the Hello Dolly plugin as a teaching tool. Though it is criticized for it’s limited usefulness, the WordPress developers have defended it, by rightly explaining:

I think Hello Dolly is a good little example plugin. Users can turn it on, see that it does something, turn it off, see that it doesn’t do it anymore. Plugin functionality exemplified.

This is perfectly true, and useful for novice WordPress users who want to understand what a plugin is, without being intimidated by reams of PHP code. But Pods developers are a different breed. We have varying PHP & HTML skills, but we are bound by a common desire to learn and extend WordPress functionality.

So Happiness Today goes beyond the remit of Hello Dolly, and achieves useful outcomes. Using the simple Pods data edit screens, you can transform Hello Dolly into a client support tool, or promotion tool for any campaign where short messages to WordPress website builders are going to win you a click or three.

Simple Pods WordPress Plugin Output

Simple Pods WordPress Plugin Output

Though I have used plain text in the distributed plugin, the data is stored as rich text, so you can easily include images and hyperlinks in the message display. This is in addition to the included customizable link buttons. After editing the data files with whatever text you need, you can easily import it as a Pods Package for your client sites.

I prepared the plugin in minutes using the Pods Plugin Builder that is the real goal of this project. In fact, most of the time is spent writing the readme.txt file that is generated as part of the plugin distribution package. That tool is still under development, but when available, it will make distribution of your own version of Happiness Today, or any other Pods Package, a very simple process.

Happiness Today Next Steps

Please contribute ideas to the wishlist. Also, if you are a superb PHP programmer, I would love to here your thoughts on code improvement.

I would also like to you to rate the Happiness Today Pods WordPress plugin, but if you cannot give it a 5 star, at least give me the opportunity to fix any problems you have before you vote.

Tags: ,

Simple:Press Forum Advertising

March 14th, 2010 by Keith from shrewdies | 8 Comments | Filed in Fulfil
I mentioned AdSense in passing when I wrote about extending Simple:Press forum by adding code to the descriptions.

Hundreds of you have asked for more information about adding advertising to your forums, or more specifically about adding AdSense to Simple:Press.

I’d like to say “don’t bother!” but I think you deserve more than that.

Why “don’t bother?” Because forums are notoriously hard to monetize, though there are a couple of ways to get reasonable results.

Before I explain those, I’d like to look at some of the ways to add AdSense to Simple:Press forums. I mention AdSense, but of course any advertising scheme can be added in the same way.

Easy Ways To Add AdSense To Simple:Press

❶ Sidebar
It is usually better to disable sidebars on pages, so this option is a poor one. Also Sidebar click-thru rates are usually pretty poor, but this is an easy option – just paste your code into a text widget.
❷ Footer
Edit footer.php in your theme, or add one of the many plugins that let you drop code into your footer.
❸ Other Theme Files
You could edit the page template, or other files, but I cannot see the point.
❹ Forum Page
Simple:Press creates a blank page, usually called forum, though you should normally change this to your-site-topic-forum. You should enter some introductory text on this page, and it is also the best place to easily add AdSense code. If you wrap your text in <div id="sforum"><div class="sfloginstrip"> Your text & AdSense code <\div><\div>, the text will pick up your Simple:Press skin styling. You can also use div to wrap position styling round your AdSense code. If you do this, be sure to test thoroughly on forum lists, forum details, etc to make sure it is positioned OK on every type of forum page.

Harder Ways To Add AdSense To Simple:Press

№𝟙 Enzyme Descriptions
As previously mentioned.
№𝟚 Edit Simple:Press Files
This gives you the most flexibility, but be careful to thoroughly document your amendments, as you will have to reapply them if you upgrade. Also, change the description in sf-control.php to add a link to your documentation, as a reminder on the plugins admin page.

There are lots of options for placing your adverts. Simple:Press has many files, so finding the exact point can occasionally be difficult. However the Simple:Press support forum is second to none, so if you need to know exactly which file to edit for a particular location, ask in their forum. To start you off, I have placed advertising easily just above the statistics block. Simply edit forum/sf-pagecomponents.php, and search for function sf_render_stats(). Paste your code immediately after the { and your advert will appear above the statistics. As the statistics block outputs an HTML table, you have many other options for exactly where you position your code.

Getting AdSense Revenue From Simple:Press

Read the rest of this entry »

Tags: , ,

WordPress Database With Pods Wings

March 11th, 2010 by Keith from shrewdies | Comments Off | Filed in Web Hosting
I start my detailed look at the anatomy of our WordPress Pods plugins by showing you how Pods CMS makes the WordPress database fly.

Though we are all working with data at the heart of the WordPress database, we often take it for granted.

But data drives our content, our navigation, our presentation, our whole website.

Wouldn’t it be a good idea if we managed it properly?

I must confess, I love data. Actually, that’s as perverted as loving money – I actually love what can be done with data, rather than data itself. Structured and handled properly, application development, from the most basic WordPress plugin to a full blown web application becomes much more scalable and easier to manage if we get the data right.

WordPress Database With Pods

WordPress Database With Pods (click image for full size)

Our sample project Happiness Today, relies on data, just as it’s inspiration, Hello Dolly does. Whereas Hello Dolly data, the song lyrics, are hard-coded in the plugin, Happiness Today data is put where it belongs – in the WordPress database.

Each Pods project starts with data. This is the basic building block, known simply as a Pod. In complex applications, the hard part is learning how to structure data, especially if it needs to be split into different Pods.

Our example is very simple – every record in the Pod is just a lyric from the song. Experience tells me that I need keys to data in databases. In this case I use a simple line number identifier, which allows me to sort the records should I wish to output the whole song.

It is a good habit to always think of record keys when designing a Pod, or any other database. Pods helps us here by always creating a field called name, which will always uniquely identify records. With the Pod created, we simply need to add the text to each record, which we do with the standard Pods CMS record editing screens.

Job done, except that we need to get the data out. Read the rest of this entry »

Tags: ,

WordPress Pods Projects Going For A Song

March 9th, 2010 by Keith from shrewdies | Comments Off | Filed in Function
When I introduced my WordPress Pods Plugin Builder yesterday, I hinted at an example project to test the builder with.

I can reveal that this will be an homage to the ubiquitous Hello Dolly plugin – with some extras, and some Pods magic.

Just to remind you. I love Pods as it is intended to be used – a Content Management System that extends WordPress Pages and Posts to allow developers to provide new content styles. This is extremely important to me as I develop new tools for webmasters, and new web applications to extend my health sites.

But for the moment, I’m hooked (pun intended) on using Pods to hook rapidly developed packages into WordPress as plugins. This series of articles explains the Pods features used to create WordPress plugin files complete with readme.txt. WordPress explains what a plugin is by way of the Hello Dolly example. In a similar way, I needed a very simple plugin application to test and demonstrate my WordPress Pods Plugin Builder.

Enter Soft Charisma, the music company run by Scott Kingsley Clark, one of Pods lead developers. Scott has written the perfect song to complement Hello Dolly – Think Of Happiness Today.

Happiness Today Plugin

Happiness Today Plugin - click for large size

My plugin, Happiness Today, displays random lyrics from the song on the admin pages. So far, so Hello Dolly, but there are extras: Read the rest of this entry »

Tags: , ,

WordPress Pods Plugin Builder Taking Shape

March 8th, 2010 by Keith from shrewdies | Comments Off | Filed in Function
WordPress Pods CMS plugin is fantastic for adding new content to websites that do not easily fit the standard Page or Post styles.

With it’s easy to use interface, it is good for novice writers, but it also stands on a very powerful data management platform.

This makes it a real candidate for Rapid Application Development, but how to package and distribute those applications?

Before I present my latest project for building structured WordPress plugins, packaged with properly formatted readme file, straight from the Pods interface let me explain what Pods is.
Read the rest of this entry »

Tags: , , ,

Make Microformats Work For You – Ignore Them

February 25th, 2010 by Keith from shrewdies | 2 Comments | Filed in Function
Microformats are the latest topic to confuse budding webmasters.

But are they relevant to WordPress website owners, and will they help or hinder your marketing efforts.

More to the point – what are they?

The buzz for webmasters is that microformats help you on Google. But there are one or two fairly large points missing from that.

Before we look into those, let me explain what microformats are. They are tags in your web page, similar in operation to HTML tags. Whereas HTML tags change the appearance of text, microformats tell search engines and other robots what your text means. More specifically they describe the context of your text as structured data.

Whoopi-f-ing-doo you cry, or at least “so what.”

But wait, this is important.

If a search engine can interpret the type of information you are presenting, it can list you better. It puts your information into the right context. You can explicitly distinguish the author of a work from a work about an author.

Your words, with these descriptive tags, are known as rich snippets. If you currently earn money by providing content that includes reviews, people, businesses, organizations, events or video, then you need these snippets to help you get richer.

Why Microformats?

A search engine that might have sent you a little traffic from time to time has more information on rich snippets (including a validation tool), but before you investigate that, consider what is missing from the “Google & Microformats: Drive More Traffic” article. Read the rest of this entry »

Tags: , , ,

WordPress WYSIWYG Made Easy

February 22nd, 2010 by Keith from shrewdies | 5 Comments | Filed in Function
What you see is not always what you get with WordPress.

WordPress WYSIWYG

  • Easily add site-wide WYSIWYG textareas
  • Beware the Internet Explorer trap
  • Download to avoid losing service
  • Configure options for best results

By default, the standard WordPress WYSIWYG editor is TinyMCE – but it is a non-standard implementation, and it is only used in new posts, not comments.

There are many plugins that extend both the functionality and application of TinyMCE. Life can get very complicated checking all the options, but I stopped looking when I road tested Front-end Editor. This uses the NicEdit WYSIWYG editor, which is very easy to implement.

I looked at the WP NicEdit plugin, but it is no longer supported. Anyway, I checked out the NicEdit site, and it only needs a couple of lines of code, so I just added them to my footer. Being short of time, I took the lazy option of linking direct to the NicEdit site, using the two lines of code on the NicEdit homepage, instead of installing on my own server. I regretted that, but it was easily fixed, with some interesting options, which I will explain soon.

First let me mention a terrible problem (with a praise-winning fix) I found when I tested in Internet Explorer instead of my faithful Firefox. Read the rest of this entry »

Tags: ,

Join The WordPress Web Hosting Debate

February 12th, 2010 by Keith from shrewdies | 8 Comments | Filed in Web Hosting
One advantage of WordPress web hosting is the ease with which debate is encouraged through commenting.

Link Policy At A Glance

  • Contributors must add value
  • Sidebar link list for top posters
  • Nofollow removed on guests after 2 comments
  • Nofollow removed immediately for registered users

Then WordPress removes the incentive for you to contribute by adding a nofollow link to your comments! :cry:

In turn, I remove that nofollow attribute, in most circumstances, so that you get search engine rewards for your valued contribution. :razz:

I interrupt my series on the shrewdBar development of a Pods package to highlight the benefits you get from joining the web hosting discussion on this site. By discussion, I mean adding valuable questions, comments or theories to existing topics, or starting a new discussion on a web hosting, or WordPress, related topic.

I have updated my link policy today, to explain more clearly how you can get incoming links to your site.

I have also added a top contributors list on the sidebar, to give extra links for those who contribute most. Read the rest of this entry »

Tags: ,

WordPress Database Extension

February 9th, 2010 by Keith from shrewdies | Comments Off | Filed in Function
Extending the WordPress database is the first step in developing my menu bar.

In most WordPress extensions, a lot of data is hidden in the code.

The massive advantage of Pods is that we can easily store additional data, and manage it very efficiently.

In the first installment of this series, I introduced shrewdBar, explaining it was based on a WordPress plugin that creates a menu by outputting data in the form of a CSS LIst driven menu. This type of menu is quite common – you style a nested list to have hidden items that reveal themselves when the mouse hovers over them. The added attraction of this type of menu is that without the styling, you simply have a nested list of items that search engines can follow.

The CSS issues are for another time. What I need you to realize is that these menus are usually built in code, with a lot of hard-coded links. True, the original menubar, DashBar, on which shrewdBar is roughly based, does have some items that are extracted from WordPress database tables. In my first version of the menu bar, I extended this to extract messages and topics from the Simple:Press forum.

Pods allowed me to put all the menu items into WordPress database tables, and I explain in this article, how I achieved this.

shrewdBar Database

In its current release, I have limited the menu to two tiers, so we have a Pod for the top tier, that you see across the top of the page. Optionally, each of these top level records can have a variable number of child items.

The schematic is:

shrewdies_bar    link    shrewdies_bar_item
name (txt) name (txt)
slug (slug) slug (slug)
bartext (txt) itemtext (txt)
bartitle (txt) itemtitle (txt)
barurl (txt) itemurl (txt)
baritems (pick shrewdies_bar_item)  ¹——∞ itembar (pick shrewdies_bar)
bardisplay (code)
barhold (bool)

Pods automatically creates the name and slug fields when we create a new pod. name identifies the record, and I also use it as a sort order. slug is very useful in many Pods packages, and I’ll cover it in depth later, but it is not really required in the current version of shrewdBar.

The text, title and url fields are the menu links that are used to navigate to different pages. The pick fields are used to relate tables – in this case a one to many relationship.

The top level menu records have two additional fields. The boolean hold field allows menu items to be temporarily hidden, without deleting the record. This is not required for second level items, as it is a simple click to break or make the relationship to a top level menu. The display field allows us to enter PHP code which can programatically control the display giving us very powerful dynamic menus. I’ll be discussing this at length in the next installment.

shrewdBar Options

Like most plugins, shrewdBar needs options to control colors and positioning. Unlike most WordPress plugins, these options no longer have to live in the options table where they soon get lost. I put the shrewdBar options in its own table, which makes it very easy to manage. The options data could be managed using the standard Pods edit page, however I find it better to write a special page with information and instructions. I’ll be covering this in detail in a later installment.

In the next installment, I will explain how simple Pods procedures act on the data to produce the list output that forms the shrewdBar menu.

Tags: , , ,