Forums / All Other Contributions/Addons / Event Calendar v3

Event Calendar v3

Locked

Views: 68,123

Results 481 to 500 of 500
This thread is locked. New replies are disabled.
27 Apr 2013, 12:23 PM
#481
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Event Calendar v3

LaCamus:

I was looking at the description...it uses the word "true", but you could use 1 & 0.Gotcha.. If you look further in the description you will see that it also says that 0=false and 1=true..

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.

27 Apr 2013, 4:45 PM
#482
lacamus avatar

lacamus

New Zenner

Join Date:
Mar 2013
Location:
New Orleans
Posts:
81
Plugin Contributions:
0

Re: Event Calendar v3

DivaVocals:

Gotcha.. If you look further in the description you will see that it also says that 0=false and 1=true..I've been working on something else so my mind has been there. I have to admit I've been cheating by only scanning the posts.

I better start reading what I reply to before I get myself (or someone else) in a bad situation <grin>.

27 Apr 2013, 7:51 PM
#483
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

LaCamus:

I've been working on something else so my mind has been there. I have to admit I've been cheating by only scanning the posts.

I better start reading what I reply to before I get myself (or someone else) in a bad situation <grin>.too funny!!

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.

28 Apr 2013, 3:58 AM
#484
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

All changes posted up until now are included and I've also added admin configurable options to add the All Upcoming Events and Current Upcoming Events links to the More Information and Information sideboxes. The modified sideboxes are included, and defines as well as admin options as appropriate have been added to support this.

Files included.. Readme has been update as well..

This should cover everything with one caveat: CSS image scaling for Internet Exploder 7 & 8 does not work unless the IMG tag height and width is turned off.. (Internet Exploder 7 & 8 do not interpret min-width or min-height correctly) For those who MUST have CSS image scaling working in Internet Exploder 7 & 8 this option has been left in.

If a shopowner NEEDS CSS image scaling working in Internet Exploder 7 & 8 WITH the IMG tag height and width is turned on, they will have to either implement a javascript solution (there are several options out there one can implement) or do some further research on an IE only stylesheet solution..

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.

28 Apr 2013, 2:45 PM
#485
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

DivaVocals:

All changes posted up until now are included and I've also added admin configurable options to add the All Upcoming Events and Current Upcoming Events links to the More Information and Information sideboxes. The modified sideboxes are included, and defines as well as admin options as appropriate have been added to support this.

Files included.. Readme has been update as well..

This should cover everything with one caveat: CSS image scaling for Internet Exploder 7 & 8 does not work unless the IMG tag height and width is turned off.. (Internet Exploder 7 & 8 do not interpret min-width or min-height correctly) For those who MUST have CSS image scaling working in Internet Exploder 7 & 8 this option has been left in.

If a shopowner NEEDS CSS image scaling working in Internet Exploder 7 & 8 WITH the IMG tag height and width is turned on, they will have to either implement a javascript solution (there are several options out there one can implement) or do some further research on an IE only stylesheet solution..

Whooops left out the updated install script..

Anyway this goof gave time to spot and fix some other inline styles corrections (changing <b> to <strong> etc), and to make some more tweaks to the readme..

This should be everything..

To install this latest version, you will need to run the uninstall script plus this little snippet:

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Event Calendar';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

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.

28 Apr 2013, 2:55 PM
#486
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

DivaVocals:

Whooops left out the updated install script..

Anyway this goof gave time to spot and fix some other inline styles corrections (changing <b> to <strong> etc), and to make some more tweaks to the readme..

This should be everything..

To install this latest version, you will need to run the uninstall script plus this little snippet:

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Event Calendar';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

Arrrgh.. Devil's in the details.. Update the uninstall SQL file to read:

UNINSTALL Events Calendar v4.0 for zencart v1_5_0

$Id: uninstall_events_calendar.sql 2013-03-19 dw08gm

$Id: uninstall_events_calendar.sql 2013-03-19 C Jones

DELETE FROM admin_pages WHERE page_key='eventsCalendar';
DELETE FROM admin_pages WHERE page_key='configEventsCalendar';

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Events Calendar';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

DROP TABLE IF EXISTS events_calendar;

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.

29 Apr 2013, 1:13 PM
#487
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Well folks, after testing Diva v07, I think we are ready to rock n roll.

I have only a few minor alterations to make (as follows) and upon affecting these changes hope to upload here very shortly a polished version for final inspection.

All Files
Incorporated all changes to 29/4/2013, including Diva's Event Calendar for ZC 1.5.1-v07.zip
Updated version ids in headers to correct dates
Removed developer references and obsolete notes, tidied layout

**install_events_calendar.sql **
General re-wording and a re-ordering of configuration options
Start Day of Week no longer limited to Sunday or Monday, but can now be any day of week.

uninstall_events_calendar.sql
Updated as per Diva post #486

D:\xampp\htdocs\shop151\includes\languages\english\events_calendar.php
changed

define('TEXT_OTHER_EVENTS', 'Additional Events On This Date'); // Additional events heading

to

define('TEXT_OTHER_EVENTS', 'Additional Events within Timeframe:'); // Additional events heading

because this section really does include all events that may fall within the timeframe of all and any events listed.

\includes\templates\amanita\css\events_calendar.css
```
img.event_calendar_image {max-width:100%; margin:0em auto; height: auto;}

works for me.

Resizing of images now works, both upon uploading and post-editing.

Dropdown changes also works for me.

All that remains is to polish the Readme.

Cheers
29 Apr 2013, 1:26 PM
#488
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

Changes to the install SQL.. (the image resizing didn't reflect the correct changes as per my conversation with Rus this weekend..)

#
# INSTALL Events Calendar v4.0 for zencart v1_5_0
# $Id: install_events_calendar.sql 2013-03-19 dw08gm    
# $Id: install_events_calendar.sql 2013-03-19 C Jones    

# Remove pre-existing Events Calendar admin page entries
DELETE FROM admin_pages WHERE page_key='eventsCalendar';
DELETE FROM admin_pages WHERE page_key='configEventsCalendar';

# This will delete any existing events in their entirety! DO NOT uncomment and run this part of the SQL if you do not want to delete your existing calendar table.
#DROP TABLE IF EXISTS events_calendar; 

# Create events calendar TABLE 
CREATE TABLE events_calendar (event_id int(3) NOT NULL auto_increment, language_id int(11) NOT NULL default '1', start_date date NOT NULL default '0000-00-00', end_date varchar(20) default NULL, title varchar(255) default NULL, event_image varchar(64) default NULL, ZC_link varchar(255) default NULL, ADDL_link varchar(255) default NULL, description text, date_added datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (event_id,language_id));

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Events Calendar';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;

INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (NULL, 'Events Calendar', 'Set Event Calendar Options', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SELECT @t4:=configuration_group_id 
FROM configuration_group
WHERE configuration_group_title= 'Events Calendar';

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES 
(NULL, 'Re-size event images?', 'EVENTS_FILE_RESIZE', '1', 'If this option is set to true, the module will display the re-size event images options on the create/edit preview page. (based on maximum width and height settings below).<br /><br />Set to false to disable image resizing.<br /><br />Set as follows:<br />0=False<br />1=True<br /><br />Default is true.', @t4, 1, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Set the maximum file width', 'EVENTS_FILE_MAX_WIDTH', '800', 'Set the max image width in px. The module will check on uploads, & change on review<br /><br />Default is 800.', @t4, 2, NOW(), NULL, NULL),
(NULL, 'Set the maximum file height', 'EVENTS_FILE_MAX_HEIGHT', '600', 'Set the max image height in px. The module will check on uploads, & change on review<br /><br />Default is 600.', @t4, 3, NOW(), NULL, NULL),
(NULL, 'Events Manager description', 'DESCRIPTION_SIZE_LIMIT', '25', 'Limits the number of characters displayed in the Events Manager. (Most stores will NOT need to modify this setting)<br /><br />Default is 25.', @t4, 4, NOW(), NULL, NULL),
(NULL, 'Show Links in Information sidebox?', 'EVENTS_LINK_STATUS_INFO', 'false', 'Display the Event Calendar upcoming events links on the "Information" sidebox?<br /><br />Set to false to disable image resizing.<br /><br />Default is false.', @t4, 5, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Show Links in More Information sidebox?', 'EVENTS_LINK_STATUS_MORE_INFO', 'false', 'Display the Event Calendar upcoming events links on the "More Information" sidebox?<br /><br />Set to false to disable image resizing.<br /><br />Default is false.', @t4, 6, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Include the IMG tag height and width', 'EVENTS_DISPLAY_IMAGE_WIDTH_HEIGHT', 'true', 'If this option is set to true, the module will include the image\'s native height and width in the IMG tag. This is required to support other user agents \(e.g. a speech browser\) which should have this information in order to relate it to the user.<br /><br />If you do not wish to include the image\'s native height and width in the IMG tag, set this to false. \(Setting this to false may be required for image scaling support in Internet Explorer 7 and Internet Explorer 8\)<br /><br />Default is true.', @t4, 10, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Set first day of the week', 'FIRST_DAY_OF_WEEK', '0', 'First day of the week in the calendar display, eg 0=Sunday, 1=Monday, etc.<br /><br />Default is 0.', @t4, 30, NOW(), NULL, 'zen_cfg_select_option(array(\'0\', \'1\'),'),
(NULL, 'Set number of years to display in the sidebox', 'NUMBER_OF_YEARS', '5', 'No of years to be shown in sidebox year drop-down.<br /><br />Default is 5.', @t4, 20, NOW(), NULL, NULL),
(NULL, 'Single event display', 'EVENTS_SINGLE_JUMP', 'true', 'If this option is set to true, then if the visitor clicks on a link to a date which only contains a single event, then Zen Cart will take them directly to that event-page, rather than present them with the event list with a link to click in order to see the event.<br /><br />Default is true.', @t4, 25, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),
(NULL, 'Use short or long months in calendar titles', 'EVENTS_LONG_MONTHS_TITLES', 1, 'Set as follows:<br />0=Use short months display \(Jan, Feb, etc.\)<br />1=Use long months display \(January, February, etc.\).<br /><br />Default is 1.', @t4, 40, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Use short or long months in calendar dropdowns', 'EVENTS_LONG_MONTHS_DROPDOWNS', 1, 'Set as follows:<br />0=Use short months display \(Jan, Feb, etc.\)<br />1=Use long months display \(January, February, etc.\).<br /><br />Default is 1.', @t4, 45, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),
(NULL, 'Other file types allowed', 'EVENTS_OTHER_EXTS', '.doc .docx .xls .xlsx .pdf .rtf .txt', 'What other filetypes are supported. Be sure to include a dot \(\'.\'\) and the filetype extension. Each filetype should be followed by a space. \(except the last one in the list\) You will need to add the supported file types to the <strong>images/.htaccess</strong> file.', @t4, 50, NOW(), NULL, NULL),
(NULL, 'Maximum number of recurring events', 'EVENTS_MAX_RECURS', '52', 'Set the maximum possible # of recurring events to add to the events database at one time.<br /><br />Default is 52.', @t4, 55, NOW(), NULL, NULL);

# Register admin menu Extras page
INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order)
VALUES ('eventsCalendar','BOX_EXTRAS_EVENTS_MANAGER','FILENAME_EVENTS_MANAGER','','extras','Y',10);
# Register the configuration page for Admin Configuration Settings
INSERT IGNORE INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configEventsCalendar','BOX_CONFIGURATION_EVENTS_CALENDAR','FILENAME_CONFIGURATION',CONCAT('gID=',@t4),'configuration','Y',@t4);

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.

29 Apr 2013, 2:14 PM
#489
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

Minor updates to the readme..

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.

1 May 2013, 1:45 PM
#490
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

Found another issue:

on line 168 of includes/templates/custom_template/templates/tpl_events_calendar_include_default.php

there is this:

<?php break 10; ?>

It was causing the following error log message:

[01-May-2013 07:40:22] PHP Fatal error: Cannot break/continue 10 levels in /XXXX/XXXX/XXXX/XXXX/includes/templates/custom_template/templates/tpl_events_calendar_include_default.php on line 168

I removed it and it stopped the error logs from generating.. the problem is I'm not sure if removing this is the right thing since I'm not entirely sure what that line was supposed to do..

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.

1 May 2013, 4:05 PM
#491
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Re: tpl_events_calendar_include_default.php

I too experienced lots of error logs with this and remmed it with no ill effect.

My records indicate it was introduced in ec_4_alpha_rus_alpha.04 (18 April 2013), when Rus was looking into fixing the sidebox dropdowns. So maybe the break was to close one or other case he was testing.

http://php.net/manual/en/control-structures.break.php

I have also been wondering about the preceeding </html> tag, in fact everyting after </table>. I suspect the </html> has something to do with removing the iframe code edit previously required for tpl_main_page.php, but which should have a corresponding <html>. However, I have not yet looked any further into this.

On a more cheerful note, I have the whole mod ready for packaging, but for the above and a few minor (css) issues.

Cheers

1 May 2013, 4:31 PM
#492
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

dw08gm:

Re: tpl_events_calendar_include_default.php

I too experienced lots of error logs with this and remmed it with no ill effect.

My records indicate it was introduced in ec_4_alpha_rus_alpha.04 (18 April 2013), when Rus was looking into fixing the sidebox dropdowns. So maybe the break was to close one or other case he was testing.

http://php.net/manual/en/control-structures.break.php

I have also been wondering about the preceeding </html> tag, in fact everyting after </table>. I suspect the </html> has something to do with removing the iframe code edit previously required for tpl_main_page.php, but which should have a corresponding <html>. However, I have not yet looked any further into this.

On a more cheerful note, I have the whole mod ready for packaging, but for the above and a few minor (css) issues.

Cheers
and will you be posting it for us to all review before submitting??

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.

1 May 2013, 7:24 PM
#493
lacamus avatar

lacamus

New Zenner

Join Date:
Mar 2013
Location:
New Orleans
Posts:
81
Plugin Contributions:
0

Re: Event Calendar v3

DivaVocals:

Found another issue:

on line 168 of includes/templates/custom_template/templates/tpl_events_calendar_include_default.php

there is this:

<?php break 10; ?>
> 
> It was causing the following error log message:
> 
> 
> I removed it and it stopped the error logs from generating.. the problem is I'm not sure if removing this is the right thing since I'm not entirely sure what that line was supposed to do..Well that took me longer than it should of...I could not figure out why I was not getting an error and you two were, until I figured out that Zen Carts redirects it's errors into a different folder/file than my php error log (remember, I'm still relatively new to Zen Cart).  Anyway, in the php docs all the way at the end it shows that someone was trying to use a break from an included file and it was causing an error.  It doesn't say anything about using excessive breaks to "break" out of previous loops/switches.  Normally I would not use this type of shortcut, but with not knowing what preceded the call to the event calendar sidebox script I tried the excessive break. It appeared to do what I wanted and did it without throwing an exception (or atleast I thought...because I was only checking the default php error log).  What I was aiming for was to stop any further module calls from the parent script so no more html would be output...hence the added closing "</html>" tag.  I also wanted to allow for a return to the parent script so that any "cleanup" could be handled...the main thing I was worried about was that the session variables could get out of sync.

Note: when you remove the break statement you allow the parent zen cart script to continue normal operation, if you look at the sidebox source (after removing the break) you will see that all remaining sideboxes, footers, and main body html will now (again) be returned.  I tried to capture the buffer again, but once php ends it releases anything stored up in the buffer...the only other option would be to go back in and edit the main zen script, so the quick "for now" solution is to do what I "accidentally" accomplished with the "break 10;" statement...and that is to throw an error to abort anything else from tacking on output.  We can accomplish this in an "obvious" way by replacing the statement above with:```
[B]<?php
//**rus: used to escape from any continued output
error_reporting(0);
trigger_error("",E_USER_ERROR);
?>[/B]
```Now...again, I want to say that this sidebox call should probably be reconfigured to use an ajax/sjax solution at some point in time.  You are not returning to the parent script at all, but we proved (again accidentally) that there are no adverse affects (that I can detect), such as session variables not being set.  Of course this could change in a future version of Zen Cart.

Thanks,
Rus
1 May 2013, 8:13 PM
#494
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

LaCamus:

Well that took me longer than it should of...I could not figure out why I was not getting an error and you two were, until I figured out that Zen Carts redirects it's errors into a different folder/file than my php error log (remember, I'm still relatively new to Zen Cart). Anyway, in the php docs all the way at the end it shows that someone was trying to use a break from an included file and it was causing an error. It doesn't say anything about using excessive breaks to "break" out of previous loops/switches. Normally I would not use this type of shortcut, but with not knowing what preceded the call to the event calendar sidebox script I tried the excessive break. It appeared to do what I wanted and did it without throwing an exception (or atleast I thought...because I was only checking the default php error log). What I was aiming for was to stop any further module calls from the parent script so no more html would be output...hence the added closing "</html>" tag. I also wanted to allow for a return to the parent script so that any "cleanup" could be handled...the main thing I was worried about was that the session variables could get out of sync.

Note: when you remove the break statement you allow the parent zen cart script to continue normal operation, if you look at the sidebox source (after removing the break) you will see that all remaining sideboxes, footers, and main body html will now (again) be returned. I tried to capture the buffer again, but once php ends it releases anything stored up in the buffer...the only other option would be to go back in and edit the main zen script, so the quick "for now" solution is to do what I "accidentally" accomplished with the "break 10;" statement...and that is to throw an error to abort anything else from tacking on output. We can accomplish this in an "obvious" way by replacing the statement above with:```
[B]<?php //**rus: used to escape from any continued output error_reporting(0); trigger_error("",E_USER_ERROR); ?>[/B]

