Cagintranet Web Design is a small, yet highly focused design studio built on exceptional work, great relationships and an uncanny knack for the creative.

Pittsburgh Web Design - Cagintranet Web Design

Archive for popular

You are browsing the Cagintranet Web Design archives of popular

How to Use Wordpress as a Membership Directory (6)

UPDATE: This is a repost of a guest post I made earlier this year over at WPDesigner. I am reposting it here because of the neglect that has taken place recently over at WPDesigner. I will only be responding to questions on this article from now on. Thank you for your understanding. (FYI: My WPDesigner guest post was an unpaid one, so I am in no way stealing from anyone here…)

This article was written by Chris Cagle.

Do you want to create a moderated membership directory that showcases your member's information? Do you want it to be flexible, be very little work after initial setup, and use a world-class open source platform that you are already familiar with?

Your first thought might not be to use Wordpress for such a project, but since it already has an extremely easy way to accept, moderate and update registrations - it's a perfect candidate.

In this tutorial I will show you how I built a successful membership directory using nothing more than a standard Wordpress 2.3+ install and 2 very powerful plugins.

Continue Reading »

Wordpress Tip: Essential UI Friendly Features (0)

User Interface (UI) has been a hot topic recently.

Mozilla is betting their money on it, Jakob undeniably knows it and even Wordpress itself emphasized it in their latest release.

So when you are designing your next Wordpress theme,you will need to keep UI in mind. I have put together a list of some of the best UI features that Wordpress has to offer, but unfortunately many themes don't include most of them. Fortunately, many are extremely easy to add. Feel free to add any I've missed in the comments.

Top 6 Wordpress Theme UI Essentials

  1. On the single.php template, always show the previous and next post links.
    This is one that I regretfully omitted in some of my first Wordpress theme designs. This is such an easy thing to add (within the Loop), and gives your visitor a way to check out your next post rather than having to hit the back button to return to your homepage.

    <?php previous_post('Previous Post: %', '', 'yes'); ?><br />
    <?php next_post('Next Post: %', ", 'yes'); ?>
  2. Add the Auto-discovery link for RSS in the header.
    This is another no-brainer, but inexplicably this isn't added to some blogs. The way I see it, you should provide your visitors with every way imaginable to subscribe to your RSS feed. RSS is the lifeblood of any blog and there is no excuse for not having this one line of code in your header.php template file.

    <link rel="alternate" type="application/rss+xml" title="Entries RSS" href="<?php bloginfo('rss2_url'); ?>" />
  3. When you display a post's comment number, it should be an active link to the comments section on the single.php template.
    There is a template tag that does this automatically:

    <?php comments_popup_link
    ('zero','one','more','CSSclass','none');
    ?>

    … but there is also one that doesn't. This one gives you more flexibility in design and styling, but if you use it, just make sure you link it to the comments section of the page.

    <a href="#comments" title="Comments"><?php comments_number('zero', 'one', 'more', 'number'); ?></a>
  4. Create an 'Add New Comment' link above all other comments.
    This simple link will allow your visitors to quickly skip all comments and reach your comment form to participate in the conversation as fast as possible. (The example below assumes your form in comments.php has an id="commentform")

    <a href="#commentform" title="Reply">Add New Comment</a>
  5. Link to that post's specific Comments RSS Feed.
    Pretty easy to add, and it all goes back to Step 2 - subscribers are the lifeblood. An alternative to this would be to add the "Subscribe to Comments" plugin, but having both certainly would never hurt.

    <a href="<?php the_permalink(); ?>/feed" title="Subscribe to the comments for this Post" >RSS</a>

    You can also take this a step further by adding an auto-discovery link in the header.php template, much like the way Step 2 above does for the main site feed.

    <?php if (is_single()) { ?>
    <?php while (have_posts()) : the_post(); ?>
    <link rel="alternate" type="application/rss+xml" title="<?php the_title(); ?> Comments" href="<?php bloginfo('url'); ?>/?feed=rss2&amp;p=<?php the_ID(); ?>" />
    <?php endwhile; ?>
    <?php rewind_posts(); ?>
    <?php } ?>

    If you want to take this even one step further, I would suggest adding the Subscribe to Comments plugin. After many requests for it, I have stated making it a regularly used plugin in my work.

  6. Provide each comment with it's own permalink.
    What happens if someone (maybe you in another post?…) needs to reference a comment left on one of your posts? The answer is they can't unless you've added this code to your comments.php template file.

    So in my comments.php file, I find this (or something similar) and make sure that I see the id="comment-<?php comment_ID() ?>" in the <li>.

    <ol class="commentlist">
    <?php foreach ($comments as $comment) : ?>

    <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">

    I then add something like this linking to that comment ID within that same <li>

    <a href="#comment-<?php comment_ID() ?>"><?php comment_date('F jS, Y') ?></a>

FYI: For any WP work that I have done previously for you that doesn't include some of these small bits of code - please contact me so that I can add it to your theme free of charge.

Wordpress Plugin: WP-SocialCount (7)

WP-SocialCount Wordpress Plugin

WP-SocialCount is a Wordpress plugin that displays the number of adds/saves from within a social network for any particular URL. Since this plugin allows you to specify the URL that you want to pull the data for, it means that you can display any social number for any URL of your choosing. We also attach no style to the data the plugin returns - so you are free to style and use the data in any way you see fit.

Download

Download latest stable version from Wordpress Extend

Installation

  1. Upload wpsocialcount.php to your wp-content/plugins/ folder.
  2. Backup your Wordpress Installation. I don't forsee any problems, but since this install creates a new db table, it's better to be safe than sorry.
  3. Activate the plugin.
  4. Go to Options->WP-SocialCount to set some of the variables for the plugin (not required for basic usage).
  5. Add the template tag shown below into your theme's template files.

Usage

Template tag syntax:

<?php wpsocialcount('social-network', 'data-format', 'url'); ?>
  • social-network: [required] Either 'delicious', 'digg' or 'stumbleupon' for now
  • data-format: [required] The type and format of the data you want
    • data-format options for Del.ico.us
      • link - Echos the link to add the URL to Del.ico.us. Also includes the amount of 'saves' if available.
      • empty - Returns the amount of 'saves' of the specified URL.
    • data-format options for Digg
      • link - Echos the link to digg the URL. Also includes the amount of diggs and comments if available.
      • comments - Returns the amount of 'comments' of the specified URL.
      • diggs - Returns the amount of 'diggs' of the specified URL.
  • url: [required] Use full URL including 'http://'

Examples

Demo Page. Also, visit adClustr. In the top right it shows a customized version of a Del.icio.us link.

Requirements

  • Only tested on Wordpress 2.3.2+, but there is no reason it should not work on any versions of WP 2.0 or above.
  • PHP 5.2.0 or greater for need of JSON support.

FAQ

  • Can it work with other social networks?
    I am in the process of adding more API support as I find the time and code for it.

  • What can I do with this?
    You can create and customize any "Add my post to Del.icio.us", "Stumble This" or "Digg This" badge that your mind can possibly create with CSS. This plugin gives you complete control over the add-to link's appearance.

  • Can I add more than one wpsocialcount function to my templates?
    Yes. As far as I can tell, there is no limit on the number of wpsocialcount tags that can be added to any one theme. However, certain sites will throttle your website's usage of it if it believes you are abusing the API with too many queries in too short of a timeframe. This plugin tries to stop this from happening by caching the data it fetches into a database table and only checking for updates at most once an hour.

Version Changelog

  • Ver 0.4 - March 12th, 2008 - Added support for StumbleUpon. Added administration panel in Wordpress to collect values needed for StumbleUpon usage and other variables. Update: StumbleUpon must have caught on, and this now does not work.
  • Ver 0.3 - Not released to public. Added support for Digg. Also added database caching to try and prevent del.ico.us from throttling users.
  • Ver 0.2 - Not released to public. Changed to pull data from Del.icio.us api. Plugin now requires PHP 5.2.0 because of it's support of JSON.
  • Ver 0.1 - Not released to public. It was a plugin that hacked the Del.icio.us bookmark count from the tagometer badge that Del.icio.us provides.

Credits

These are some of the places I used for help when creating this plugin. I owe a big 'Thank You' to everyone on this list!

  • Joost de Valk - For help with understanding the del.icio.us JSON code
  • SplitBrain - For help in getting around the whole no-StumbleUpon api thing
  • Digg API - Much better documented than any other api so far