Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-04-06 13:13:56

Drew
Plugin Author
From: Red pillar box, Baker St.
Registered: 2004-02-15
Posts: 53
Website

Modified Recent Articles

I’ve hacked a version of recent_articles to include two new features:

  • The ability to filter the list on section: section="articles"
  • The abiilty to change the start-point of the list: limit="1,10"

This second point is handy if you don’t want your recent articles list to include the most recent article. The old syntax still works fine – limit="10".

Other than that, all the attributes are the same as recent_articles. This really is just a hacked version of the same.

<txp:dru_recent_articles section="articles" limit="1,10" break="li" wraptag="ul" />

Download dru_recent_articles.txt.tgz


drew mclellan

Offline

#2 2004-05-08 06:19:34

jason
Member
From: USA
Registered: 2004-02-23
Posts: 85
Website

Re: Modified Recent Articles

nice, I was just wanting this.

Offline

#3 2004-05-08 11:55:12

Jennifer
Member
From: Michigan
Registered: 2004-02-25
Posts: 74
Website

Re: Modified Recent Articles

I wanted this too. VERY nice. :)

Offline

#4 2004-05-08 15:18:49

dhdesign
New Member
Registered: 2004-05-02
Posts: 3

Re: Modified Recent Articles

> Drew wrote:

> Download dru_recent_articles.txt.tgz

Can you put this in a .zip file? I can’t open the .tgz file. :(

Offline

#5 2004-05-08 16:22:58

ThrokFeroth
Member
From: Malaysia
Registered: 2004-02-28
Posts: 12
Website

Re: Modified Recent Articles

tgz files can be opened with winRAR…

thanks, drew, for the plugin.

Offline

#6 2004-05-08 16:34:08

dhdesign
New Member
Registered: 2004-05-02
Posts: 3

Re: Modified Recent Articles

> ThrokFeroth wrote:

> tgz files can be opened with winRAR…

I don’t have winRAR…I have winZIP. Would be nice to be able to use what I’ve already got to open the file. :)

Offline

#7 2004-05-08 16:39:07

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

Re: Modified Recent Articles

PowerArchiver is a nice windows tool for tar.gz documents.

The usage of tgz files is due to it’s frecuently to have only support for this type of compression on web servers using PHP, and most of the plugins are directly compressed using PHP also.

Offline

#8 2004-05-08 17:41:19

Zarabadoo
Member
From: Denver, CO
Registered: 2004-03-14
Posts: 28
Website

Re: Modified Recent Articles

7zip is also a very good archiver, and completely free.

Last edited by Zarabadoo (2004-05-08 17:41:33)


—Al “Zarabadoo” Steffen
http://www.zarabadoo.com

Offline

#9 2004-05-09 04:04:09

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Modified Recent Articles

Winzip can open tgz files. Try renaming it to .tar.gz.


Alex

Offline

#10 2004-05-17 02:29:41

fri
Member
From: Denmark
Registered: 2004-04-30
Posts: 34
Website

Re: Modified Recent Articles

Thrilled reading this.

I know the plugin exists, (with or without tgz) so this post probably has no interest for you now -

- but IF someone should be interested in how I solved the problem without the plugin, here it is:

I created an article form called “titles”, displaying only permalinked <code><txp:titles /></code> (no bodies):

<code><txp:permlink><txp:title /></txp:permlink><br></code>

I then used the form in the sections page-template with <txp:article_custom /> with the section attribute:

<code><txp:article_custom form=“titles” limit=“5” section=“web” sortby=“Posted” sortdir=“desc” /></code>

I’ve used this form in several <code><txp:article_custom /></code> tags with different attributes i.e. category, for different menu listing.

(It would be very nice to be just a tiny bit usefull, I’m usually just asking questions..)

Last edited by fri (2004-05-17 02:39:01)

Offline

#11 2004-05-22 20:16:41

fri
Member
From: Denmark
Registered: 2004-04-30
Posts: 34
Website

Re: Modified Recent Articles

Thank you southronlady.

That’s exactly how I’ll use it: same txp-tag on all the sectionpages.
“Labeled” with <code><?php echo ($GLOBALS[‘s’]); ?><br>
</code>, you can reuse the headline for the menu as well.
Someone wrote that codebit, which you probably already know with your understanding of PHP.

Offline

Board footer

Powered by FluxBB