scriptygoddess

15 Oct, 2002

favorite post voting

Posted by: Jennifer In: Scripts

New script for you! The idea here is that you allow your users to vote for their favorite post in your blog. The top three (or two, or one – you set this) voted for posts show up in your sidebar(?) (or wherever you chose).

The instructions are MT specific, but with some minor tweaking, I'm sure it could work with other CMSs as well.

Installation is pretty simple – follow the instructions in the readme.

Requirements: Must be able to run PHP on your page/site.

Click here to download the script

Special Thanks to my beta testers: Carla, Donna, Dave.

Update 10/16 10:00pm EST: (What's a release without a bug-fix, ay?) Just uploaded a new version of the script…If you've already downloaded the script previous to this fix – just replace "writeFavPosts.php" with the new version in the download.

Update 10/22: Bugfix:
if you already have this installed – on your "forms" change this line:
<input type="hidden" value="<$MTEntryTitle$>" name="favtitle">
to:
<input type="hidden" value="<$MTEntryTitle encode_php="qq"$>" name="favtitle">

7 Responses to "favorite post voting"

1 | Michael Croft

October 23rd, 2002 at 3:09 pm

Avatar

Hey, this is a good idea.

I don't run PHP on my server, but I wonder if I could figure out how to create a plugin, borrowing the logic from your code.

Hmm. Gotta sit down and see if I can design the interface I want…

2 | Kristina

June 14th, 2003 at 8:10 pm

Avatar

Hi Jennifer, thanks for the great hack! I came here via Quixotic Pixels' photoblog tutorial, and I'm trying to install the favorite posts script here, and everything works beautifully, except I can't get the listings of votes via the php code listed in my template. I'm running MT and the pages are static .html, do i need to write anything around the php code? Do i need to make all of my pages php, and if so, how do i do that? I'm thinking there's just something missing since my pages are static, and the template module i'm using is static as well. Thanks for any help you can give me.
Double checking info:
I did not modify the code at all, the problem is on the main page via my url, and my php code is

<?
$displayfavfile = "/HOME/SERVER/PATH/TO/displayfavfile.php";
if (file_exists($displayfavfile )) {
include $displayfavfile;
}
?>

3 | Kristina

June 14th, 2003 at 8:39 pm

Avatar

Nevermind, I found a php tutorial on virtualvenus and it works beautifully. Now the only question I have is if you can reset the votes to zero, because while testing It accidentally made 11 votes for an unknown entry (it is blank) and I want to delete that if possible. I'm guessing I should just take out the php code from the template and re-enter it?

4 | Jennifer

June 14th, 2003 at 8:46 pm

Avatar

usually – servers aren't set up to process .html pages like php. If you haven't done anything to make it do that – then that may be part of the problem. Try changing all your pages to .php. (Go to blog config and change the extension there – and then make sure your index pages (in templates) are named with a .php extension. This will kill your previous links – so if you'd rather not do that – and just do the hack to make html pages process like php – see this post.

5 | LibraryPlanet.com

October 19th, 2002 at 4:58 pm

Avatar

Voting on Your Favorite Post
In an error to become offer every one a chance to be more interactivate, I have implemented the favorite post

6 | KO

June 25th, 2003 at 3:43 pm

Avatar

Creating a Photoblog in Moveabletype
Earlier I had written about free picture gallery scripts. In the end I ended up making the 4×4 Offroaders Club Karachi Picture Gallery in Moveabletype. I used Quixotic Pixels excellent Tutorial for Creating a Photoblog. I modified it further, and…

7 | LibraryPlanet.com

November 11th, 2003 at 3:31 pm

Avatar

Voting on Your Favorite Post
In an error to become offer every one a chance to be more interactivate, I have implemented the favorite post…

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements