Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Browsing by date plugin
schussat: the akw_archive tag is only going to pull posts from the section in which it is being called, so unless you have posts in your Archive section, you won’t see anything.
The future is… now!
Offline
#77 2004-08-10 02:41:15
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: Browsing by date plugin
He’s trying to fool the section context.
Offline
Re: Browsing by date plugin
> Remillard wrote:
> He’s trying to fool the section context.
Yep, and while it appears that I’m fooling the section, I’m still gettiing no love from akw_archive. I doublechecked that the tag was properly closed with />. I’ll keep tinkering with it, but I think for now I’ll just have to live without. Thanks for all the suggestions, Remillard.
-Alan
Offline
#79 2004-08-10 03:05:27
- Remillard
- Plugin Author

- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: Browsing by date plugin
for whatever it’s worth, what I was doing for debug was going into the code, on the function that parse() calls (I forget the name now) and doing a
print_r($match);
print_r($pretext);
(and a little formatting for them, so maybe a;
print_r(“\n———————————-\n”);
between them).
And then load the page and read the source. It’ll show you EVERY tag that it tries to parse and what it thinks is going on :).
Remi
Offline
Re: Browsing by date plugin
Is anyone getting permlinks to work? If so, how? Please divulge!
The future is… now!
Offline
Re: Browsing by date plugin
Hello
Thanks for this great plugin.
My blog is in swedish and so i wanted the outputed month to be in swedish aswell to do that i made a little change to the code, here is what i did.
i have only tried this in the function <code>akw_month_list</code> but i should work on the other functions aswell.
in the function <code>akw_month_list</code>
the row that says:
<code>$thismonthyear = date(‘F Y’, $uPosted + $timeoffset);</code>
i changed to:
<code>
$getDate = getdate($uPosted + $timeoffset);
$thismonthyear = akw_get_custom_month($getDate).” “.date(‘Y’, $uPosted + $timeoffset);
</code>
And finaly i added the function
<code>
function akw_get_custom_month($date)
{
$month = array(“Januari”,“Februari”,“Mars”,“April”,“Maj”,“Juni”,“Juli”,“Augusti”,“September”,“Oktober”,“November”,“December”);
for($i=1; $i<13; $i++)
{
if ($date[“mon”]==$i)
{
return $month[$i-1];
}
}
}
</code>
I have a working example up <a href=“http://johan.galaxen.net/arkiv”>here</a> at the bottom of the page.
sorry for my bad english mon :)
Last edited by osei (2004-08-12 08:00:47)
Johan Nilsson
Offline
Re: Browsing by date plugin
Just trying to bump this. How are you guys getting the permlinks to work? I still cannot get my links to the stories to work right. Any help would be greatly appreciated.
The future is… now!
Offline
#83 2004-08-24 02:35:55
- CrimsonTeiwaz
- New Member
- From: Maryland, USA
- Registered: 2004-07-26
- Posts: 2
Re: Browsing by date plugin
I was just curious if thekolonel or anyone else had found a solution to the slight bug in the plugin that causes some posts to be listed incorrectly on the pages for a single day’s articles?
Basically, I’m just resetting the time of the article posted to something before about 11pm and it seems to work okay, but has anyone figured out how to fix it internally yet?
Oh, and thanks again to botono9, who suggested using the zem_link plugin for problems with the permanent links in forms used with akw_archive. :)
“I know. I know. Permanent psychosis. At least the colors are nice.”
Aeon Flux
Offline
Re: Browsing by date plugin
Hey guys, i recognized an important bug of the latest version 1.2 (g19)
I’m using 1.0rc1 with both plugins, akw_archive and akw_aware_date, and got my months listed and the entries listed for a specific month.
I describe the problems/bugs I found, and it might help some of you guys having problems with it as well as far as I read from above.
In the beginning I didn’t get the URL params working (surprise!), or at least it seemed so because I had one single Article as an example, in this case with a date of September. Nothing showed up over <code>?s=weblog&y=2004&m=09</code>. Then I entered a second entry and set the date to July, and nothing worked either. Finally by accident I entered some more articles and gave them few more different months and it was working, or at least close to it.
A link like <code>?s=weblog&y=2004&m=09</code> gave me the entries of August not September. So nothing did work because I always tried with a test entry for Sept and July, and it just couldn’t show up something for a month earlier for both! haha…
Finally I noticed that it works fine with Timezone set to 0, and thats the major bug I wanted to mention if not sombody else already did or I’m doing something wrong. I set the timezone to +10 and it showed always a month before.
I would love to get this fixed thekolonel ;) because I love your plugin anyway, it’s cool.
Textpattern loves me, and I love textpattern.
Offline
Re: Browsing by date plugin
Hi guys,
i’m new at Textpattern but have managed to set my blog up. I’m working at my archive and installed the akw_archive and akw_date_aware plug ins.
I managed to get my archive to work as intended, namely a list of months and years:
september 2004
august 2004
etc.
However i have one glitch:
if i click on september, i get the posts of august, if i click on august i get the ones of july,…. so it’s always a month off.
I only use my frontpage to show the archive list and have only 2 page templates: the default one and the archive one.
here are the tags i use:
<txp:akw_article_date_aware limit=“5” />
<txp:akw_month_list limit=“1000” archiveform=“entry_list” monthform=“entry_excerpt” form=“entry_full” headwrap=“h3” daywrapclass=“day-list” dayitemclass=“day” postwrapclass=“post-list” />
Note that i’m not using forms for these tags: i’m not sure if i need to and if so, how to set them up.
Does one of you have a clue as to why the archive shows off a month?
live page:
http://www.dzinelabs.com/blog/cms/
@dzinelabs
Offline
Re: Browsing by date plugin
Hey Luc,
Welcome to Textpattern. Read the post above yours. It looks like the problem is with the timezone settings in the admin area. Set the timezone to 0 until this bug gets fixed and see if that helps
Refresh Dallas and other Refreshing Cities.
Offline
Re: Browsing by date plugin
DUH! That’s what you get when scanning posts instead of read them carefully ;-)
Indeed, setting it to 0 did the trick.
Tnx a lot tinyfly.
Now i’m almost ready to replace my current blog with TextPattern :-)
I have a question about that but i guess i’ll post that somewhere else :-)
@dzinelabs
Offline
Re: Browsing by date plugin
I’ve just about given up attempting to get these plugins to work. I keep coming back and messing with it every couple of weeks. Not sure if it is my inexperience with the textpattern model, or just plain not understanding where in pages/forms/articles they were intended to operate.
rares back to throw towel in
Offline
Re: Browsing by date plugin
I modified the original code to get it to work they way I want (pull from section of my choice, don’t break down by days). I’ll lay it all out in this message. Proceed at your own risk.
Here’s the code of the plugin, with my changes. Copy this into the code window and click save:
<pre>//
// Archive 0.6 (g19) by Lex Konrad (nakedloftparty.com)
// Portions by Dean Allen
// Slightly adjusted by Aaron Murray (onotob.org)
// ——————————————————————————————-
// View switcher
function akw_archive($atts)
{
global $pretext,$txpac;
// ——————————————————————————————————————-
// Outputs list of articles grouped by year & month… useful for archive pages… killed body query
// MOD to accept date format
function akw_doArchiveArticles($atts)
{
global $pretext,$prefs,$txpcfg,$timeoffset;
extract($pretext);
if (is_array($atts)) extract($atts);
- $out[‘body’] = parse($Body_html); $out[‘excerpt’] = $Excerpt; $out[‘title’] = $Title; $out[‘url_title’] = $url_title; $out[‘category1’] = $Category1; $out[‘category2’] = $Category2; $out[‘section’] = $Section; $out[‘keywords’] = $Keywords; $out[‘article_image’] = $Image;
// ——————————————————————————————-
function akw_rel_link($atts, $thing) // LEX: Outputs relative link rather than permalink (MOD for url_mode)
{
global $thisarticle,$c,$pfr,$id;
// ——————————————————————————————
// Adds month label to archive entries
function akw_month_label($thismonthyear,$wraptag,$endwrap,$ytitle,$mtitle,$fromsection)
{
global $pfr,$s,$c;
// ——————————————————————————————
// Adds day label to archive entries
function akw_day_label($uPosted,$thisday,$dtitle,$fromsection)
{
global $pfr,$s,$c;
Next, I created a section called “archive” with a corresponding page. On that page I have the following tag, located where I want the archive display to show up (the page is basically the same as my “default” page, but with the tag below instead of the <code><txp:article /></code> tag):
<pre><txp:akw_archive limit=“5000” form=“archivelinks” archiveform=“archivelinks” hidedays=“yes” headwrap=“h3” fromsection=“article” /></pre>
Next, I created a form called “archivelinks” with a type of “article”, which looks like this:
<pre><li><txp:zem_link><txp:title /></txp:zem_link>
<br />
<txp:cnj_if_excerpt>
<div class=“excerpt”>
<strong>Excerpt</strong>:<br />
<txp:excerpt />
</div>
</txp:cnj_if_excerpt>
</li></pre>
Note, I had to install the plugin zem_link to get permlinks to work and cnj_if_excerpt to test for article excerpts.. Search the plugins forum for these plugins.
Do all of the above and you will have an archive page that looks something like this
Last edited by botono9 (2004-10-02 20:58:37)
The future is… now!
Offline
Re: Browsing by date plugin
botono9, could you post a link to a text file with the code or something? Textile seems to have messed with it.
Offline