> 
> Thanks,
> Rus
I am all for a different method to render this calendar in a sidebox.. Never was fully comfortable that the iframe method was the "right" way to go as much as it seemed to be a "down & dirty" solution that mostly works.. (part of the reason I introduced the other two sideboxes with links to the calendar pages to the fileset) I'm not anti iframe, I just have never been convinced that this is the right application of an iframe..

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 May 2013, 5:52 PM
#495
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Rus Diva

Please find attached proposed final version, including Rus' latest amendments, which I have not tested.

Some additional changes not previously mentioned:

  1. \includes\classes\events_calendar.php
    added an extra bracket in sidebox month heading previous/next links because the single brackets were hard to hit with cursor.
    changed
         $prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><</a>';

         $nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >></a>';

to

         $prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><<</a>';

         $nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >>></a>';
  1. \includes\modules\events_calendar_listing.php
    \includes\templates\amanita\css\events_calendar.css
    event_description_dates - changed to event_dates_start and event_dates_end
    event_dates_start - removed font-size, width, added padding rhs, white-space: nowrap;
    event_dates_end - removed font-size, width, added padding rhs, white-space: nowrap;
    event_header_dates - added white-space: nowrap;

changed

        list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['start_date']);
        $list_box_contents[$row][] = array(
							'align'  => 'center',
							'params' => 'class="event_description_dates"',
							'text'   => date("F j, Y", mktime(0, 0, 0, $month, $day, $year)));
        $endDate = '-';
          if(isset($events->fields['end_date']) && trim($events->fields['end_date']) != '')
          {
            list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['end_date']);
            $endDate = date("F j, Y", mktime(0, 0, 0, $month, $day, $year));
          }
        $list_box_contents[$row][] = array(
							'align'  => 'center',
							'params' => 'class="event_description_dates"',
							'text'   => $endDate);

