Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-08-17 18:11:13

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

glx_recent_articles

Hey

This plugin gives you the recent articles and opens up to style it a little bit more than the orginal.

Version: 0.4 RC3 only
Download

Version: 0.2 Older
Download

Cut from the help

Attributes
All attributes are optional

<dl> <dt><code>limit</code></dt> <dd>Number of items to display.</dd> <dt><code>sortby</code></dt> <dd>What to sort after. Default: <code>Posted</code></dd> <dt><code>sortdir</code></dt> <dd>Sortdirection <code>asc</code> or <code>desc</code> Default: <code>desc</code></dd> <dt><code>class</code></dt> <dd>This one will put a class to the wrapping <code>&lt;ul&gt;</code> element.</dd> <dt><code>zebra</code></dt> <dd>Specifies a class for every odd <code>&lt;li&gt;</code> example <code>zebra=“odd”</code> will give us <code>&lt;li class=“odd”&gt;</code>.</dd> <dt><code>category</code></dt> <dd>List only from this category.</dd> <dt><code>section</code></dt> <dd>List only from this section.</dd>
</dl>

Example tags

*<code><txp:glx_recent_articles /></code>
*<code><txp:glx_recent_articles limit=“5” sortby=“Posted” sortdir=“desc” class=“recent” zebra=“odd” category=“mycategory” section=“mysection” /></code>

Example output

<code>
&lt;ul class=“recent”&gt;
&lt;li&gt;&lt;a href=“galleri/5/galleri”&gt;Galleri&lt;/a&gt;&lt;/li&gt;
&lt;li class=“odd”&gt;&lt;a href=“logg/4/ego-hej-jagr-ett-ego&quot;&gt;Ego hej jag &amp;#228;r ett ego&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=“logg/3/konst”&gt;konst&lt;/a&gt;&lt;/li&gt;
&lt;li class=“odd”&gt;&lt;a href=“logg/2/hej”&gt;Hej&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=“logg/1/first-post”&gt;First Post&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code>

After ive finished this plugin i found Drews recent articles plugin But i decided to post mine aswell.

Last edited by osei (2005-05-07 13:12:44)


Johan Nilsson

Offline

#2 2004-08-17 18:15:59

Damelon
Member
From: Lyon, France
Registered: 2004-05-11
Posts: 47
Website

Re: glx_recent_articles

<del>Can you simply choose to only draw results from Category 1 or Category 2 instead of naming a specific category?</del>

Er, sorry, I was thinking about related articles.

Last edited by Damelon (2004-08-17 18:18:31)

Offline

#3 2004-08-17 18:18:39

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: glx_recent_articles

Right now it choose from either Category1 or 2. just like the orgiinal recent_article works.


Johan Nilsson

Offline

#4 2004-10-31 04:18:32

proph3t
Member
Registered: 2004-09-26
Posts: 31

Re: glx_recent_articles

Any way to make it choose from categories, I need a recent article plugin that can choose from mulitple categories..

Offline

#5 2004-11-01 00:01:31

proph3t
Member
Registered: 2004-09-26
Posts: 31

Re: glx_recent_articles

No one?

Offline

#6 2004-11-01 07:41:54

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: glx_recent_articles

When i just loooked at the code for this plugin i saw it was a little messed up, i wrote it before i understand how txp really worked, but i can have a look at it and see if i can work something out in 1 or 2 days.


Johan Nilsson

Offline

#7 2004-11-01 17:10:05

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

Re: glx_recent_articles

hi osei.. if you’ll be working on it anyway (no rush!) and it’s not too difficult to do, perhaps you could add an “if NOT category” clause to it… i would love to be able to output a list that prints all the categories except for two or three….

thanks much, either way :)

~a fan of your plugins


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

Offline

#8 2004-11-01 18:51:26

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: glx_recent_articles

hmm maybe the ideal will be <code>category=“category1, category2, !category3”</code>

where ! stands for not

I dont know yet if its possible but maybe :)


Johan Nilsson

Offline

#9 2004-11-02 00:27:28

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

Re: glx_recent_articles

> osei wrote:
> hmm maybe the ideal will be <code>category=“category1, category2, !category3”</code>
where ! stands for not
I dont know yet if its possible but maybe :)

that sounds perfect ;) however/whenever you end up doing it, ‘twill be much appreciated


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

Offline

#10 2004-11-02 02:09:14

proph3t
Member
Registered: 2004-09-26
Posts: 31

Re: glx_recent_articles

Yes, very much appreciated. I would lend a hand, but alas I am relatively new to php and textpattern code in general.

Thanks!

Offline

#11 2005-03-10 10:35:55

NeilA
Member
From: Blue Mountains, Australia
Registered: 2004-08-15
Posts: 316
Website

Re: glx_recent_articles

Johan,

Many thanks for this pluigin…

Butg I have run into problems when using it with RC3…
Pre RC3, I was using messy urls (no choice!), and your plugin worked just fine.
With RC3, clean urls work ‘out of the box’, but the way the plugin renders the urls of the recent articles, doesn’t work with the clean urls enabled…

Not sure if it’s the plugin that needs updating, or whether there’s another issue related to RC3…

Any thoughts…?

thanks


Neil – Blue Mountains, Australia

http://westserve.org
http://ministrygrounds.net.au

Offline

#12 2005-03-10 10:52:30

osei
Plugin Author
From: Stockholm, Sweden
Registered: 2004-07-01
Posts: 178
Website

Re: glx_recent_articles

This plugins clean urls is built like this /section/id/title this plugin needs to be updated if it should follow the setting that was made in the preferences for the site.

How are the links outputed for you? and how do you want them to look look like?


Johan Nilsson

Offline

Board footer

Powered by FluxBB