Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Archives

#37 2005-10-03 10:13:09

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

Re: Archives

YOU CAN ACHIEVE DATE-AWARE ARCHIVES BY JUST USING THE ARTICLE TAG AND ATTACHING ?month=yyyy-mm-dd AS A QUERY STRING TO YOUR URLS. THE ONLY OTHERFIXTHAT IS NEEDED IS TO HAVE THE MONTH VARIABLE ADDED TO THEOLDERANDNEWERPAGING FUNCTIONS SO THAT YOU CAN PAGE THROUGH THE REQUESTED DATE-BASED ARCHIVE. I WILL SUGGEST THAT THE TXP DEVELOPERS DO THIS. UNTIL THEN, YOU CAN REPLACE THE FOLLOWING LINE IN BOTH THENEWERANDOLDERFUNCTIONS IN TAGHANDLERS.PHP:

<code>
$url = pagelinkurl(array(‘pg’ => $nextpg, ‘s’ => $pretext[‘s’], ‘c’ => $pretext[‘c’], ‘q’ => $pretext[‘q’], ‘a’ => $pretext[‘a’], ‘month’ => @$pretext[‘month’]));
</code>

AS ALWAYS, MAKE MODS TO THE CODE AT YOUR OWN RISK! SAVE A COPY OF YOUR ORIGINAL TAGHANDLERS.PHP PAGE IN CASE YOU NEED TO ROLL BACK THE MODIFICATION.

Last edited by aesop1 (2005-10-18 05:52:56)

Offline

#38 2005-10-15 09:24:40

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

Re: Archives

Sure enough; ?month=yyyy-mm works great, and i’ve implemented it on my site.

Unfortounately, the page 2 hack doesn’t seem to work. I had not problem finding the two instances to change in the PHP, but it still feeds back a url with only the page2 string. At least I know what’s supposed to happen now; it works fine for the category links but not for the date links (check it on my site).

I can workaround this by having the archive pages use a section where article limit=“99”, so a second page is never required; that may be the prefered behavior. Still, if you can put this last piece into place it would be very impressive.

Archives by date, yay!

Now to switch to feature-request mode, the only thing i personally would need now for my dream version of this is for the links to create themselves, and with the number of posts in parenthesees with the link; same way suparchive_menu used to work.


Yes, I have tried turning it off and on.

Offline

#39 2005-10-15 14:39:58

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: Archives

I’ve actually always pondered this general topic on my own. I wanted to do a little research as to whether people actually did use date-based archives if they didn’t have to. I made a blog/site for a music venue that responds to shows via the blog, adding pictures, telling stories and some other stuff. I think that in this sense, it may actually work to be date-based (since we forced them to set their post dates to the date of the show). That way when someone logs on and they know what date the show was, they could click that date and find 2 or 3 posts from different site admins and see what they had to say/show.

But I haven’t found another context in which date-based archives for a blog are really that necessary. If I go to a blog and want to look back in the archives, I generally remember the context of the article, not the date. This information prompts me to either browse through categorical navigation or use the search (if their archive sucks).

It seems like everyone who starts a new blog always wants that cool little calendar up on the top right or top left. They don’t seem to understand the simple fact that it is a waste of their time, resources and space. It’s also just bad information architecture, in my view. Links should almost always go from broad to specific in a topical sense. If this were the case, search engines would be helped out a bit and visitors would be able to figure out where to go when they receive a 404 error and it just looks and feels so much more right than using a date in the URL.

Offline

#40 2005-10-15 18:14:31

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

Re: Archives

Here we go again with “no, actually, you don’t need that feature you say you need.”

I’ll say it again: archives by category are great for some sites (for example, web design geek sites, where most of the posts contain information on broad subjects), while archives by date are better for others (sites like boingboing, which are primarily entertainment, and benefit from being read in order). The two approaches also appeal to different types of readers.

Interesting that paul has two different archives by date on his site (one of which is broken). If you don’t want to help, fine. But don’t tell me a date archive isn’t necessary just because you don’t find it useful.


Yes, I have tried turning it off and on.

Offline