to

        list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['start_date']);
        $list_box_contents[$row][] = array(
							'align'  => 'center',
							'params' => 'class="event_dates_start"',
							'text'   => date("F j, Y", mktime(0, 0, 0, $month, $day, $year)));
        $endDate = '-';
          if(isset($events->fields['end_date']) && trim($events->fields['end_date']) != '')
          {
            list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['end_date']);
            $endDate = date("F j, Y", mktime(0, 0, 0, $month, $day, $year));
          }
        $list_box_contents[$row][] = array(
							'align'  => 'center',
							'params' => 'class="event_dates_end"',
							'text'   => $endDate);
  1. Something else that could be addressed now or later. The next year heading links in Yearly Calendar in main column needs to be limited to the same value (=5) as sidebox, as customer can keep clicking to view forward years. I stopped at 20 years forward, but could have gone further.

I hope you approve.

Cheers

2 May 2013, 6:00 PM
#496
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

dw08gm:

Rus Diva

Please find attached proposed final version, including Rus' latest amendments, which I have not tested.

Some additional changes not previously mentioned:

  1. \includes\classes\events_calendar.php
    added an extra bracket in sidebox month heading previous/next links because the single brackets were hard to hit with cursor.
    changed
     $prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><</a>';

     $nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >></a>';
> 
> to
> 
> ```
         $prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><<</a>';

         $nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >>></a>';
  1. \includes\modules\events_calendar_listing.php
    \includes\templates\amanita\css\events_calendar.css
    event_description_dates - changed to event_dates_start and event_dates_end
    event_dates_start - removed font-size, width, added padding rhs, white-space: nowrap;
    event_dates_end - removed font-size, width, added padding rhs, white-space: nowrap;
    event_header_dates - added white-space: nowrap;

changed

    list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['start_date']);
    $list_box_contents[$row][] = array(
                        'align'  => 'center',
                        'params' => 'class="event_description_dates"',
                        'text'   => date("F j, Y", mktime(0, 0, 0, $month, $day, $year)));
    $endDate = '-';
      if(isset($events->fields['end_date']) && trim($events->fields['end_date']) != '')
      {
        list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['end_date']);
        $endDate = date("F j, Y", mktime(0, 0, 0, $month, $day, $year));
      }
    $list_box_contents[$row][] = array(
                        'align'  => 'center',
                        'params' => 'class="event_description_dates"',
                        'text'   => $endDate);
> 
> to
> 
> ```
        list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['start_date']);
        $list_box_contents[$row][] = array(
                            'align'  => 'center',
                            'params' => 'class="event_dates_start"',
                            'text'   => date("F j, Y", mktime(0, 0, 0, $month, $day, $year)));
        $endDate = '-';
          if(isset($events->fields['end_date']) && trim($events->fields['end_date']) != '')
          {
            list($year, $month, $day) = preg_split('/[\/.-]/', $events->fields['end_date']);
            $endDate = date("F j, Y", mktime(0, 0, 0, $month, $day, $year));
          }
        $list_box_contents[$row][] = array(
                            'align'  => 'center',
                            'params' => 'class="event_dates_end"',
                            'text'   => $endDate);
  1. Something else that could be addressed now or later. The next year heading links in Yearly Calendar in main column needs to be limited to the same value (=5) as sidebox, as customer can keep clicking to view forward years. I stopped at 20 years forward, but could have gone further.

I hope you approve.

Cheers
The CSS changes make sense, and I was going to tackle them, but then got caught up in making sure things worked from a functionaly perspective.. So kudos for you for doing what I had not done.. Also I am going to add one more link to the More Information and Information sideboxes.. I forgot to include the yearly page view. Might as well do it now before someone asks after it..

Gonna test your package tomorrow as I am working from home so I can care for my BFF (whos is having knee surgery). I should have plenty of peace and quiet as I expect she will be drugged up most of the day..:laugh:

I will also add in some minor mods to the install script.. In my recent Zen Cart travels of creating a custom product type, I found a better way to handle some of the option values than what I used..
:laugh:

Looking forward to seeing it all in action..

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.

13 May 2013, 10:05 AM
#497
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Two more code changes

  1. In \includes\classes\events_calendar.php, around line 265
    Using the admin define for NUMBER_OF_YEARS, this limits the number of years that can be clicked forwards in Year View.

Replaced

               if($year > $this_year)
        {
        $s .= "<td class=\"yearHeader\" align=\"center\" align=\"left\">" . (($prev == "") ? " " : "<a href=\"$prev\"><<</a>")  . "</td>\n";
        }
        else
        {
        $s .= "<td class=\"yearHeader\" align=\"center\" align=\"left\"> </td>\n";
        }
        $s .= "<td height=\"20\" class=\"yearHeader\" align=\"center\">" . (($this->startMonth > 1) ? $year . " - " . ($year + 1) : $year) ."</td>\n";
            $s .= "<td class=\"yearHeader\" align=\"center\" align=\"right\">" . (($next == "") ? " " : "<a href=\"$next\">>></a>")  . "</td>\n";
            $s .= "</tr>\n";        $s .= "<tr>";        $s .= "<td valign=\"top\">" . $this->getMonthHTML(0 + $this->startMonth, $year, 0) ."</td>\n";

with

			if($year > $this_year) {
				$s .= "<td class=\"yearHeader\" align=\"center\">" . (($prev == "") ? " " : "<a href=\"$prev\"><<</a>")  . "</td>\n";
			} else {
				$s .= "<td class=\"yearHeader\" align=\"center\"> </td>\n";
			}
		$s .= "<td height=\"20\" class=\"yearHeader\" align=\"center\">" . (($this->startMonth > 1) ? $year . " - " . ($year + 1) : $year) ."</td>\n";
			if($year < $this_year + (NUMBER_OF_YEARS - 1)) {
				$s .= "<td class=\"yearHeader\" align=\"center\">" . (($next == "") ? " " : "<a href=\"$next\">>></a>")  . "</td>\n";
			} else {
				$s .= "<td class=\"yearHeader\" align=\"center\"> </td>\n";
			}
		$s .= "</tr>\n";
		$s .= "<tr>\n";
			$s .= "<td valign=\"top\">" . $this->getMonthHTML(0 + $this->startMonth, $year, 0) ."</td>\n";
  1. In \includes\templates\amanita\templates\tpl_events_calendar_include_default.php

replaced old <form> tag with zen_draw_form

