Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Random Article Plug-In?
I’m wondering if anyone has created a plug-in which would randomly display an article? On my site, I have a “Recommending” section which is an article form. I put these into categories like “Movie Review” and “TV Show” but would like to be able to display them randomly. Right now, I have a limit set to two, and it displayed descending by date posted. Instead, it would be neat to be able to display one of these “articles” at random. So, I could have one tv show, one movie, one cd all selected at random.
Anyone know how to do this?
Anyone ever wish for this kind of functionality?
Or, am I off my nut?
Thanks!
-Chris
chrisfenison.com
Offline
Re: Random Article Plug-In?
i am also very much looking for this plugin.
i’d like to be able to call the entire contents of an article chosen at random.. that would include the author, date, entry, title, comments-link, etc.
i expect that others would simply like to be able to call the titles or titles and excerpts..
in any case, if someone who knows how could take a stab at this one, ‘would be much appreciated!
edit: typo
Last edited by alicson (2004-07-16 06:12:20)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: Random Article Plug-In?
This is already possible.
<code><txp:article_custom form=“random_form” limit=“4” sortby=“rand()” sortdir=“desc” /></code>
Offline
Re: Random Article Plug-In?
thank you, Manfre!
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: Random Article Plug-In?
I don’t suppose there’s a way to limit this by date is there? So it would call a random article as long is it was posted in the last X days or something.
-Chris
chrisfenison.com
Offline
Re: Random Article Plug-In?
Great. Is there a way to go directly to the article that was chosen instead of getting a list? And also to just press a button to go to that article. This is a good step on the way there.
Limit by date and author would be just grand, too.
Offline
Re: Random Article Plug-In?
i’m with avocade on this… i’d still really like to see an actual Random Articles plugin…
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: Random Article Plug-In?
You can do this with the newest version (0.11) of the rss_suparchive.
<code>
<txp:rss_suparchive section=“article” form=“yourform” sortby=“RANDOM” limit=“1” />
</code>
Then you have the ability to display the article however you want on your article form.
Last edited by wilshire (2005-03-03 14:01:19)
Offline
Re: Random Article Plug-In?
Wilshire, you are very very cool.
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Pages: 1