Results matching “random entries”

RandomEntries 1.0

I’ve managed to resurrect and rewrite my old old RandomEntries plugin. Turns out it was really really inefficient on blogs with a sufficient number of entries. Currently it will only work on index templates (or, more specifically, in contexts without a stashed entries list) because it works at the SQL level, but I plan to address that in the future.

So, an example of usage, to select 5 random entries:

<mt:entries limit="5" random="1">
* <mt:entrytitle>
</mt:entries>

Note the use of limit instead of lastn. This plugin will not work with lastn as lastn implies a specific sorting to the entries that overrides the random sorting.

The RandomEntries plugin requires Movable Type 4.25 and works with the mt:entries tag so generally it should work with most mt:entries arguments (except lastn and sort_by). You can download it from the github repository for the plugin.

MTRandomEntries

MTRandomEntries is a plugin that, like MTRandomComment , pulls out a random entry from the current blog.

Usage Example:

<MTRandomEntries category="Gaming" lastn="5">
<a href="<$MTEntryLink$>"><$MTEntryTitle$></a>:<br />
<$MTEntryExcerpt$><br />
</MTRandomEntries>

Download randomentries.tar.gz or randomentries.zip , unpack it, and place randomentries.pl in your plugins directory.

MTRandomEntries

  • Container tag for the random entries that acts like MTEntries
  • If used within MTCategories , the random entries are chosen from current category.
  • If used within MTEntries , MTEntry , an Individual Archive, etc. or anything that contains an entry, the random entries are chosen from the categories of the current entry, OR-ed together.
  • It takes the following arguments:
    • category: Restrict the list of entries from which the random entries are chosen to those in specific categories. You can either supply a specific category, or use AND or OR like in MTEntries
    • lastn: Generate n random entries, defaults to 1

ChangeLog

  • Version 0.5: Added support for current entry categories
  • Version 0.45: Added support for AND and OR in category argument
  • Version 0.3: Added support for MTCategories
  • Version 0.2: Fixed lastn > number of entries bug
  • Version 0.17: Fixed MT Date tag bug
  • Version 0.15: Fixed bleeding
  • Version 0.1: First version

Well, seeing as how it's the beginning of a new month, and that I've been with my current host for about a month, I thought I'd see what I can glean from my web stats for October.

The following is what I've found (and remember, this is solely for rayners.org and not my old site at arrakis.homeip.net):

Well, it is done! I've tested it and it seems to be working without problem.

And here's how I did it:

1

Recent Comments

  • if you must run from two evils, death and women, run from the latter, they keep men in the grave....

  • if you must run from two evils, death and women, run from the latter, they keep men in the grave....

Close