Taking tutorial submissions! Please email them to Tabpole[AT]Gmail[DOT]com for review. Thanks!

Latest Tutorials
Crawl Your Site for PageRanks [PHP] So you know your site has a PageRank of 8. What about the PRs of all the inner pages? This tutorial will teach how you to automate the process of grabbing all these PRs.

Create CAPTCHA images [PHP] Worried about bots? Then create CAPTCHA images to prevent bots from taking advantage of your site.

Convert SHN and FLAC files to MP3 [Misc] Low on disk space and have an insensitive ear? Here are some steps to converting SHN and FLAC files to MP3 format.

Create Your Own BBCode [PHP] Learn how to parse bulletin board code to translate it into HTML. [b]Come, come.[/b]

Output While Script is Still Running [PHP] Learn how to use PHP output buffering functions and have them actually work! Don't make your visitors wait for a long script to process.

[View All]

Our Sponsors
 » Weblog Community
 » Listen to Podcasts
 » Rock Music Community - meet fans

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email Tabpole[AT]Gmail[DOT]com.

Awesome Tutorials

iRate!: Generate Top-Lists
By dave

So, what is a "top list?" This is just a list displaying your top-ranked (or low-ranked) items. You can create lists by category and specify how many to rank and in what order.

Okay, let's begin. First, log in, and scroll down to the third bullet under Tips. Grab the code in the textbox there, and modify that according to this tutorial.

Example Javascript snippet: do NOT grab this as your code—it will not work!
<SCRIPT SRC='http://www.icemelon.com/irate/toplist.php?x=8&
enc=7c3594f6ac211ce905462eea58ed55af&cat=<CATEGORY>&displayNum=<NUMBER>&
minVotes=<NUMBER>&lowest' TYPE='text/javascript'></SCRIPT>

The parameters of the source URL can be broken down as follows:
  • x = 8: don't change this number
  • enc = 7c3594f6ac211ce905462eea58ed55af: don't change this string either; these first two parameters are unique to your account
  • cat=<CATEGORY>: this is the category of the items you would like to rank; note that a category name cannot contain single-quotes ('), question-marks (?), or ampersands (&); this is an optional category
  • displayNum=<NUMBER>: this specifies the number of items to display in your top list; this is an optional category—if not included, the number of item is defaulted to 10
  • minVotes=<NUMBER>: this specifies the number of votes needed before an item will be included in this list; this is an optional category—if not included, this value is defaulted to 5
  • lowest: this will generate a list for the lowest ranked items; leave this parameter out if to display the highest ranked items (which is most likely what you want)

    A couple of source URL examples
    Hmm. So let's say you have a movie blog. Each entry describes a movie, and your visitors can rate each movie (sorta like IMdB).

    You want a list of the top 50 movies, ranked by visitor ratings. To make this list, a movie must've amassed at least 100 votes. Also, you have categorized these items as "movie." Here's the URL you would use:
    http://www.icemelon.com/irate/toplist.php?x=8&enc=7c3594f6ac211c
    e905462eea58ed55af&cat=movie&displayNum=50&minVotes=100

    You also want a list of the 20 movies with the worst ratings. To make the list, 5 votes (remember, this is the default value) is all you need. Here's the URL:
    http://www.icemelon.com/irate/toplist.php?x=8&enc=7c3594f6ac211c
    e905462eea58ed55af&cat=movie&displayNum=20&bottom

    That should get you going. If you have any problems, suggestions, or just general feedback, please email me. (The email's on the bottom of the page.)
  • Icemelon -- iRate!: Generate Top-Lists -- PHP, CSS, Javascript Tutorials, & More!
      © 2005 Icemelon.com   Email: NuTang[AT]Gmail[DOT]com