WordPress.org

Forums

MtDewVirus Archives Update (20 posts)

  1. Neko
    Member
    Posted 11 years ago #

    Wooty! That's GREAT! ^_^
    Thanks,
    ~Neko

  2. wyk
    Member
    Posted 11 years ago #

    Adding $what_to_show = 'days' to arch.php does not work because the $what_to_show setting in wp-blog-header.php overrides it. wp-blog-header.php grabs the value for $what_to_show from the settings entered in the other blog options.
    I got it to work by making a copy of wp-blog-header.php and renaming it wp-blog-archheader.php. To make wp-blog-archheader.php show days instead of grabbing the value set in the options menu, I changed the line $what_to_show = get_settings('what_to_show'); to $what_to_show = 'days' in wp-blog-archheader.php.
    To get arch.php to use the new header, change the line require('wp-blog-header.php') to require('wp-blog-archheader.php') in arch.php.

  3. aeryn
    Member
    Posted 11 years ago #

    Hi, mtdewvirus, I wanted to say it's a great archive hack. I'm using it right now. The only thing that baffled me is how come whenever I try to click on permalinks on Archives page, I get a blank page? I'm not sure if I missed something here. It just shows http://www.domain.com/archives/2004/03/07/blah/ as 404 Not Found page. How do I get my old entries to show up in archives dir or how does that work? I'm still fairly new to all of this...but trying my best...

  4. Nick Momrik
    Member
    Posted 11 years ago #

    wyk,
    Thanks for that. I did find that also, but forgot to add it to this thread (I actually forgot about this thread!). I simply changed it in wp-blog-header.php so that I didn't have to call a seperate file in.
    Once a new release of WP is out, I need to update the instructions in the Wiki for this and a few other changes.

  5. Nick Momrik
    Member
    Posted 11 years ago #

    aeryn,
    Sorry I haven't posted earlier, but I've been in San Diego.
    Can you post a link to your site so that I can see what is happening. A good test is usually to call arch.php directly and pass it a date to see if the file is working. Usually there was either an error in creating the file or in setting up the rewrite rules.

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

    Hmm.. I've broken stuff *again*
    I've reinstalled the archives hack .. but:
    1. Clicking on 'Comments' on the main page generates some sort of arhives link and no comments can be made.
    2. Although posts are displayed when clicking a category, or a month, when an individual post is clicked, the post itself does not appear.
    It's almost like I've left something off the end of the permalinks thing.
    It currently is set as;
    /archives/%year%/%monthnum%/%day%/%postname%/
    Help ?

  7. Nick Momrik
    Member
    Posted 11 years ago #

    podz,
    Have you modified the rewrite rules at all? I've been using the latest CVS code and the only modifications I've made to my rewrite rules are to add the new rules for all of the feeds. Everything else should still be the same.

  8. Mark (podz)
    Support Maven
    Posted 11 years ago #

    I have replaced what I had with what you advised on 30 Jan.
    Calling /T2/arch.php I can see files.
    I cannot see posts, and I cannot get any commenting.
    I've commented inside both index.php and arch.php so I can View Source to check what is being called.
    I have made the @import for the css use an absolute path.
    I still can't see why it just will not go right .. I think I've banged my head on this one once too many - it'll probably be as clear as day tomorrow. If not, I'll clear everything, and start afresh, making the archive's mod the first thing on my list.

  9. Nick Momrik
    Member
    Posted 11 years ago #

    podz,
    Do you have what_to_show = 'days' in the options?

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

    Right, fixed it .. sort of.
    Comments now work, as does clicking on a category link, or a month archive link.
    What is odd is that when clicking on a category or a month, the file 'arch.php' is used, yet when an individual post is clicked on - be that from the front page or from an archive - the file 'index.php' is being used.
    If in that last rewrite rule above I change the last arch to index, the whole thing breaks.
    And I actually wanted arch.php to be used for individual posts, *not* index.php.
    Still, at least it all works :)

  11. trench
    Member
    Posted 11 years ago #

    On http://thetrenchcoat.com/test/arch.php I'm getting each entry and no category archives. How do I make it so there are just the month and the category?

  12. Anonymous
    Unregistered
    Posted 10 years ago #

    For some reason I can not get this to work in WP 1.2
    Has something changed since then?

  13. jumbo
    Member
    Posted 10 years ago #

    http://www.site.com/archives/2004/ shows a list of each entry for that particular year. Great!
    I want http://www.site.com/archives/ to show a list of each entry for all years using the format of the first URI.
    Currently it just outputs two lists:
    "By Category" and "By Date"
    Thanks.

  14. Nick Momrik
    Member
    Posted 10 years ago #

    From what I know, there isn't a quick and easy way to do this, because when you call /archives/2004/ it is passing the year 2004 to index.php which then calls up all of the posts from that year. If you call /archives/ it passes nothing to index.php, which by default brings up the front page of your blog or in the case of the archives, brings up a page letting you choose which archives you want.
    It's kind of the same as if you wanted to display the posts on a page from both May and June of a year, there isn't a way to pass both months, so the same is true for years.
    There might be a way to hack it, but I wouldn't know where to start.

  15. Anonymous
    Unregistered
    Posted 10 years ago #

    Mt Dew Virus, do you have an update for this hack now that 1.2 is out? I can't figure out how to implement it in the new version.

  16. jumbo
    Member
    Posted 10 years ago #

    Inspector Chan, which "new version" are you referring to: 1.2.1 or 1.3*? It still works on 1.2.1, but I haven't tested 1.3.

  17. aeryn
    Member
    Posted 10 years ago #

    Mtdewvirus,
    I know this came pretty late but I've spruced up the archives hack and it seemed to work, but for some reason the mod_rewrite (or something else) only shows all of the posts in that date or category at once. It does show category and date on main page but whenever I click on either one, it jumps straight to display all posts. How do I adjust it so it wouldn't do that? Like after clicking on either category or date, it'd show up a list of all posts and then you have an option to click on one of the posts you want to read. I was using the proffered mod_rewrite for the .htaccess file, but if I used your mod_rewrite it wouldn't work because it would go to a list of posts but if I try to click on any one of those, it'd not display the post itself. Is there a fix for this? Thanks for your time and I really like your hack, I wish it'd work properly like yours!

  18. Nick Momrik
    Member
    Posted 10 years ago #

    A link to your site would really help to see what is happening. My guess is that you are not pointing the single post pages at index.php, they are going to arch.php or whatever you have the file named.
    Folks...there are much easier ways to accomplish this now in the 1.3 beta code so once it finally goes final, I'll come out with an update in the form of a theme.

  19. aeryn
    Member
    Posted 10 years ago #

    MtDewVirus,
    I see. That's probably it. I was pointing to archives.php, not to an index.php. link
    I guess I have to wait for the upgrade to 1.3 to achieve this, so the way it is for now is fine unless there's a quick fix. Thanks again.

  20. Nick Momrik
    Member
    Posted 10 years ago #

    Just in case anyone stops by here, For WP 1.5, there is a great new way to do this.

    MDV Archive

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.