Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.

Countdown Calendar

This discussion is related to the Countdown Calendar addon.
blizeHblizeH ✭✭
edited March 2007 in Vanilla 1.0 Help
Countdown Calendar
«13

Comments

  • Is this what used to be called the "Gig Calendar"?
  • It's always been called Countdown Calendar, it's just that in the code it still says 'Gig Calendar' yeah, I can change it though if you guys want.
  • When you post the next update it might prevent questions like that ;)
  • This gadget does not work at all for me.
    It does however produce the following error when previewing a comment...
    Warning: fopen(extensions/Calendar/cal.txt): failed to open stream: No such file or directory in /forum/extensions/Calendar/default.php on line 26

    Line 26 is
    $fp = fopen('extensions/Calendar/cal.txt', 'rb');
    What is the 'rb' parameter???

    Also the readme says...
    pic The calendar text file is currently at a fixed position, please edit this to suit your own calendar's needs by editing this code: "$fp = fopen('extensions/Calendar/cal.txt', 'rb');" pic
    Surely the above is not correct?

    Isn't this the line to adjust position?$Panel->AddList('Gig Calendar', 200);

    In any case, this add-on is a dud unless it's fixed. Not that I have any gigs to list but I do have a use for it.

    Posted: Friday, 9 March 2007 at 2:26PM (AEDT)

  • It means the calendar *text file* is as a fixed position *within the filesystem* - i.e. it has to be in extensions/calendar/cal.txt (the rb are file handling parameters, i believe rb is 'open as read only' or some such but i dont know off the top of my head) - are you sure that file exists and has suitable permissions?
  • extensions/Calendar/cal.txt

    Yes the file is there, correct capitalisation, permissions seem OK, especially if read-only is required.
    Even with permission set to 777, still the same error.

    Posted: Friday, 9 March 2007 at 6:23PM (AEDT)

  • I also ran into that error with just going to the Discussions or Categories on my local install. I added the " && isset($Head)"
    which seemed to fix it.
  • More details please jimw?

    Posted: Saturday, 10 March 2007 at 8:17AM (AEDT)

  • I've gotten similar errors with other extensions I've developed locally and with PreviewPost. One solution for me, at least, was to correct the way I was loading the path to the file. So, maybe the isset didn't take care of it. I've changed so many things recently, but I know the path to the file was giving me trouble.

    This is what I changed it to:

    $fp = fopen($Configuration['APPLICATION_PATH'].'/extensions/Gigs/cal.txt', 'rb'); // Reads the text file
  • Thanks jimx I'll try this first chance I get.
    It's Labour Day weekend down under (Melbourne Victoria) so my wife has organised all of my free time!
    We're going off to yum-cha right now.

    Posted: Sunday, 11 March 2007 at 11:22AM (AEDT)

  • jimw your fix stopped the preview error but the calendar still does not appear.

    I think, judging from your URL, you have an older version?

    The folder is not Gigs in my version, it's Calendar.

    Anyway, this is another extension I've added to my don't bother with list.

    Posted: Sunday, 11 March 2007 at 4:01PM (AEDT)

  • Because you're too dumb to set it up? Typical Mac mentality ;-)
  • Maybe if the instructions were not completely wrong...
    pic The calendar text file is currently at a fixed position, please edit this to suit your own calendar's needs by editing this code: "$fp = fopen('extensions/Calendar/cal.txt', 'rb');" pic
    Typical lazy, amateur programmer wannabe! (Regardless of Mac or PC Mentality!) pic

    Posted: Monday, 12 March 2007 at 9:49AM (AEDT)

  • As long as it works, I couldn't really give a damn how it does it :)
  • I fixed it.

    Posted: Sunday, 18 March 2007 at 7:46PM (AEDT)

  • Here is one other thing I modified code which seems to work for me.
    if($Context->Session->User->Preference('CalendarEnabled') && isset($Head))
  • I also adjusted the time zone as it was a little off for down-under...

    $curdate = ($curdate - 54000);
    It must be getting the time from the server instead of the local computer's clock.

    Posted: Monday, 19 March 2007 at 4:47PM (AEDT)

  • Sounds like it's working now. That's good.
  • @blizeH: thank you for a great add-on!

    --------------------------------------------------------
    REQUESTS - ESSENTIAL
    --------------------------------------------------------
    1) in the 'cal.txt' file, put some example text that makes it absolutely clear what the user is supposed to enter, and in what format. I suggest something like:

    "Event Title", MM/DD/YY 24:00, "Venue, Location", "http://www.eventurl.com/"

    2) yes, please DO change the name from 'Gig Calendar' to 'Countdown Calendar' - including the name in preferences, etc. It is a bit confusing, when we must search the add-on site for 'countdown calendar' but end up with a 'gig calendar' listed. Also, 'gig' is a very specific use for your countdown calendar. Keeping the name generic means it will suit a larger number of uses.

    --------------------------------------------------------
    REQUESTS - HIGHLY DESIRABLE
    --------------------------------------------------------
    3) Make an interface in Admin for adding events, rather than manually editing the cal.txt file.

    4) Make the calendar able to accept dates in formats other than US only - ie., DD/MM/YY, DD/MM/YYYY, YYYY-MM-DD, etc.

    5) Make the calendar multi-lingual (ie., make it compatible with the LanguageSelector add-on by Max_B). Right now, all your interface text seems to be hard-coded into the script.


    Once again, many many thanks, and keep up the good work!
  • And...
    Make this setting actually work so its position in the panel can be adjusted:

    $Panel->AddList('Gig Calendar', 200);
    Currently this is redundant code, removing it has no effect at all.

    Posted: Tuesday, 20 March 2007 at 12:26PM (AEDT)

This discussion has been closed.