Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Archives

#25 2005-09-16 02:40:48

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: Archives

I think the problem with built-in monthly archives at the moment would be that they pretty much shackle you to the /year/month/day/title URL scheme, which is fine for blogging but abominable for most other purposes. Of course, per-section URL schemes (where selecting /year/month/day/title scheme for a section would automagically enable the date-based archives people are apparently clamoring for) would certainly go a long way toward resolving this… where’s my poking stick?

Last edited by ubernostrum (2005-09-16 02:41:52)


You cooin’ with my bird?

Offline

#26 2005-09-16 02:53:24

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

Re: Archives

Oh no! Not the dreaded poking stick. :)


Stuart

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

Offline

#27 2005-09-16 03:22:18

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Archives

I guess I just don’t understand, but “txp:category_list” does with categories exactly what I need to have done with months. So how does one require a certain URL scheme and not the other?

I know rss_suparchive_menu requires a URL scheme, but if the feature were built-in surely it would require no such thing?


Yes, I have tried turning it off and on.

Offline

#28 2005-09-16 04:22:31

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: Archives

alesh: it’s kind of hard to do date-based archives if you’re not using date-based URLs in them. And since TXP currently limits you to only one URL scheme site-wide, well, you’re kind of stuck.


You cooin’ with my bird?

Offline

#29 2005-09-16 11:07:16

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: Archives

> ubernostrum wrote:

> And since TXP currently limits you to only one URL scheme site-wide, well, you’re kind of stuck.

Yes, but isn’t there a plugin to support all of the URL schemes at once, or something like that? It seems to me that putting the two together would give the desired effect—then the only thing left to do would be to roll it into Textpattern itself, so that new users don’t have to go through this all over again when they decide they want archives by month.

-Kurt


kurt@kurtraschke.com

Offline

#30 2005-09-16 12:16:22

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Archives

> ubernostrum wrote:

> it’s kind of hard to do date-based archives if you’re not using date-based URLs in them

Why? If I can have a function called category_list that creates a list of items that each link to a “/index.php?c=category” then how hard would it be to make a function called month_list that links to a “/index.php?c=monthyear” and setup txp to interpert the latter pretty much the same as the former? It’s beyond my programing capacity, but it sure doesn’t sound like a particularly complicated database call.


Yes, I have tried turning it off and on.

Offline

#31 2005-09-16 14:02:28

ubernostrum
Member
From: Lawrence, KS
Registered: 2004-05-05
Posts: 238
Website

Re: Archives

alesh: read back through this thread again and look at what various people are asking for. You personally may only want something very simple, but others are asking for something which literally requires /year/month/day/ URLs.


You cooin’ with my bird?

Offline

#32 2005-09-30 21:04:21

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: Archives

I think that is part of the conceptual confusion: for a date-based archive list, it is pretty non-essential to worry about having a clean URL. You can, in fact, mix clean and “dirty” URLs when necessary.

I recently hacked the doArticles function to make it date aware by creating a “dateaware” attribute for article_custom (I submitted this to the TXP development team, btw). This allows you to pull up a yearly archive (http://www.yoursitename.com/section/?date=2005), a monthly archive (http://www.yoursitename.com/section/?date=2005-08) or by day (http://www.yoursitename.com/section/?date=2005-08-29).

I figure that dirty URLs for lists are pretty non-essential since it is really your permlink article content that content-savvy search engines are after. I would be interested in hearing arguments to the contrary.

I created this mod because rss_suparchive wasn’t working very well with TXP 4.0.1

If someone else can benefit from this mod, fire me an email.

Matt

Offline

#33 2005-10-01 16:54:52

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Archives

Heck yes! Is there an alternative php file I can download or do I have to re-create the hack myself?


Yes, I have tried turning it off and on.

Offline

#34 2005-10-02 15:57:13

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Archives

would this work without the section in the url? I have

<code><txp:article_custom limit=“16” dateaware=“1” />
</code>

in my default template and

<code><a href=”/?date=2005-07”>July 2005</a>
</code>

at the bottom of my navbar on this page. It produces the correct URL, but the page loads exactly like the home page (it with today’s articles). Anything obvious I’m missing?

In particular, is there a telltale thing I can look for in the uploaded version of publish.php to make sure that the patched version has uploaded properly?

Last edited by alesh (2005-10-02 15:59:49)


Yes, I have tried turning it off and on.

Offline

#35 2005-10-02 17:28:42

alesh
Member
From: Miami, FL
Registered: 2005-04-13
Posts: 228
Website

Re: Archives

oops . . . right, that doesn’t work: i can’t have article_custom on my home page. SOO… i’ve got a section “archive” that now contains

<code><txp:article_custom limit=“16” dateaware=“1” /
</code>

and my navbar link is

<code><a href=”/archive/?date=2005-07”>July 2005</a>
</code>

. . . except that STILL doesn’t work. then I remember .httaccess, and re-upload that (i wasn’t using it before ‘cause it interferes with Dreamhost’s stats page). Still nothing.

I must just not be smart enough for this.


Yes, I have tried turning it off and on.

Offline

#36 2005-10-02 18:15:44

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: Archives

Hmm. Look for the “dateaware” attribute in your uploaded “publish.php” If it’s not there (in the doArticles function), then you have the wrong version. Make sure your publish.php is taking the place of the old one (usually in the root of the “textpattern” folder).

Why can’t you have article_custom on your home page? There is one drawback to using article_custom: it can’t be used with listing paging links (newer and older); ideally, this should work with the txp:article tag, but it doesn’t.

Remember also to make sure your section (presentation > section) references the correct page where you are using the dateaware attribute.

Be happy to look at your page code, if necessary.

SEE POST BELOW . . .

Last edited by aesop1 (2005-10-03 10:12:35)

Offline

  1. Index
  2. » Archives
  3. » Archives

Board footer

Powered by FluxBB