Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-10 07:49:27

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Ideas for best archives rule

I would like to build an archives page with a list of months into a sidebar. When the visitor click on a month link, I would like to display all articles related about the choosen month. But… I have no idea how to make that working :)

Could you give me some advices?

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2008-07-10 08:41:50

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,727
Website

Re: Ideas for best archives rule

txp:article and txp:article_custom have a month attribute :-)


TXP Builders – finely-crafted code, design and txp

Offline

#3 2008-07-10 09:19:29

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Ideas for best archives rule

And with little php or a plugin you can automatically toggle (er – change) that month value or as txp:article is content sensitive, it is automatically togglable via url.

Plus, ofcourse there is the great upm_date_archive

Offline

#4 2008-07-10 10:01:44

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Ideas for best archives rule

Tks jakob and Jukka!

As Jukka said, I’ve got this rule with some php and a get method.
I’m going to look at Mary’s plugin that I never saw before.

Have a nice day!

Best regards,

Last edited by Pat64 (2008-07-10 10:02:07)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#5 2008-07-10 15:38:58

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Ideas for best archives rule

Or you could check out Simple Archives and Simple Archives part 2 which should show you how to do what you want without a plug-in.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2008-07-10 16:24:34

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Ideas for best archives rule

Stuart I know this method ;) But what I need is different. I wolud like to have a filter on current year list of months!!!

So I think my friend is MySql… but I don’t know how to format the ‘Posted’ field into my query to obtain a format like date(‘Y’) in PHP.

Arg!!! I’m a very stupid TXP user :)

Could you tell me how to obtain this format into a MySql query?

Tks lot. Help very appreciated.

Best regards <txp:guys />,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#7 2008-07-10 16:38:46

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Ideas for best archives rule

Pat64 – you can just grab the Unix timestamp from MySQL and pipe it into strftime for formatting (select unix_timestamp(Posted) from textpattern). However, you can also format the date with MySQL too.

Offline

#8 2008-07-10 17:16:26

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Ideas for best archives rule

Wahoo! date_format() make the rule!

Thanks lot Jon-Michael : you are a very <txp:clever_user />

Cheers,

Edit: very beautiful website redesign for jmdeldin.com (with a PR 5!). How many dogs have you got? ;)

Last edited by Pat64 (2008-07-10 17:27:53)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#9 2008-07-10 18:42:07

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Ideas for best archives rule

Glad it worked for you :).

Edit: very beautiful website redesign for jmdeldin.com (with a PR 5!). How many dogs have you got? ;)

Thanks – I’ve got 5 dogs, but my family has a fair amount (rescued strays).

Offline

#10 2008-07-10 19:02:07

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: Ideas for best archives rule

:)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB