Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2004-06-20 18:17:50

philippo
New Member
From: New Haven, CT
Registered: 2004-05-26
Posts: 7

Re: Browsing by date plugin

I’m having problems getting the date based archives to work.

I currently have (www.drunkenmonkeys.org/archive/) txp:akw_nested_month_list in a sidebar and it’s working fine (ie producing output).

I also have txp:akw_article_date_aware in my main content pane. It’s displaying my articles just fine, BUT does not seem to be reacting to date input at all. If I click on the month list, it just seems to refresh the page, always displaying articles in reverse chronological, newest first (just like regular textpattern).

It seems that the date aware article is not reacting to form input. So, drunkenmonkeys.org/archive/?y=2003 does nothing.

Any ideas why that might be? I also tried out txp:akw_archive in the main pane. Again, it prints a nice list of titles sorted by year and month (as it should), but does not react at all to date input in the URL or any clicks on months, years, etc.

Any help is appreciated!

Cheers,

Phil

Offline

#32 2004-06-20 19:08:51

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Browsing by date plugin

I think akw_article_date_aware only works for articles that are in the current section. So, if you are using it for articles in the main content and you want the articles to appear properly sorted in a different section say, /archives/ it is not going to happen.

what you could do (though this limits your options for an archive section) is use akw_article_date_aware in your main content section and use akw_nested_month_list in the sidebar of that same main content section then it should work properly. But for a separate /archive/ section, I don’t know.

Offline

#33 2004-06-20 19:33:43

philippo
New Member
From: New Haven, CT
Registered: 2004-05-26
Posts: 7

Re: Browsing by date plugin

tinyfly,

sorry if this was not clear. Both akw_nested_month_list AND akw_article_date_aware are in the “archive” section and will only be used there. The front page does not have the nested_month_list in the sidebar and the articles there are the standard texpattern article tags, not akw_article_date_aware.

I basically just want this thing working in the archive section and don’t care about the front page.

Offline

#34 2004-06-20 19:41:44

thekolonel
Archived Plugin Author
From: NYC
Registered: 2004-03-01
Posts: 28
Website

Re: Browsing by date plugin

There is a problem with the plugin that shows up on hosts like TextDrive that have REGISTER_GLOBALS set to ‘OFF’. If your date aware tag isn’t working this is the likely culprit. I’m going to update the plugin to work with this configuration.

tiny, you can use the date aware tag in any section.

Offline

#35 2004-06-20 20:03:27

philippo
New Member
From: New Haven, CT
Registered: 2004-05-26
Posts: 7

Re: Browsing by date plugin

Thanks so much, thekolonel, that would explain it.

Let us know when it’s updated.

Cheers!

Offline

#36 2004-06-20 20:22:08

mrpunkin
Member
Registered: 2004-06-13
Posts: 10
Website

Re: Browsing by date plugin

I have tried implementing this and have the month list working by using:

<txp:akw_nested_month_list section="article" />

From within my “archive” section. Now I then replaced <txp: article limit="5"> with <txp:akw_article_date_aware limit="5">. When I click on the month in my archive page though it just takes me to my normal frontpage, without any article sensativity. The address though matches how it should, its just only showing the newest months stuff.

Any ideas?

http://blog.mrpunkin.com

Last edited by mrpunkin (2004-06-20 20:24:35)


Bryan
.:Mrpunkin.coM:.

Offline

#37 2004-06-20 20:48:55

bleveck
Member
Registered: 2004-05-30
Posts: 52
Website

Re: Browsing by date plugin

Yeah… I had the same problem. I used the date aware articles but the month list was not working. It may be that your host does not support register_globals on (this was my problem). The month list plugin relies on that. Many hosts don’t allow register_globals on because there is a security vulnerability associated with it. I talked to the kolonel and he said he’ll probably rewrite the plugin to not rely on it.

Offline

#38 2004-06-20 21:18:17

mrpunkin
Member
Registered: 2004-06-13
Posts: 10
Website

Re: Browsing by date plugin

Is there a way to turn it on? I run my own server in house but am not too savvy with that stuff.


Bryan
.:Mrpunkin.coM:.

Offline

#39 2004-06-20 22:52:07

bleveck
Member
Registered: 2004-05-30
Posts: 52
Website

Re: Browsing by date plugin

Sure. I think you could just enable it in your php configuration or if you use apache, you can use an .htaccess file with the command: php_flag register_globals on. I don’t know your server setup, but you can find this sort of information very easily with a google search.

Remember though, it opens up a security vulnerability whereby people can start sending certain php commands to your website. There is supposedly a security modifcation to counter this, but I don’t know what that is. I’m still new at this sort of thing myself, and I don’t run my own server. Ideally, programmers wouldn’t rely on register_globals being on, but the reality is they do. So its a matter of doing the above, or rewriting the scripts.

Offline

#40 2004-06-20 23:19:41

mrpunkin
Member
Registered: 2004-06-13
Posts: 10
Website

Re: Browsing by date plugin

maybe ill just wait then ;)


Bryan
.:Mrpunkin.coM:.

Offline

#41 2004-06-22 01:41:30

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

Re: Browsing by date plugin

bleveck:

The problem with having register_globals on is that you have to be very, very careful with all your variables, because you never know where they’re coming from. Suppose, for example, that you have a very rudimentary CMS which, internally, decides what page to serve based on a variable named $file; whatever file’s name is in that variable, the CMS will include and serve. With register_globals on, someone could type the following URL:

http://yoursite.com/index.php?file=/etc/passwd

and your CMS would serve up your server’s password file. That’s an exaggerated example, but when you have register_globals on, any variable you use could, without your knowledge, be overwritten to a possibly malicious value by a well-constructed GET or POST request. With register_globals off, that isn’t possble; the above URL wouldn’t set the variable $file, it’d set the variable $_GET['file'] and your CMS wouldn’t hand over any passwords. So if you don’t know what you’re doing (and even, in a lot of cases, if you do) it’s a good idea to turn off register_globals.


You cooin’ with my bird?

Offline

#42 2004-06-22 01:52:08

bleveck
Member
Registered: 2004-05-30
Posts: 52
Website

Re: Browsing by date plugin

Wow… thanks ubernostrum. That was surprisingly clear.

Offline

#43 2004-06-22 02:02:32

CellarFloor
New Member
Registered: 2004-05-11
Posts: 3
Website

Re: Browsing by date plugin

A question about <txp:akw_article_date_aware /> when the next month rolls around will my homepage be blank because there are no articles from that month? is there a way I can set it to just display the last 20 articles regardless of date, and if date is specified in a get request have it go by that instead?

Offline

#44 2004-06-22 21:32:49

philippo
New Member
From: New Haven, CT
Registered: 2004-05-26
Posts: 7

Re: Browsing by date plugin

thekolonel,

do you think the register_globals fix is going to be a difficult one?

Offline

#45 2004-06-23 19:56:51

thekolonel
Archived Plugin Author
From: NYC
Registered: 2004-03-01
Posts: 28
Website

Re: Browsing by date plugin

Shouldn’t be too hard. I’ll crank it out sometime this week.

Offline

Board footer

Powered by FluxBB