Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-07-15 01:42:57

cfenison
Member
Registered: 2004-06-25
Posts: 14
Website

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

#2 2004-07-16 06:11:48

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

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

#3 2004-07-16 15:48:36

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Random Article Plug-In?

This is already possible.

<code>&lt;txp:article_custom form=“random_form” limit=“4” sortby=“rand()” sortdir=“desc” /&gt;</code>

Offline

#4 2004-07-16 16:52:03

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: Random Article Plug-In?

thank you, Manfre!


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#5 2004-07-17 19:15:05

cfenison
Member
Registered: 2004-06-25
Posts: 14
Website

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

#6 2005-02-01 17:56:40

avocade
New Member
From: Sweden
Registered: 2004-12-23
Posts: 3
Website

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

#7 2005-03-03 06:49:49

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

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

#8 2005-03-03 13:23:52

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

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

#9 2005-03-03 15:19:14

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

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

Board footer

Powered by FluxBB