[EventCalendar] Re: EventCalendar Digest, Vol 4, Issue 5

Karl Bedingfield karl at bedingfield.org.uk
Sun Feb 5 12:40:42 UTC 2006


Hmmmm, I have a strane thing happening here and wondered if you guys 
could check it out.

In IE6 the link to my event views just fine but in Firefox it gives me 
the 404 error page. Here is the link: http://www.elyonline.co.uk/

Does anyone else get this error? The link in the side bar is under 
'Dates for your diary'

I am using 3.04

Thanks
Karl

eventcalendar-request at firetree.net wrote:
> Send EventCalendar mailing list submissions to
> 	eventcalendar at firetree.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://penguin.firetree.net/cgi-bin/mailman/listinfo/eventcalendar
> or, via email, send a message with subject or body 'help' to
> 	eventcalendar-request at firetree.net
>
> You can reach the person managing the list at
> 	eventcalendar-owner at firetree.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of EventCalendar digest..."
>
>
> Today's Topics:
>
>    1. All day events (Andre Duszynski)
>    2. Re: fix to get category listing to work (Alex Tingle)
>    3. Re: All day events (Alex Tingle)
>    4. Re: fix to get category listing to work (Alex Tingle)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 05 Feb 2006 00:26:52 +1030
> From: Andre Duszynski <duszyn at internode.on.net>
> Subject: [EventCalendar] All day events
> To: eventcalendar at firetree.net
> Message-ID: <43E4B2A4.9030001 at internode.on.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Wondering if it is possible to omit the timestamp for an event i.e. for 
> an all day event.
>
> Thankyou !
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 4 Feb 2006 16:24:27 +0000
> From: Alex Tingle <alex at firetree.net>
> Subject: Re: [EventCalendar] fix to get category listing to work
> To: <ohheyyo at gmail.com>
> Cc: eventcalendar at firetree.net
> Message-ID: <20060204162427.6292bf5b at localhost.localdomain>
> Content-Type: text/plain; charset=US-ASCII
>
> Hi Jonyo,
>
> Thank's very much for that. I've put your change into a new release package:
>
>  http://blog.firetree.net/wp-content/plugins/eventcalendar304.zip
>
> Can somebody test this for me on Wordpress 2.0? If it is confirmed to fix the event category listing, then I'll officially release it.
>
> I'm very surprised to see this patch. category_id is an integer - if Wordpress is treating it as a string in SQL, then that's a bug in Wordpress. Although I just checked, and MySQL allows it.
>
> I like your full-size calendar on the category listing page. This is a common request, and it's nice to see some code for it. I'd like to see a different stylesheet for the full calendar - the small sidebar fonts look out of place in the main part of the page.
>
> -Alex
>
> --
>
> On Sat, 4 Feb 2006 02:30:33 -0600
> <ohheyyo at gmail.com> wrote:
>
>   
>> Got a fix to get category list to work.  To all those that just want the
>> fix, here it is:
>> find this code in eventcalendar3.php:
>> -------copy (don't copy this line)
>>   $ec3->is_listing =
>>     (preg_match("/\bcategory_id\s*=\s*$ec3->event_category\b/",$where) ||
>>
>> preg_match("/\bcategory_nicename\s*=\s*'$event_cat_nicename'/",$where));
>> -------end copy (don't copy this line)
>>
>> and change it to:
>> -------copy (don't copy this line)
>>   $ec3->is_listing =
>>     (preg_match("/\bcategory_id\s*=\s*'?$ec3->event_category'?\b/",$where)
>> ||  //fix by jonyo
>>
>> preg_match("/\bcategory_nicename\s*=\s*'$event_cat_nicename'/",$where));
>> -------end copy (don't copy this line)
>>
>> Now for those who want to know the technical details of what was wrong (not
>> for people with heart conditions or who are scared by geek jargon):
>>
>> I was doing the standard troubleshooting, and noticed that $where had
>> category_id
>> = '2' in it when going to the category page dealing with the calendar.  Then
>> I looked at that top line, and it is trying to find category_id = # w/o the
>> single quotes.  So I added the single quote, followed by ? so that it will
>> match whether it has the single quote there or not (so it will work for
>> category_id = '#' OR category_id = # )
>>
>> Amazing how something so simple as a ' can mess things up, and be so hard to
>> find...  If someone has already found this fix and posted it then mybad,
>> guess I'm not as special as I thought.
>>
>> Added bonus:
>> Below this line is OPTIONAL and is not needed for the category listing fix
>> to work.
>>
>> Heres what I got it to do:  when on category page, show the calendar big,
>> but everywhere else show it on the sidebar:
>>
>> BACK UP ALL FILES before changing them!  These hacks work for me, but might
>> or might not for everyone else depending on what themes you use, what
>> plugins, etc...
>>
>> in sidebar.php for your theme, add this in place of the standard sidebar
>> code:
>> -------copy (don't copy this line)
>> global $custom_show_cal;
>>
>> if ($custom_show_cal!='show_main'){
>>         ?>
>>         <li style="margin-top:30px;">
>>            <?php ec3_get_calendar(); ?>
>>         </li><?php } ?>
>> -------end copy (don't copy this line)
>>
>> now in index.php for your template, look for (this might be different for
>> your theme):
>> -------copy (don't copy this line)
>>     <?php if (have_posts()) : ?>
>> -------end copy (don't copy this line)
>>
>> right before it add:
>> -------copy (don't copy this line)
>> <?php
>>         global $custom_show_cal;
>>         if ($custom_show_cal=='show_main'){ec3_get_calendar();}
>>         ?>
>> -------end copy (don't copy this line)
>>
>> now on eventcalendar3.php page, find:
>> -------copy (don't copy this line)
>>   if($ec3->is_listing && $ec3->advanced && !$wp_query->is_date)
>>   {
>>     // reverse date restriction for event category listing
>> -------end copy (don't copy this line)
>>
>> right after it, add:
>> -------copy (don't copy this line)
>>     global $custom_show_cal; //jonyo custom code to tell sidebar to not show
>> calendar.
>>     $custom_show_cal='show_main';
>> -------end copy (don't copy this line)
>>
>> Attached are my modified sidepanel.php and index.php and eventcalendar3.php for
>> everyone's viewing pleasure.  Do NOT use the sidepanel.php and
>> index.phpunless you happen to have the same theme as me, or it will
>> make your site
>> look weird and possible break the site.  They are meant as reference only,
>> you need to figure out where and how to implement it in your particular
>> theme.
>>
>> Example of working category listing w/ above show full calendar hack:
>> http://wendyleigh.net/category/cal
>>
>> Hope this helps a few of you.
>>
>> -Jonyo
>> (aka)
>> Jonathan Foote
>>     
>
>
>   




More information about the EventCalendar mailing list