WordPress.org

Forums

Sortable Nicer Archives for 1.3 (35 posts)

  1. Mark (podz)
    Support Maven
    Posted 10 years ago #

    Uses includes for header / footer.
    Untried with themes - I don't use them.
    What it looks like:
    http://www.tamba2.org.uk/T2/narchives.php
    The code:
    http://www.tamba2.org.uk/downloads/narchives2.phps
    It shouldn't break - I didn't touch LL's code :)

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    Cool. I'll use it. :)

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    I implemented it on my comp and it works great. Thanks for the script. Many will find it usefull.

  4. lstelie
    Member
    Posted 10 years ago #

    Hello,
    Very cool, thanks a lot podz

  5. lstelie
    Member
    Posted 10 years ago #

    Just one thing podz :
    Its works like a charm with the default install, but I fail to make it works with a template, in fact I replicated the default theme and template in a /theme directory for my tests, it works well but narchives doesn't seem to find the them directory.
    I added a require wp-blog-header for the variable $wp_template_dir, it works but I have only one month displayed..
    Here is what I did (this is obviously wrong as it doesn't work):
    <?php require('wp-config.php'); ?>
    <?php require_once('wp-blog-header.php');?>
    <?php $single = 1; $siteurl = get_settings('siteurl'); ?>
    <?php include ($wp_template_dir.'/header.php'); ?>
    <?php
    $posts_per_page = '-1';

  6. Mark (podz)
    Support Maven
    Posted 10 years ago #

    So what we need then is two versions ?
    One for a themed install, one for 'not a theme' ?
    I can't ever see myself using Themes so the version I posted works fine, but could they be combined at all ? Bear in mind you could write all I know about PHP with a marker pen on the full stop at the end of this sentence.
    :)

  7. khaled
    Member
    Posted 10 years ago #

    Root and I are actually working on the archive section of our Chameleon released theme, and this seems like just the sort of thing we had in mind, except I'm having a bit of a hard time making it work right now (haven't checked with Root yet to see if he's cracked, probably has but still it'll be a good link to have handy when people ask how it works).
    I get the following warning:
    Warning: main(wp-config.php): failed to open stream: No such file or directory in /home/khaled/public_html/manji/wp-content/themes/Chameleon/archives.php on line 1
    Fatal error: main(): Failed opening required 'wp-config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/khaled/public_html/manji/wp-content/themes/Chameleon/archives.php on line 1
    any ideas?

  8. lstelie
    Member
    Posted 10 years ago #

    @podz
    So what we need then is two versions ?
    One for a themed install, one for 'not a theme' ?

    Probably not, just add a comment in the file stating to remplace the link to wp-header.php by a link with the full unix path to the theme's header.php (same for footer) and you're done
    This :
    http://blog.saint-elie.com/archivesnotes.php
    Is your code on a latest CVS alpha4 with a theme (I removed the form to lower db access) and it works perfectly

  9. khaled
    Member
    Posted 10 years ago #

    Yeah I'm still having some issues actually. Doesn't seem to getting past the very first line. I'm using alpha 4.
    Just to confirm what I'm doing. Take the code kindly given by podz and add make it into a php file. Stick that php file into the theme area, within the folder where the rest of the php files are (index, footer, header, sidebar etc).
    Now this file can be edited from the theme manager as well. I then tweak the include:
    '<?php include ('public_html/wp-content/themes/chameleon/header.php'); ?>'
    Do I need to edit the above line of code as well?

  10. lstelie
    Member
    Posted 10 years ago #

    @khaled
    Yeah I'm still having some issues actually. Doesn't seem to getting past the very first line. I'm using alpha 4.
    I'm using alpha 4 too
    Just to confirm what I'm doing. Take the code kindly given by podz and add make it into a php file.
    Ok
    Stick that php file into the theme area, within the folder where the rest of the php files are (index, footer, header, sidebar etc).
    No, put it in the main wordpress folder .
    My file is named archivesnotes.php, so the url is
    http://www.myblog.com/archivesnotes.php
    Now this file can be edited from the theme manager as well. I then tweak the include:
    '<?php include ('public_html/wp-content/themes/chameleon/header.php'); ?>'
    Do I need to edit the above line of code as well?

    I just edited the path to header.php and footer.php to the full unix path to my theme folder (as stated in my previous message).
    Hope this helps
    Luc

  11. Anonymous
    Unregistered
    Posted 10 years ago #

    To get nicer archives to work copy this page into your WP root directory as narchives.php - then call it using http://yourblog/narchives.php:
    This way it changes with your themes.

  12. puppy18
    Member
    Posted 10 years ago #

    Any idea when i used the codes listed by podz above, i only get one archive output?

    Here: http://www.alvinwoon.com/blog/index.php?page_id=151

    Where's the rest, i wonder?

    Pls advise. Thanks

  13. hetta
    Member
    Posted 10 years ago #

    Using podz' narchives2.php code (off the google cache, his site seems down right now), a couple narchives.php bugs are fixed: no more future posts visible in the categories, no more double posts in the categories, and ASC works now.

    But like puppy18 says, there's a new bug. (Note, I've used the script in a WP1.2.2 blog, with all that entails in changes in header (and footer) includes.)

    Now, only a few entries show up if Date or Title are selected with "All Years" selected.
    If a single year is selected all posts for that year are shown.

    The bug can be admired, in action, here: Narchives v.2 in a WP1.2.2 blog. The script defaults to categories, ascending.
    There's no problem with All Years if Category is selected.

    Any hints?

  14. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I'm noting a few bugs - my guess is that core information has changed location / name / variable so this narchives code will remain pretty dead until the final WP code is finalised and released.

    And to "When's that ?" which someone will post underneath - "When it's ready" :)

  15. dissurion
    Member
    Posted 10 years ago #

    When's that?

    Just noted another bug in the xth version: only sorting by category gives me all my posts to appear in the list.

  16. Yngwin
    Member
    Posted 10 years ago #

    Is there actually any license on this? I think it would be useful to form this into a plugin for 1.5 and/or merge this with Coffee2code's Customizable Post Listings. I am considering doing that myself, but I'd like to make sure about the license status.

  17. hetta
    Member
    Posted 10 years ago #

    OK, gotcha on the "only displays so many posts" bug:
    this:
    $posts_per_page = '-1';
    needs to be before this:
    require('./wp-blog-header.php');.
    Solution found in this thread: http://wordpress.org/support/topic.php?id=20887

    Cool!

  18. lawtai
    Member
    Posted 10 years ago #

    any news on having this be a plugin or something that I could insert into a page for 1.5?

  19. lawtai
    Member
    Posted 10 years ago #

    Warning: extract(): First argument should be an array in /home/lawtai/domains/taibros.net/public_html/wp-includes/functions.php on line 1739

    This is the error I'm getting by using the nicer archives that i used with 1.2.2. How can I fix this error? Everything works, but it just puts this at the top of the page.

  20. joellevand
    Member
    Posted 10 years ago #

    I'm having problems with this script only displaying one line of my archives as a default

    http://journal.beautifulliar.net/narchives2.php

    I've tried putting
    $posts_per_page = '-1';
    before and after
    require('./wp-blog-header.php');.
    and in various other locations with no results, and the original thread for that problem seems to be dead.

    Help please?

  21. ajlitton
    Member
    Posted 10 years ago #

    I'm having the same problem. $posts_per_page, $posts_per_caegory_page, $posts_per_archive_page... It doesn't matter how liberally I set them to -1 and scatter them around, they don't make a blind bit of difference.

    Help!

  22. Lorelle
    Member
    Posted 10 years ago #

    Has anyone yet come up with a sure-fire way to have narchives change the default from "sort by date" to "sort by categories"? I've tried a few different things and nothing seems to be working. There should be somewhere in the code to set the default sort.

  23. Lorelle
    Member
    Posted 10 years ago #

    Okay, so now I'm really messed up. Somehow, when I click on the "month" in narchives2, it takes me to my home page instead of to a month of archives. I get a link for http://www.mysite.com/?m=200501 which is strange...I think.

    I checked on my active blog with the older version of narchives and it is working fine. Is it something I did in changing the layout of my index.php? Oh, boy.

    What happens when a date is clicked on from an archives list? How does it generate the page?

  24. iamarock
    Member
    Posted 10 years ago #

    I'd like to put narchives on my blog, but the link posted by "Anonymous" don't work and the original code don't seems to work merged into a static page of WP 1.5.

    Any good news?

    Thank you

  25. iamarock
    Member
    Posted 10 years ago #

    I need to find a way to get sorted and beautiful archives, it's the last thing I need to upload my page to the server...

    Help please.

  26. Marcos Sader
    Member
    Posted 10 years ago #

    Does anyone knows how to get it working on the ttemplate system used in 1.5+?
    Coz if youc reate a page tmeplate using this code, but your eplace the includes of header with get_header and get_footer functions it works fine but only displays pages when ordered by date ?!

  27. hetta
    Member
    Posted 10 years ago #

    Right, a version of narchives2.php that works with wordpress 1.5 can be found here: http://www.henriettesherbal.com/blog/narchives2.phps
    - if somebody puts a better version online somewhere and tells me about it I'll remove this one.

    Categories are broken: I've tried to include a $today=... and a WHERE post_date <=$today` - but that shows no posts at all.
    Without those two additions the categories also showed yet-to-be-published posts. Drat.

    In addition, if somebody can get categories to work, I'd really like to know how to order things by date, within the categories.

  28. trc49492
    Member
    Posted 9 years ago #

    has any more progress been made on this per hetta's previous post?

    Would love to see a successful category sort on this puppy...

  29. monkeynotes
    Member
    Posted 9 years ago #

    <<Bump>> for a 1.5 plugin version that can exclude specific categories.

  30. mat8iou
    Member
    Posted 9 years ago #

    I've no idea about fixing the categories, but I have made the version in Hetta's post Theme independent, by changing the header, footer & sidebar calls to use the TEMPLATEPATH variable.

    eg.
    <?php include (TEMPLATEPATH . '/header.php'); ?>

    rather than giving the full path to the theme each time.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.