Visual Categories Plugin v1.5 Announcement »

Description

Plugin Download: Local: Visual Categories Plugin | WordPress: Visual Categories Plugin
Current: Version 1.5.2
Required: PHP >= 4.3.0 & WordPress 2.7.x – 2.8

Take control over the way you display your categories: This plugin enables you to build “category entries” which contain a link to the category and which may contain a link to the category’s feed, an image, the timestamp of when the category was last updated, and the current count of posts in the category.

Versions

Version 1.5.2: Covered for WordPress quirks.
Version 1.5: Bugs fixed and WordPress 2.8 compatibility established.
Version 1.0: First public release.

Demo

To demo this plugin before you download it, email me at tester[at]thenappycat.org and request access. I’ll reply with a username and password.

To Do

  • Allow multiples instance of widget, each with unique settings.

Vocabulary

There are a few terms used throughout this guide that require explanations: Continue reading »

• • •

Visual Categories Plugin »

Description

Plugin Download: Local: Visual Categories Plugin | WordPress: Visual Categories Plugin
Current: Version 1.6.0
Required: PHP >= 4.3.0 & WordPress 2.7.x – 2.8.x

Take control over the way you display your categories: This plugin enables you to build “category entries” which contain a link to the category and which may contain a link to the category’s feed, an image, the timestamp of when the category was last updated, and the current count of posts in the category.

Versions

Version 1.6.0: Added ordering by timestamp of most recent post.
Version 1.5.5: Version number was not updated in 1.5.4. Oops!
Version 1.5.4: Stripper & PHP 4 compatibility issue resolved.
Version 1.5.3: Stripper & PHP 4 compatibility issue resolved (probably).
Version 1.5.2: Covered for WordPress quirks.
Version 1.5: Bugs fixed and WordPress 2.8 compatibility established.
Version 1.0: First public release.

To Do

  • Allow multiples instance of widget, each with unique settings.

Vocabulary

There are a few terms used throughout this guide that require explanations: Continue reading »

• • •

Custom List Categories Plugin v2.8 Announcement »

I’ve updated the Custom List Categories Plugin. Documentation is here.

Plugin Download: Custom List Categories Plugin
Version: Version 2.8
Requirements: PHP 5 & Wordpress 2.7.x

Version 2.8: Child categories may be made orphans, keep_family and children_class parameters added, and documentation updated. Numerous bugs fixed.
Version 2.0: Hierarchical listing of categories enabled and documentation updated.
Version 1.0: No hierarchical listing of categories.

• • •

Custom List Categories Plugin v2.0 Announcement »

I’ve updated the Custom List Categories Plugin. Documentation is here. Hierarchical listing of categories has been enabled. You can now hierarchically list categories within the ‘height’ specified columns.

Plugin Download: Custom List Categories Plugin
Version: Version 2.0
Requirements: PHP 5 & Wordpress 2.7.x

• • •

Custom List Categories Plugin (Obsolete) »

Important: This plugin is no longer in development and has been replaced by the Visual Categories Plugin. The information below has been changed to reflect the Visual Categories Plugin information.

Description

Plugin Download: Visual Categories Plugin
Current: Version 1.0
Required: PHP >= 4.3.0 & WordPress 2.7.x

Take control over the way you display your categories: This plugin enables you to build “category entries” which contain a link to the category and which may contain a link to the category’s feed, a feed (RSS) image, the timestamp of when the category was last updated, and the current count of posts in the category.

Versions

Version 1.0: First public release.
Version 1.5: This release will be WordPress 2.8 compatible.

Vocabulary

There are a few terms used throughout this guide that require explanations: Continue reading »

• • •

Enhanced Javascript Comment Functionality Plugin »

Description:

Plugin Download: Enhanced Javascript Comment Functionality Plugin
Version: Version 1.0
Requirements: PHP 5 & Wordpress 2.7.x

Based on the comment_form_title function, this plugin allows you to add the name of the comment author to the Leave a Reply title. Replaces the comment_reply_link function.

Caution:

Use this plugin at your own risk. It’s not going to blow up your website but it requires more knowledge than I can include here. Before using, you should read and understand this and this.

Important:

If you use this plugin, do not add the following to your template (from these instructions):

if ( is_singular() ) wp_enqueue_script( 'comment-reply' )

The Enhanced Javascript Comment Functionality plugin takes care of it for you.

To make this plugin work:

You must add a comment_author id to some element, preferably in your comments.php theme file. For example, in my comments.php, I use:

<h3 id="comment_author"><?php comment_form_title('Reply to Post', 'Reply to %s', false); ?></h3>

You must be using the callback parameter in wp_list_comments, likely in your comments.php theme file. For example, in my comments.php, I use:

<?php wp_list_comments('avatar_size=50&callback=style_the_comment'); ?>

You must use this plugin’s ejcf_comment_reply_link function instead of the Wordpress comment_reply_link or get_comment_reply_link. For example, in my style_the_comment function (located in my theme’s functions.php), I use:

