the entry post type
more »

New Plugin

I am not actually sure what I want to call this yet, it is equal parts Noteworthy Plugin and Post/Article Karma System.

First some background.  The always industrious Michael Heilemann requested help to write a custom plugin.  I thought nothing of it, since I wasn’t really able to follow what Michael hoped to accomplish by this.

Read the rest »

November 30, 2004 40 Comments
the entry post type

New Experiment

I have begun work on a Flash front end for a WordPress powered site.

This is going to be a pretty long and involved process, since I am having to marry Flash with php and a MySQL DB, but I have already made pretty good headway in my first day.  Once completed to my satisfaction I will be releasing it as a “Theme” in much the same way that Michael has released Kubrick.

If you would like to follow along with the progress, the test page is here.

November 11, 2004 4 Comments
the entry post type

Back from the brink

UPDATE #2: I have released a minor update that adresses the missing “” in the comments link.  So those of you out there that care about validation can breathe easy again.  Get it at the usual place.

UPDATE: I had left out one crucial piece of information from the setup directions, so the zip file has been updated.  The only change is that I have now stated as a last step that you must open your index.php and find this line:
<?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
and replace it with
<?php cjd_comment(); ?>
once that is done everything should be peachy.

That’s right I am back with a new plugin.  And the plugin is now ready to go.

Per Post Comment Text.  You can see it in action on this site right now. You will notice that some of the links to view comments look normal, Comments (0), while others are a little different.  This plugin allows you to set the text of you comments links on a post per post basis.  Pretty snazzy.

Right now it handles everything you can throw at it, except post that have comments closed.  At this time the plugin still just displays whatever you have set as your text.  Right now the plugin has a default value, in this case Comments, so that if you don’t want to add a custom link to an article you still have a default to fall back on.

October 29, 2004 32 Comments
the entry post type

Some Experimentation…

I just thought I would take a moment to direct your attention to the donate link that now resides in my navigation menu at the top.

I have been watching as some others in the WP community have tried the donation tack, and I have decided that it is not Very Evil (tm) to provide a way for someone to show thier appreciation for your hard work in this way.  Now I go into this in depth on the donation page, but let me state here again, that I will always provide help and code when I can, it just looks like that “when I can” is getting less and less frequent.  I would also like to write a monthly series on WP, and I really can’t do that unless the donations come in.

So it is up to you, my friends as to whether or not my code and help is worth a buck or two.

September 18, 2004 0 Comments
the entry post type

Talk like a Pirate day

This Sunday is International Talk like a Pirate Day, and in honor of this glorious holiday, this post, plus all the comments that are added to it will be automagically converted to Pirate via Dougal’s snazzy Text Filter Suite.

Post from me will probably be infrequent for the next week or so as I bear down on various projects that are approaching deadline, hope you all are doing well.  Oh and look for version .7 RC 1 of Mass Delete in the next day or so.

September 17, 2004 4 Comments
the entry post type

Well anyway here is the hack…

This is a hack for WP 1.3+ only

There is now a version for 1.2+

Go here and get it.

Now that I have found the bug and squashed it, here is a little ditty that will make it easier to delete large amounts of spam in one fail swoop.  Mass Comment Delete.

While it is true that there is mass deleting already built into WP 1.3, I didn’t care for it that much, and the amount of time it takes to use it when you get hit by 260+ spams at once.  The most efficient way to deal with that much spam is to issue SQL commands against your database, unfortunately for a lot of our users this is a bit much to ask, so enter my newest hack.  Here is a screenshot:

image of mass_delete

Mass Spam Delete is a system that allows you to delete all comments in the database by IP, Name, URI or email.  I have tried to make it as easy as possible to use, providing a condensed listing of comments awaiting moderation on the page for you.  I say condensed, because I am grouping the comments by IP, so you will only see one entry for every IP, regardless of the number of comments associated with that IP.  That is all there is too it really, pretty straightforward.

You will find two files within the download, mass_delete.php which is where all the magic happens and mass_delete_ph.php, this is a “plugin” file; all this really does is give you a link to the main file from a central location.  If you can remember the name of the file and don’t mind typing it everytime, you don’t need the plugin file.  To install this hack, simply drop mass_delete.php in your wp-admin folder and mass_delete_ph.php in your plugins folder.  That’s it.

Well that is about it for now, I am off to bed and then off to restore what I can of my comments.  Oh well, maybe I will just start over with my comments instead of restoring from my stale backup.

September 3, 2004 5 Comments
the entry post type

Note to self…

Note to self, when writing a hack that deletes comments, do not use your live server to test against, because you might wipe out all your comments.

Also don’t hack on comment deletion when you have been deprived of sleep.  I will be restoring some of my comments from a backup, but I imagine that I have lot 150 - 200 comments in this fiasco.  Bah.

September 3, 2004 4 Comments
the entry post type

New plugin/hack for WordPress

I have completed around 95% of the work for my latest plugin/hack combo.

This time out I am giving you good people the ability to set the text of your comments link on a per post basis.  So if you wrote a post about dreams, the link to leave comments could be like this:
So what are you dreaming? (0)
instead of the normal:
Comments (0)

I have a little more to do on this one and it will be released into the wild.  I am shooting for this evening, but it could be tomorrow.

August 16, 2004 3 Comments
the entry post type

Faking it: WordPress as CMS pt. 2

Now we comes the part where we throw in some cache-action.  Brought to you by the Dynamic Duo Mattman and Zeller the Boy Wonder.  Now Staticize Reloaded is not the best thing since sliced bread, but it is pretty great regardless.

Now I am not going to get into the “how” the plugin works, I mean who wants that!  We are Americans, we just want it to work now!  So anywhoo, follow these easy steps to set up a little cache action:

  • I assume you have followed the above link and downloaded the plugin from Matt’s site?  Well if not then go and download away, I will wait.  Done?  Good.
  • Now, you want to drop that badboy into your /plugins/ directory located within the /wp-content/ directory.
  • While you are in the /wp-content/ dir, go ahead and create another dir called cache within /wp-content/ and make sure to chmod, or set permissions to 777.
  • Now login to your admin area and go to plugins, you will now see Staticize Reloaded listed, go ahead and activate it.
That is it, the plugin performs all its tasks behind the scenes.  One caveat, you must deselect gzip compression from the “reading” screen of your options, this is being worked on and should no longer be a factor in the near future.  If you leave it selected it will bork the whole process.

Okay so now we have our pseudo-static sections caching (as well as our non-pseudo-static sections), so what is the next weapon to add to our arsenal?  Read on and find out.

The next part of this tutorial requires you to be able to make changes to your apache setup, either through editing of httpd.conf or through .htaccess.  Sooo… if you can’t do one of these two things, please skip on to page 3.  Those of you still with me, lets get to the hackin!  What we are trying to accomplish here is to add some flare to our newly created and cached sections.  Most sites that have aboutme and colophon sections use a site uri something like this: mysite/colophon/, now our solution poses a problem since they are not files in sub-domains, they are php files residing in our $siteroot, or wp directory.  There are two ways to approach this:

  1. Create folders for each section, and move the files we created earlier into them, making sure to either a.) make symlinks from $siteroot to the corresponding files in thier sub-directories, or b.) edit each of our pages to point to one directory up, e.g. ../wp-blog-header.php instead of wp-blog-header.php.
  2. Or we could perfom some apache magic and eliminate the need for file extensions.  What this gives you is the ability to input say mysite.com/index and have it resolve to index.php.  This also means that if you type in mysite.com/colophon/ it will resolve, no questions asked to mysite.com/colophon.php without updating the URI field.  I think you can see where I am going with this, and the possibilities that this presents.
Also, you can congratulate yourself for being forward thinking.  Eventually everyone will wake up and realize that running your server this way is better for the user.  With this method I could easily move from using php to power my site to cgi or asp (not that I would want to) and my users would never know, and more importantly thier bookmarks and permalinks would not break since they were pointing to chrisjdavis.org/index.

So, what we need to do is fire up the old terminal and edit either httpd.conf or .htaccess.  I will let you find out where these files are located since each distro handles placement differently.  For this haxie we simply need to add this snippet of code:<Directory /home/www/sitename/htdocs>Options + MultiViews
</Directory>
to your httpd.conf file or your .htaccess and then once saved, restart apache.  I prefer the lovely:apachectl gracefulcommand to restart apache, since it politely kills the child processes instead of just hacking them off wholesale. ; Now there could be a performance impact by doing the above, but unless you are running with a couple million hits a day, it is minimal.

Okay now we have our site running without file extensions, and caching.  So what is left?  Good question, to close I wanted to suggest some cosmetic changes.  On our pages like aboutme and colophon, we really don’t want to have people leave comments, and we don’t really need to display the time, day, category and author for each of these “entries” so we should get rid of those function calls.  Keep in mind that what we might want is a last updated on bit of code, that would find the date and time for the newest entry on that cat and echo it out.

That can be accomplished by using a bit of custom code, or by exploiting some of the functions already built into WordPress.  That my friends is your homework.  Well that is it for now, let me know if there is anything else you would like to hear on this topic, or if anything I have stated is not as clear as it could be.

Cheers.

July 24, 2004 2 Comments
the entry post type
more »

Faking it: WordPress as CMS pt. 1

Part two is now up, you can find it over here.  This series is by no means exhaustive, but it is a good place to begin to understand customizing WordPress.  NOTE: This tutorial only covers WordPress 1.2, if you are running WordPress 2.0 this is all useless.

In this tutorial we will cover the steps necessary to use WordPress as a CMS.  This tutorial will cover the basic concepts and steps to get something up and running as quickly as possible, part 2 will cover more advanced tricks to get the most out of your WPCMS.

The first step is to identify exactly what you want to get out of a CMS, just because you can make WordPress function as a CMS doesn’t mean you should.  Be sure before you begin that you are not creating more work for yourself than neccessary.

Okay so I assume since you are still with me that you have decided that a WPCMS is for you.  Now, we need to identify how your new shiny sight will be organized.  For the purposes of this tutorial lets assume that you will have the following site structure:

  1. index/home page
  2. colophon/information page
  3. about me/about us page
  4. movie/music reviews
We all set?  Good lets get going.

Read the rest »

July 15, 2004 47 Comments
the entry post type

Another little teaser…

spell check sneal peak

Soon, very soon.

June 18, 2004 3 Comments
 1 2 3 4 Next →