Page 1 of 2 12 LastLast
Results 1 to 10 of 500

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    Quote Originally Posted by dw08gm View Post
    Re: tpl_main_page edit.
    I have a splash page and several other pages on which I do not want the calendar to appear, and am hoping the automation of this required edit is strictly limited to tpl_main_page.
    The latest version of the Event Calendar module no longer requires ANY edit to this page at all.. So when I upload my consolidated module files, this file is no longer included as it's no longer needed.

    Quote Originally Posted by LaCamus View Post
    It still could be more efficient (currently loads header and side boxes and then I strip them from the buffer) but is better than before due to less db queries. I think there is a better solution, but I'm still new to the workings of Zen Cart. Ultimately I think ajax is the best way but would require putting a script in the main directory...what are the rules on this (are there any)?
    No rules on this at all that I'm aware of..I personally would like to see this further improved as the iframe does add to the page load speeds, and anything to improve this is a GREAT idea.. So long as the script doesn't compromise site security (which is a HUGE part of Zen Cart v1.5.1) there shouldn't be an issue. On my test site I have a script running in the main directory (one which makes the site images responsive), and there are no issues with this script.
    Quote Originally Posted by LaCamus View Post
    Not sure if you saw it but there are two trigger defines (EVENTS_LONG_MONTHS_TITLES + EVENTS_LONG_MONTHS_DROPDOWNS) now, 1 for the drop down and one for the calendar titles. It allows owners to set either way (long or short) for both (titles and drop down). That was an addition I made since our last set of posts (2 days ago?). Sorry, I should have said something. The change you made above affects only the titles on the yearly views and event views in the main window.

    Rus
    Yes I did see this which is why I modified the dropdown define that appears on the Events page. The admin setting for the long/short months dropdown implies it applies to ALL dropdowns. So to make the results of this setting consistent in the UI, I changed the define being used on the Events page dropdown.. Otherwise we would need to add a THIRD define for the Events page dropdown to separate it from the sidebox month dropdown. (see the images I attached)

    Quote Originally Posted by LaCamus View Post
    Yeah...I figured that people may not want docs in the main image directory. In my version the .htaccess file in images didn't support the new docs, so instead of changing the stock zen cart file I copied and edited one specifically for the events calendar.
    Quote Originally Posted by LaCamus View Post
    If you don't use this file you will need to include instructions to have the store owner make changes to the .htaccess file under images.
    Understood, but there's no reason to introduce another .htaccess file. An instruction in the readme (which I fully intend to include) will solve this.. There are other Zen Cart modules which modify the main .htaccess file (URL re-writers for example) so editing any of the stock .htaccess files are not an out of the ordinary edit at all.

    Editing the .htaccess file in the main image folder should be an easy edit for most shopowners in comparison to the edits that URL re-writer modules require since it's unlikely that the image folder's .htaccess has any other edits to it. (unlike the main .htaccess file where shopowners may have made other edits in addition to the ones required for something like a URL re-writer).

    In any case, in the VAST MAJORITY of cases, I don't think folks will have to merge the Event Calendar changes to the images .htaccess file at all. Most will be able to get away with simply replacing their existing images .htaccess file with the one included with the Events Calendar module.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  2. #2
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    I found something that I thing is a bug..

    If you look at this page:
    http://zentestcart(dot)overthehillwe...13&year_view=0

    You will see that it lists all of the Events for the month of April. There an event for today that appear in the list of events that DOES NOT appear in the "Select Event" dropdown.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #3
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    I apologize for the additional post.. My last one expired..

    Small change I made the the fileset structure:

    I moved this file:
    /includes/languages/english/extra_definitions/YOUR_TEMPLATE/events_calendar_include_defines.php

    to here:
    /includes/languages/english/extra_definitions/events_calendar_include_defines.php

    There's no need for an override for this file since this is NOT a default Zen Cart file. Any shopowner who makes changes to this file certainly SHOULD create an override for it, but the Events Calendar fileset doesn't need to put it in a template override folder..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  4. #4
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    Hi just checking in.. still doing some cleanup before I post up the fileset I've been testing off of..


    • Removing all of the deprecated and comment out code
    • Removing the closing "?>" from files where appropriate (there's a Zen Cart FAQ that explains why this is okay)
    • I'm cleaning up the top section of the files to line up with other Zen Cart files and to appropriately credit modifiers of the files (specifically to add Rus and myself where appropriate)


    Once I finish all of this, I will run through all of my test cases again to be sure that I didn't break anything in my file cleanup. Then I will post the fileset I'm testing from for the group to throw darts at..

    I'm at a stopping point in this effort. (I'm off to a Mustang open house where I'll be showing off my 600HP Supercharged baby!). I will wrap this up and post my files later tonight.. (dw08gm will be in bed by then)
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #5
    Join Date
    Mar 2013
    Location
    New Orleans
    Posts
    81
    Plugin Contributions
    0

    Default Re: Event Calendar

    Quote Originally Posted by DivaVocals View Post
    Small change I made the the fileset structure:

    I moved this file:
    /includes/languages/english/extra_definitions/YOUR_TEMPLATE/events_calendar_include_defines.php

    to here:
    /includes/languages/english/extra_definitions/events_calendar_include_defines.php

    There's no need for an override for this file since this is NOT a default Zen Cart file. Any shopowner who makes changes to this file certainly SHOULD create an override for it, but the Events Calendar fileset doesn't need to put it in a template override folder..
    Nod...in truth everything that has a unique filename should be moved out of "your_template" and into the default directories. "Your_template" overrides are set aside for when someone wants to change what we release as the default module...that includes the tpl files.

  6. #6
    Join Date
    Mar 2013
    Location
    New Orleans
    Posts
    81
    Plugin Contributions
    0

    Default Re: Event Calendar

    Yes I did see this which is why I modified the dropdown define that appears on the Events page. The admin setting for the long/short months dropdown implies it applies to ALL dropdowns. So to make the results of this setting consistent in the UI, I changed the define being used on the Events page dropdown.. Otherwise we would need to add a THIRD define for the Events page dropdown to separate it from the sidebox month dropdown. (see the images I attached)
    Here's the problem...that setting affects the year calendar titles as well. Let's do this....we can go ahead and make these changes:

    1) Put the line you changed back to use the ...TITLES flag.
    2) setup a new array for the drop down.
    ...the code at the top of tpl_events_calendar_default.php will look like this:
    Code:
    $cal = new Calendar;
    $cal->setMonthNames(explode(",", (EVENTS_LONG_MONTHS_TITLES ? EVENTS_MONTHS_LONG : EVENTS_MONTHS_SHORT)));  //**rus: via diva: add
    $cal->setDayNames(explode(",", EVENTS_WEEKDAY_FIRST_CHARS));   //**rus:add
    $dd_months = explode(",", (EVENTS_LONG_MONTHS_DROPDOWNS ? EVENTS_MONTHS_LONG : EVENTS_MONTHS_SHORT));       //**rus: new
    $cal->setStartDay(FIRST_DAY_OF_WEEK);
    3) now use the new array in the drop down (around line 84):
    Code:
          while (!$q_events->EOF) {
    	    $year = $q_events->fields['year'];
            $month = $q_events->fields['month'];
            $day = $q_events->fields['day'];
            $event_array[] = array('id' => $q_events->fields['event_id'], 'text' => $dd_months[$month - 1] . ' ' . $day . ' - ' . $q_events->fields['title']);  //**rus:changed
            $q_events->MoveNext();
          }
    Now for the bug...that query around line 74, change "date('Y-m-d H:i:s')" to "date('Y-m-d')". This is the same issue we had with the query I changed when I first joined. The start_date in the db doesn't use a time so we shouldn't compare it to the current date & time (just the date).
    Code:
        $q_events = $db->Execute("select *, DAYOFMONTH(start_date) AS day, MONTH(start_date) AS month, YEAR(start_date) AS year"
        . " from ".TABLE_EVENTS_CALENDAR." where start_date >= '" . date('Y-m-d') . "' and language_id = '" . $_SESSION['languages_id'] . "'"
        . " order by start_date");
    Thanks,
    Rus

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    Quote Originally Posted by LaCamus View Post
    Here's the problem...that setting affects the year calendar titles as well. Let's do this....we can go ahead and make these changes:

    1) Put the line you changed back to use the ...TITLES flag.
    2) setup a new array for the drop down.
    ...the code at the top of tpl_events_calendar_default.php will look like this:
    Code:
    $cal = new Calendar;
    $cal->setMonthNames(explode(",", (EVENTS_LONG_MONTHS_TITLES ? EVENTS_MONTHS_LONG : EVENTS_MONTHS_SHORT)));  //**rus: via diva: add
    $cal->setDayNames(explode(",", EVENTS_WEEKDAY_FIRST_CHARS));   //**rus:add
    $dd_months = explode(",", (EVENTS_LONG_MONTHS_DROPDOWNS ? EVENTS_MONTHS_LONG : EVENTS_MONTHS_SHORT));       //**rus: new
    $cal->setStartDay(FIRST_DAY_OF_WEEK);
    3) now use the new array in the drop down (around line 84):
    Code:
          while (!$q_events->EOF) {
            $year = $q_events->fields['year'];
            $month = $q_events->fields['month'];
            $day = $q_events->fields['day'];
            $event_array[] = array('id' => $q_events->fields['event_id'], 'text' => $dd_months[$month - 1] . ' ' . $day . ' - ' . $q_events->fields['title']);  //**rus:changed
            $q_events->MoveNext();
          }
    Now for the bug...that query around line 74, change "date('Y-m-d H:i:s')" to "date('Y-m-d')". This is the same issue we had with the query I changed when I first joined. The start_date in the db doesn't use a time so we shouldn't compare it to the current date & time (just the date).
    Code:
        $q_events = $db->Execute("select *, DAYOFMONTH(start_date) AS day, MONTH(start_date) AS month, YEAR(start_date) AS year"
        . " from ".TABLE_EVENTS_CALENDAR." where start_date >= '" . date('Y-m-d') . "' and language_id = '" . $_SESSION['languages_id'] . "'"
        . " order by start_date");
    Thanks,
    Rus
    Yep.. All of this did the trick.. Fixed the bug.. fixed the dropdowns so they are consistent on the Events page and sidebox..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  8. #8
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    984
    Plugin Contributions
    6

    Default Re: Event Calendar

    Returned about an hour ago (10pm) and found no-one here - home alone. .

    Re: iFrame
    IIRC this is only required to update the display of the sidebox calendar month without having to update entire page. However, clicking any other link in the sidebox will require the main column to also be updated. As is, the iframe does not present any siginificant problems to me ATM, especially as core zencart utilises iFrames in other areas, and with Rus improving the loading/buffering, this may be all that is needed to serve well into the future.


    Re: Supercharged baby.
    I regularly dream of 3D-printing a candy-colored, tangerine-flaked, multi-mini-jet-powered streamlined baby with metal-storm cannons, and tonight may be no exception.

    Cheers

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    Quote Originally Posted by dw08gm View Post
    Returned about an hour ago (10pm) and found no-one here - home alone. .

    Re: iFrame
    IIRC this is only required to update the display of the sidebox calendar month without having to update entire page. However, clicking any other link in the sidebox will require the main column to also be updated. As is, the iframe does not present any siginificant problems to me ATM, especially as core zencart utilises iFrames in other areas, and with Rus improving the loading/buffering, this may be all that is needed to serve well into the future.
    Awwwwwww... we didn't leave you alone on purpose.. We left snacks in the fridge though if that helps..

    My concern is not the iframe itself, but the fact that in the background it is loading the entire page and then hiding the headers and such.. THAT alone could present a performance issue for some servers.. Plus all those extra calls to display and hide content seems somewhat unnecessary.. If that alone could be improved that can't be a bad thing right??


    Quote Originally Posted by dw08gm View Post
    Re: Supercharged baby.
    I regularly dream of 3D-printing a candy-colored, tangerine-flaked, multi-mini-jet-powered streamlined baby with metal-storm cannons, and tonight may be no exception.

    Cheers
    Well my baby was the queen of the ball yesterday.. She was one of the SHOWCASE vehicles at the open house.. Made her mama proud!
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #10
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    I have to head off to a client meeting this morning.. Just wanted to let ya'll know I'm still testing & cleaning up stuff.. I found a few more defines that need to be added to the setting script.. So I will need to run my test scripts again against these new changes.. Hoping to be able to get my files submitted for the review of the group later tonight..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Timeslot Booking Event Calendar
    By escapis in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 31 Jan 2014, 12:45 AM
  2. Multiple Choices error with Event Booking Calendar addon
    By FukienMan in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 16 Feb 2012, 12:17 AM
  3. Help with Event Calendar add-on
    By blabay in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Mar 2010, 01:34 PM
  4. Event Calendar Broken - take out of download section!
    By Asmodai in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 10 Nov 2007, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg