[EventCalendar] Wanting to edit calendar link
Shelly at Foolish Visions
shelly at foolishvisions.com
Fri Nov 2 17:37:49 UTC 2007
I have a bit of customizing I'm trying to do with the Event Calendar.
The site I'm working on is not your typical WP site, and although I
think Even Calendar is about *perfect* for what they want to use it for,
I'm having trouble with *one* bitty thing.
Basically the calendar will be used so people can view a newsletter.
I've done some serious theme customization, and now (thanks to the Tags
in 2.3) I can send people to a newsletter archive. To do this, I'm
using the tagging system WordPress provides, and it's working beautifully.
However, the Event Calendar links to dates/archives - not tags. I've
managed to hack it slightly so that it's now linking to the tag archive
rather than the regular category archive. However, I've only gotten the
javascript to manage this (previous month/next month links). If you're
on a past month, it'll link to the right tag archive. But if you're on
the current month, the link doesn't work.
I know, it sounds a bit confusing. I'll give you an example (it's not
online right now, or I'd just *show* you)
The current month is November. So the way EC3 is set up, you have:
<Oct November 2007 Dec>
"November 2007" being the current month, obviously. I've fixed it (in
the ec3.js file) so that, when you click on either Oct or Dec, it links
to my tagged archive (ie, instead of "http://url/2007/10" ot now links
to "http://url/tags/October-2007"). The old calendar that shows up
(meaning, it now uses the AJAX function to say <Sept October 2007
Nov>") will also link to the right/edited URL.
However, when you're on the *current* month - for example, if I'm on the
October page, and it's showing the November calendar, it'll show the
regular link: ie, http://url/11/2007. I've managed to hunt down the
function I need to edit (function month_link() in date.php), but no
matter what I do, I cannot get it to display "November" instead of "11".
When I try to set up an array to convert the month number to a month
name, it'll display the current month page you're on, rather than the
current month showing in the calendar. (So if I'm on October's page,
and November is displaying, the month links to October.)
I'm so sorry this sound confusing - but I was wondering if there was a
way to change the $this->month_num to $this->month_name in the file.
All attempts I've tried have failed. I can see another function above
the month_link() that refers to a month name (function month_name()),
but I can't figure out how to put *that* value in the link rather than
the number value. In fact, from what I can tell, even if I could, it
would still put in the number (because it looks like that function
strips the name to a number value).
I'm probably overthinking this - but could someone tell me how I can do
this? I'd really appreciate it.
~Shelly
More information about the EventCalendar
mailing list