Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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><ul></code> element.</dd>
<dt><code>zebra</code></dt>
<dd>Specifies a class for every odd <code><li></code> example <code>zebra=“odd”</code> will give us <code><li class=“odd”></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>
<ul class=“recent”>
<li><a href=“galleri/5/galleri”>Galleri</a></li>
<li class=“odd”><a href=“logg/4/ego-hej-jagr-ett-ego">Ego hej jag &#228;r ett ego</a></li>
<li><a href=“logg/3/konst”>konst</a></li>
<li class=“odd”><a href=“logg/2/hej”>Hej</a></li>
<li><a href=“logg/1/first-post”>First Post</a></li>
</ul>
</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
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
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
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
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
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
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
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
Offline
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