<form style="margin:0; padding:0;" method="get" name="calendar" action="index.php?main_page=events_calendar">

with

<?php echo zen_draw_form('calendar', zen_href_link(FILENAME_EVENTS_CALENDAR, '', 'NONSSL', false), 'get'); ?>

With these and a few other minor changes, I am about to upload the mod to plugins.

Cheers

13 May 2013, 1:36 PM
#498
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Event Calendar v3

dw08gm:

Two more code changes

  1. In \includes\classes\events_calendar.php, around line 265
    Using the admin define for NUMBER_OF_YEARS, this limits the number of years that can be clicked forwards in Year View.

Replaced

           if($year > $this_year)
    {
    $s .= "<td class=\"yearHeader\" align=\"center\" align=\"left\">" . (($prev == "") ? " " : "<a href=\"$prev\"><<</a>")  . "</td>\n";
    }
    else
    {
    $s .= "<td class=\"yearHeader\" align=\"center\" align=\"left\"> </td>\n";
    }
    $s .= "<td height=\"20\" class=\"yearHeader\" align=\"center\">" . (($this->startMonth > 1) ? $year . " - " . ($year + 1) : $year) ."</td>\n";
        $s .= "<td class=\"yearHeader\" align=\"center\" align=\"right\">" . (($next == "") ? " " : "<a href=\"$next\">>></a>")  . "</td>\n";
        $s .= "</tr>\n";        $s .= "<tr>";        $s .= "<td valign=\"top\">" . $this->getMonthHTML(0 + $this->startMonth, $year, 0) ."</td>\n";
> 
> with
> 
> ```
            if($year > $this_year) {
                $s .= "<td class=\"yearHeader\" align=\"center\">" . (($prev == "") ? " " : "<a href=\"$prev\"><<</a>")  . "</td>\n";
            } else {
                $s .= "<td class=\"yearHeader\" align=\"center\"> </td>\n";
            }
        $s .= "<td height=\"20\" class=\"yearHeader\" align=\"center\">" . (($this->startMonth > 1) ? $year . " - " . ($year + 1) : $year) ."</td>\n";
            if($year < $this_year + (NUMBER_OF_YEARS - 1)) {
                $s .= "<td class=\"yearHeader\" align=\"center\">" . (($next == "") ? " " : "<a href=\"$next\">>></a>")  . "</td>\n";
            } else {
                $s .= "<td class=\"yearHeader\" align=\"center\"> </td>\n";
            }
        $s .= "</tr>\n";
        $s .= "<tr>\n";
            $s .= "<td valign=\"top\">" . $this->getMonthHTML(0 + $this->startMonth, $year, 0) ."</td>\n";
  1. In \includes\templates\amanita\templates\tpl_events_calendar_include_default.php

replaced old <form> tag with zen_draw_form

<form style="margin:0; padding:0;" method="get" name="calendar" action="index.php?main_page=events_calendar">

> 
> with
> 
> ```
<?php echo zen_draw_form('calendar', zen_href_link(FILENAME_EVENTS_CALENDAR, '', 'NONSSL', false), 'get'); ?>

With these and a few other minor changes, I am about to upload the mod to plugins.

Cheers
Haven't had a chance to review.. Been busy with family and work stuff.. Will take a looksee later this week.. By all means go ahead and submit it.. If I find anything significant in my testing I will certainly let ya know about it.. An new update can always be submitted after if it's needed..

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.

20 May 2013, 3:00 PM
#499
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Response from Plugins moderator

ok. Can you just spend a bit more time and go through your new admin files

./events_manager_rec_poll.php
./includes/functions/events_manager_functions.php
./includes/events_manager_drop_dns.php
./events_manager.php

and improve the handling of $_POST variables?

Look at (for example) admin/customers.php. Do you see how these variables are pre-processed with zen_db_prepare_input()? This prevents people from sneaking in harmful data.

I have not looked into this yet, so cannot say how difficult this may be to fix, at least for me.

cheers

10 Jun 2013, 6:23 AM
#500
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,018
Plugin Contributions:
2

Re: Event Calendar v3

Events Calendar Version 4

This mod has been upgraded for zen cart 1.50+, including many new/revised features, and is available at:

http://www.zen-cart.com/downloads.php?do=file&id=521

A new forum thread has been opened specificially for this upgraded version at

http://www.zen-cart.com/showthread.php?208052-Events-Calendar-v4-Support-Thread

Enjoy