Page 41 of 50 FirstFirst ... 313940414243 ... LastLast
Results 401 to 410 of 500
  1. #401
    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.

  2. #402
    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.

  3. #403
    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

  4. #404
    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.

  5. #405
    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.

  6. #406
    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

  7. #407
    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.

  8. #408
    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.

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

    Default Re: Event Calendar

    Update:
    Removed the following define from includes/languages/english/events_calendar.php
    Code:
    define('MAX_DISPLAY_PAGE_LINKS', 5);
    Reason: This is a duplicate of a an existing default Zen Cart admin configuration setting and this define is used ALL OVER Zen Cart. There is no reason to keep this define setting as it is already controlled in the admin settings. I suspect this is leftovers from this modules Zen Cart 1.3.7 roots that never got pulled out as it should have been.

    Removed the following define from includes/languages/english/events_calendar.php
    Code:
    define('TEXT_DISPLAY_NUMBER_OF_EVENTS', 'Displaying event nB0 <b>%d</b><b>%_</b> of <b>%d</b>');
    Reason: This define is not being used ANYWHERE in the Events Calendar module. Again, I suspect this is leftovers from this modules Zen Cart 1.3.7 roots that never got pulled out as it should have been.

    I modified the following from includes/languages/english/events_calendar.php
    Code:
    define('TEXT_DISPLAY_NUMBER_OF_PAGES', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> events) ');
    to read
    Code:
    define('TEXT_DISPLAY_NUMBER_OF_EVENTS', 'Displaying <b>%d</b> to <b>%d</b> (of <b>%d</b> events) ');
    Reason: The TEXT_DISPLAY_NUMBER_OF_PAGES define is a duplicate of another existing Zen Cart define for the EZ Pages. (YOUR_ADMIN/includes/languages/english/ezpages.php) Though this doesn't appear to be problematic, to avoid ANY possible issues, it makes sense that the Events Calendar module should use it's OWN unique define.

    In support of this I edited: includes/modules/events_calendar_listing.php and replaced all instances of TEXT_DISPLAY_NUMBER_OF_PAGES with TEXT_DISPLAY_NUMBER_OF_EVENTS

    I'm making on more pass through all the language defines to make sure that I've moved out all of the defines that should be in the admin settings menu, and still doing more regression testing.. But I think we are really nearly here..

    I do have one question.. Did we NOT want a start and end TIME for events???
    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. #410
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Event Calendar

    More tweaks:

    Modified: YOUR_ADMIN/includes/languages/english/extra_definitions/events_manager.php
    changed this:
    Code:
        define('FILENAME_EVENTS_MANAGER', 'events_manager.php');
    to this:
    Code:
        define('FILENAME_EVENTS_MANAGER', 'events_manager');
    Reason: Whenever a user profile other than super-user tries to access "Events Manager" under the "Extras" menu, the system will display this message:

    Sorry, your security clearance does not allow you to access this resource.
    Please contact your site administrator if you believe this to be incorrect.
    Sorry for any inconvenience.
    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 41 of 50 FirstFirst ... 313940414243 ... 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