#41 2005-10-15 18:51:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Archives

This is why we have plugins: to supply features that won’t be used by the large majority of users.

The “poo-poo”-ers need to understand: you’ve made a feature request here, not a “how do I”, nor a plugin request. This means its up for discussion, so you can’t very well be upset that we’re discussing it.

As an aside: stop viewing Textpattern as “a competitor”, that’s what causes feature bloat. Textpattern, WordPress, they stand on their own, with their own unique abilities. If they both worked identically, what would be the point of being separate projects?

That’s not to say a feature like this will never exist, or that you don’t need it for your particular uses, simply that if you want it as a feature, as opposed to a plugin, you need to make a better argument for it.

That all said, I’ve been thinking about making such a plugin, since there are not yet many plugin options available. Take this as a discussion to the plugin forum. The bunch of you who want this, get together and decide just how you want it to work. If you can come up with a list of features it really helps: I nor anyone else can make a plugin from thin air. Thus far, almost 100% of the ones I’ve made were because they were a feature I was after, so I knew exactly how it needed to work.

Offline

#42 2005-10-17 23:47:25

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

Re: Archives

Thanks for the response, Mary. What continues to puzzle me, however, is that we are SO CLOSE to having a modicum of date-based archive support with TXP AS IT IS NOW in the release version—would it be that hard to add PAGING SUPPORT?

It is true that we lack tags for creating different date-based menus to interact with the date-based support (month var) already extant within TXP, and that would be an ideal use for plugins. Something along the lines of <code><txp:ini_date_aware mode=“year” section=“blah” prelabel=“Articles from year:” /></code> I’ve also thought about creating a plugin along these lines, but I’ve also thought about cleaning my rain gutters and neither project has been started yet. Rob Sable’s plugin — rss_suparchivebycat — used to work for this but isn’t working since TXP 4.0.

But menu-generation code is an added feature; adding paging support for TXP’s existing month var IS JUST COMPLETING UNFINISHED WORK. I can now sort my archives as mentioned above by using the month var (by year, month or day), and we can create links manually to this end like: <code><a href=“section?month=2004”>Articles from 2004</a></code>. It would simply be nice to be able to page those results.

Regarding the “feature request” vs. “how do I” thread argument: okay the “legal” point is given that this is the wrong forum thread for this discussion, but that still doesn’t invalidate Alesh’s argument, nor the fact that date-based archives are a familiar staple of web sites and can be immensely useful for events and news release sections on sites spanning several months or years. This is really standard CMS functionality.

I recall several months ago that Alex (zem) responded to someone criticizing him for adding “sticky articles” as an added feature before TXP was released and said:

“I had a complete, clean and tested patch sitting on my desk. It solves a problem that causes frequent support questions and requires complex workarounds. Big win, minimal cost.”

My question to the TXP development team is: “Can we have such a big win now with minimal cost for basic date-based archives?”

P.S. Alesh: I’m puzzled that the paging hack doesn’t work on your end. I’ll see if I can get it working on mine with a fresh install.

Last edited by aesop1 (2005-10-18 00:27:23)

Offline

#43 2005-10-18 00:38:47

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: Archives

Interesting that paul has two different archives by date on his site (one of which is broken). If you don’t want to help, fine. But don’t tell me a date archive isn’t necessary just because you don’t find it useful.

Actually that’s on my blog and my blog is entirely experimental. There is really only one date-based archive and it doesn’t work because rss_suparchive seems to be very borked on my site since the addition of 404 errors (which I’m really angry about how this was done…).

Offline

#44 2005-10-18 05:44:23

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

Re: Archives

One thing that I would like to add to my long-winded post above is that I really love TXP and think that Alex, Sencer, Pedro, Dean and great plugin writers like Mary are doing a terrific job. I just think that this date-based archive thing is a bit of an oversight (probably because of the blogging roots of the app). Get the date-based thing taken care of (and maybe add a multiple category article tag) and we have a highly configurable, easy-to-use CMS that can be used for various kinds of sites.

If adding paging support for the month var in TXP is programmatically difficult, dangerous, or rightout foolhardy, just tell me and I’ll shut up. But keep in mind that this is a friendly query and that we just want to see TXP be the best it can be.

Last edited by aesop1 (2005-10-18 05:45:04)

Offline

#45 2005-10-18 11:58:45

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Archives

> paularms wrote:

> There is really only one date-based archive and it doesn’t work because rss_suparchive seems to be very borked on my site since the addition of 404 errors

> mary wrote:

> That all said, I’ve been thinking about making such a plugin, since there are not yet many plugin options available. Take this as a discussion to the plugin forum. The bunch of you who want this, get together and decide just how you want it to work. If you can come up with a list of features it really helps: I nor anyone else can make a plugin from thin air. Thus far, almost 100% of the ones I’ve made were because they were a feature I was after, so I knew exactly how it needed to work.

> wilshire wrote:

> Keep in mind that a lot of changes have taken place in the Textpattern code since this plugin was last released. Things that used to work might not anymore. I started to work on updating the plugin but am up to my neck in work at the moment. I’ll take a look at these problems when things quiet down a bit.

It seems like some of us are getting overwrought more than necessary. While I would love to see native support for date-based archives, I don’t expect to see it for a while. The simplest way to resolve this is for either wilshire to fix the rss_suparchive plugin or for the rest of us to do it for him. When I have some time later today, I am going to give it a shot.

Offline

#46 2005-10-18 12:28:30

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Archives

because rss_suparchive seems to be very borked on my site since the addition of 404 errors

IIRC, There was some discussion on the txp-plugin-list about how to adapt plugins which use their own “url-extensions“which due to the 404-support now requires routing around the “404-trigger”. A callback was added for plugin developers for just this kind of purpose. If anybody wants to get going, take a look at the txp-plugin-list archives, or just ask on the list.

I just think that this date-based archive thing is a bit of an oversight (probably because of the blogging roots of the app).

I don’t consider it an oversight, but the result of our prioritization of features, which cannot possibly match everyones expectations – but has, I believe, played a role (among many other reasons) in the success of Textpattern.
And I wouldn’t say date-based archives are missing because of roots in blogging, but rather despite the fact that txp has blogging-roots. Take a look at Jakobs latest column on the Top 10 design mistakes:
http://www.useit.com/alertbox/weblogs.html

6. The Calendar is the Only Navigation – A timeline is rarely the best information architecture, yet it’s the default way to navigate weblogs.

This doesn’t say that date-based archives are bad (and neither do we), but I think it puts the value of them (to website-users) somewhere around the same that we do.

But the key to making it easier some kind of date-based archives is not in arguing the importance of it, it’s in reading and following the general tips for feature requests here:
http://forum.textpattern.com/viewtopic.php?id=10325

Offline

#47 2005-10-18 12:39:40

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

Re: Archives

Just to really go devil’s advocate here, check out item number 6 on Nielsen’s top ten weblog usability mistakes.

Just a little food for thought ;)


You cooin’ with my bird?

Offline

#48 2005-10-18 14:36:38

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

Re: Archives

Okay, I think many of you are missing the point: Users like Alesh and I aren’t necessarily using “calendars” to navigate our sites (not necessarily “blogs”). Rather it is a way of winnowing down to time-specific content (think organization news releases or an events section). We simply want to be able to call up content for a specific year, month or day. And usually we don’t use this as our ONLY way of navigating content—it’s just another option.

The invocation of Nielsen (not that I hold Nielsen in particularly high regard, btw) here then is a little off topic. No, I don’t think using a “calendar” as your only way of navigating a site is a good idea either. That isn’t what we’re asking for here.

And yes, Sencer, I grant that the lack of date-based features aren’t necessarily an oversight.

It is sort of like when I walk outside without my trousers and explain to the neighbors that my lack of clothing was merely an an oversight on my part. I will tell them instead that wearing pants simply wasn’t a priority. ;)

Last edited by aesop1 (2005-10-18 15:03:53)

Offline

  1. Index
  2. » Archives
  3. » Archives

Board footer

Powered by FluxBB