Calendar issue

    Date: 01/30/08 (PHP Community)    Keywords: php

    Hello,

    Very glad to find this community, why it hadn't occurred to me to search for one on LJ before now is beyond me. I'm trying to transition out of a user/network support position and into a more backend/developer role. As such I've been working on various projects that I've either suggested and implemented or I've been asked to work on in addition to my normal duties. I've ran into a snag with one of the projects, and I'm hoping someone here can offer some insight. :)


    I'm working with WordPress MU and trying to get a calendar plugin that was written for the standalone WordPress to work. I have a modified copy that another MU user has working on his site and it is working somewhat on mine, but with a problem. I think the problem is in the PHP script. I have asked about this over on the WPMU boards but so far no responses, hoping maybe someone here will be able to point me in the right direction. You can see a properly working version of this calendar here. My installation is on an intranet so I can't share it.

    The problem is that the calendar isn't rewriting properly. I go to the calendar page at
    http://URL/calendar
    and it is fine.

    I can click PREV or NEXT and it properly navigates to the Dec 2007 or Feb 2008 page. But then when I click "Previous" to go back to January, it adds an extraneous 2008 both to the URL and the calendar display.
    http://URL/calendar/2008/2008/jan

    And, any events I had posted to the Jan 2008 calendar are missing because that is not the Jan 2008 calendar, it is the Jan 2008/2008 calendar.

    Clicking Previous again brings up the Dec 2008/2008/2007 calendar page with the URL
    http://URL/calendar/2008/2008/2007/dec

    It just keeps tacking on extraneous years with each subsequent PREV or NEXT movement.

    The calendar.php script is large so rather than include it in this post here's a link to it . I am not sure which function I should be focusing on, next_link, prev_link, or calendar. Or perhaps I'm completely wrong in looking there at all.

    I do have rewrite rules in the .htaccess:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /wpmu/

    RewriteRule ^.*/calendar/(.*)/(.*) wp-calendar.php?year=$1&month=$2 [QSA,L]
    RewriteRule ^.*/calendar wp-calendar.php [QSA,L]

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]


    If you can offer me some pointers on where I should be making changes to the script, if any, I would really appreciate it. :) Thanks!

    Source: http://community.livejournal.com/php/611113.html

« PHP + mail server || php/linux permissions »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home