$comment_reply_link = ejcf_comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __('Reply to Comment'), 'noreplytext' => __('Reply to Post'), 'replytext' => __('Reply to %s'), 'echo' => 0)));

This is the full function:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function style_the_comment($comment, $args, $depth) {
	global $comment_count;
	$comment_count++;
 
	$GLOBALS['comment'] = $comment;
	$comment_reply_link = ejcf_comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __('Reply to Comment'), 'noreplytext' => __('Reply to Post'), 'replytext' => __('Reply to %s'), 'echo' => 0)));
 
	$output = '<li '.comment_class(empty($args['has_children']) ? '' : 'parent', $comment_id, $post_id, false).'><div id="comment-'.$comment->comment_ID.'">
	<div class="left">'.(($comment->comment_author_url) ? '<a href="'.$comment->comment_author_url.'" rel="external nofollow" class="url" target="_blank" onmouseover="change_databordercolor_on('.$comment->comment_ID.')" onmouseout="change_databordercolor_off('.$comment->comment_ID.')">' : '').get_avatar($comment, $args['avatar_size']).(($comment->comment_author_url) ? '</a>' : '').'</div>
	<div class="right"><div class="response">
		<div class="data" id="data-'.$comment->comment_ID.'">
			<div class="author vcard">'.get_comment_author_link().' [<a href="'.get_edit_comment_link().'">Edit This</a>]</div>
			<div class="date"><a href="'.htmlspecialchars(get_comment_link($comment->comment_ID)).'">'.get_comment_date('n/d/y').' <strong>| #'.$comment_count.'</strong></a></div>
			<div style="clear: both;"></div>
		</div>
		'.(($comment->comment_approved == '0') ? '<p><em>Your comment is awaiting moderation.</em></p>' : '').'<p>'.get_comment_text().'</p>
		'.(($comment_reply_link) ? '<p class="replyto">'.$comment_reply_link.'</p>' : '').'
	</div></div>
	<div style="clear: both;"></div></div>
';
 
	echo $output;
}

Details, details:

The ejcf_comment_reply_link function replaces the comment_reply_link and get_comment_reply_link functions. As of the writing of this, the comment_reply_link codex page contains no details. So let me break it down for you:

  • The reply_text parameter is what appears in every comment.
  • The noreplytext parameter is what will appear as the title of the comment form if your commenter cancels his or her reply to the comment. For continuity, it should be the same as what you use in comment_form_title.
  • The replytext parameter is what will appear as the title of the comment form if your commenter is replying to a comment. %s equals the name of the author of the comment.
  • When set to one, the echo parameter echos the resultant string of the ejcf_comment_reply_link function. When set to zero, the resultant string is returned.

In my style_the_comment function, the resultant string is:

<a rel='nofollow' href='/2008/04-30/technology/wordpress-stuff/wordpress-list-categories-wp_list_categories-hack/?replytocom=125#respond' onclick='return addComment.moveForm("comment-<em>comment ID</em>", "<em>comment ID</em>", "<em>reply to comment div ID</em>", "<em>post ID</em>", "<em>Name of Comment Author</em>", "<em>noreplytext</em>", "<em>replytext</em>")'>Reply to Comment</a>
• • •

Wordpress List Categories Hack (Updated 4/5/09) »

Update 4/5/09: All that’s documented on this page can be done via my custom list categories plugin.

Update 1/30/09: If you don’t want to edit your Wordpress files, check out my custom list categories function.

If you’re a web designer/programmer like I pretend to be and you also use Wordpress, you eventually discover that, though it’s an awesome weblog platform, Wordpress suffers from inconsistently and poorly constructed functions that may hinder the implementation of your design goals.

Two such functions involve category construction. My categories are listed horizontally almost midway down the “top of the fold” section. In order to achieve my desired design, I had to hack two Wordpress files. Here’s what I did:

Open wp-includes/category-template.php

On line 277 find:

'echo' =&gt; 1, 'depth' =&gt; 0

Replace with:

'echo' =&gt; 1, 'depth' =&gt; 0, 'before' =&gt; '<li>', 'after' =&gt; '</li>',
'link_before' =&gt; '', 'link_after' =&gt; ''

These additions to the wp_list_categories function will increase your design flexibility so that, when your style variable is set to 0 or none, you can specify what comes before and after the anchor element and what comes before and after the text that is contained within the anchor element.

Next, we have put those variable somewhere. Open wp-includes/classes.php

On lines 625 and 626 find:

$link .= '&gt;';
$link .= $cat_name . '';

Replace with:

if ( 'list' == $args['style'] )
$link .= '&gt;' . $cat_name . '';
else
$link .= '&gt;' . $link_before . $cat_name . $link_after . '';

On line 678 find:

$output .= "$link";

Replace with:

$output .= $before . $link . $after;

So, to get this working, to one of your theme display files (such as header.php or sidebar.php) add

The code that is outputted is

<a href="/path_to/category">» Category «</a>

That’s it! Don’t be afraid to play around with it and add your own variables.

• • •