Forums / All Other Contributions/Addons / Event Calendar v3

Event Calendar v3

Locked

Views: 68,123

Results 341 to 360 of 500
This thread is locked. New replies are disabled.
12 Apr 2013, 10:09 PM
#341
lacamus avatar

lacamus

New Zenner

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

Event Calendar v3

DivaVocals:

Ajax??? Did someone say AJAX???? I LOVE Ajaxy stuff!!!:yes:

In the name of being the resident nag here.. :cool:
Are you also adding the option for shopowners to chose removing the physical files from the server when uploading a replacement image to an event??:D (Similar to the existing Zen Cart feature for product images -- see example image)

It is on my list, but not sure it will make it in this weekend. My thoughts are that if we're going to "touch" that section of code we should also put in the ability to link to existing files as well.

12 Apr 2013, 11:10 PM
#342
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

...Rus probably has all the changes in his files.. Hopefully he can submit them so I can work on testing over the weekend.. I'm flying to Nashville tonight and I can work on some things while at the airport and during my downtime at my hotel.

Files I have "touched" since the alpha (ec_4_alpha.zip) release:

  On the admin (back end) side:
    events_manager.php
      * changed 
      : located in: admin/
      - main program on administrative side

    events_manager_rec_poll.php
      * new
      : located in: admin/
      - added for javascript ajax/sjax calls from main events_manager.php

    events_manager_drop_dns.php
      * changed
      : located in: admin/includes/
      - called from events_manager.php to handle link creation drop down boxes

    events_manager.css 
      * new
      : located in: admin/includes/
      - created to separate the bulk of css from events_manager.php

    events_manager_image_manipulator.php 
      * new
      : located in: admin/includes/classes/
      - called from events_manager.php, holds image manipulation class/functions
      ! was originally named image_manipulator.php, changed to be consistent with events module

    events_manager_js.php
      * new
      : located in: admin/includes/javascript/
      - created to separate the bulk of javascript from main events_manager.php
      ! file is called as a php require not from a javascript file tag, this is due to needed php define references

    events_manager_functions.php
      * new
      : located in: admin/includes/functions/
      - created to separate some of the larger php functions from main events_manager.php

    events_manager.php
      * changed
      : located in: admin/includes/languages/english/
      - hold english language php DEFINEs for text in the events manager module

    events_manager.php
      * changed
      : located in: admin/includes/languages/english/extra_definitions/
      - hold english language php DEFINEs for configurable options in the events manager

-----

  On the store (front end) side:

    tpl_events_calendar_default.php
      * changed
      : located in: /includes/templates/your_template/templates/
      - main events calendar program for store front side

    events_calendar_include_defines.php
      * changed
      : located in: /includes/languages/english/extra_definitions/your_template/
      - hold english language php DEFINEs for configurable options in the events calendar

    events_calendar_functions.php
      * changed
      : located in: /includes/functions/extra_functions/
      - holds functions shared by events calendar module 

That should do you...
Rus

13 Apr 2013, 1:14 AM
#343
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:

Files I have "touched" since the alpha (ec_4_alpha.zip) release:

On the admin (back end) side:-
events_manager.php
* changed
: located in: admin/
- main program on administrative side

events_manager_rec_poll.php
  * new
  : located in: admin/
  - added for javascript ajax/sjax calls from main events_manager.php

events_manager_drop_dns.php
  * changed
  : located in: admin/includes/
  - called from events_manager.php to handle link creation drop down boxes

events_manager.css 
  * new
  : located in: admin/includes/
  - created to separate the bulk of css from events_manager.php

events_manager_image_manipulator.php 
  * new
  : located in: admin/includes/classes/
  - called from events_manager.php, holds image manipulation class/functions
  ! was originally named image_manipulator.php, changed to be consistent with events module

events_manager_js.php
  * new
  : located in: admin/includes/javascript/
  - created to separate the bulk of javascript from main events_manager.php
  ! file is called as a php require not from a javascript file tag, this is due to needed php define references

events_manager_functions.php
  * new
  : located in: admin/includes/functions/
  - created to separate some of the larger php functions from main events_manager.php

events_manager.php
  * changed
  : located in: admin/includes/languages/english/
  - hold english language php DEFINEs for text in the events manager module

events_manager.php
  * changed
  : located in: admin/includes/languages/english/extra_definitions/
  - hold english language php DEFINEs for configurable options in the events manager

On the store (front end) side:

tpl_events_calendar_default.php
  * changed
  : located in: /includes/templates/your_template/templates/
  - main events calendar program for store front side

events_calendar_include_defines.php
  * changed
  : located in: /includes/languages/english/extra_definitions/your_template/
  - hold english language php DEFINEs for configurable options in the events calendar

events_calendar_functions.php
  * changed
  : located in: /includes/functions/extra_functions/
  - holds functions shared by events calendar module 
> 
> That should do you...
> RusWould it be too much to ask if you could bundle up your changed files in a zip file and attach it to a post here? Ourty please.

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 Apr 2013, 2:56 AM
#344
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

Would it be too much to ask if you could bundle up your changed files in a zip file and attach it to a post here? Ourty please.

This is the front end, back end is still messy.

Attachment 12343

13 Apr 2013, 6:08 PM
#345
dw08gm avatar

dw08gm

Totally Zenned

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

Re: Event Calendar v3

DivaVocals:

Help me understand what the end goal is here.. Is this code supposed to make the image proportions match the inner div proportions (ie use the browser tags to "artificially" re-size the images)?? So if I am understanding that this is the end goal, if the inner div has a height attribute of 500px and a width attribute of 300px the image browser height and width tags need to match THOSE proportions REGARDLESS as to what the actual image size is??? Am I understanding this correctly??:lookaroun

My code fits larger images only to the encapsulating divs, with scope to further reduce image size in img.c1. Images smaller than the enscapsulating divs do not get resized, unless forced by img.c1. The % values make for fluid and flexible, so there is no need to introduce actual image dimensions or limits. Image proportions will be maintained throughout.

If you gradually shrink your webpage to a fraction of screen size in a series of steps, at some point you should see the image size begin to shrink once you get below the css width or (better still) max-width setting for body and html (but then you may not have defined this as I have done.) FWIW By applying this and similar code wherever possible throughout, my template has become totally fluid and flexible, and can be shrunk down to about 75mm or 3 inches in actual width without anything breaking, overlapping or otherwise ruining layout. Even the sidecolumns shrink proportionally. This is why prescribing actual image dimensions to fit a page is of no real concern to me and, as long as I keep overall image sizes below 400kb (usually < 200kb), bandwidth use becomes almost a trivial issue.

My latest css for this is as follows, with only padding added to img.c1 to better accommodate image surrounds.

/* bof scale and fit image to outer div */
.event_image_outer {
	width:100%; 
	margin:1em auto;
	}

.event_image_inner {
	width:98%; 
	margin:1em auto; 
	text-align:center;
	}

img.c1 {
	max-width:90%;  /* max-width determines final width, adjust % to suit */
	margin:0em auto; 
	padding:0.25em;
	}
/* eof scale and fit image to outer div  */

Hope this helps.

13 Apr 2013, 6:57 PM
#346
dw08gm avatar

dw08gm

Totally Zenned

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

Re: Event Calendar v3

LaCamus:

//rus.02:start
//
function to decipher images verses docs
//** a different version of this function is also used (at the end of file) in admin/events_manager.php
function event_flink_small($inff, $alt='', $params='', $usew=false) {
$events_img_exts = strtolower(trim(EVENTS_IMAGE_EXTS));
$events_oth_exts = strtolower(trim(EVENTS_OTHER_EXTS));
$events_all_exts = trim($events_img_exts . ' ' . $events_oth_exts);
$orf = trim($inff);
$wf = DIR_WS_IMAGES .'events_images/' . $orf;
if ($orf=='') {
return '';
} else {
$fileext = strtolower(strrchr($orf, "."));
if ($events_all_exts=='' || in_array($fileext,explode(" ",$events_img_exts))) { //** it's an image or everything is considered an image
$dumi = ($usew ? zen_image_OLD($wf, $alt, '', '', $params) : ('<img src="'.$wf.'" alt="'.$alt.'" title=" '.$alt.' " '.$params.' />'));
return $dumi;
} else { //** must be other file type
$dumi = '<a href="' . $wf . '" target="_blank">' . zen_image(DIR_WS_IMAGES .'events_images/event_cal_info_doc.png', $alt, '', '', $params) . '</a>';
return $dumi;
}
}
}
//**rus.02:stop


I can now confirm the above code works for me. 
Previously I had to set Admin > Images > Image - Use proportional images on products & categories to 1 to maintain events image proportions, but have now set this switch to 0, without any detrimental effects so far.

> **LaCamus:**
>
> Then...
> in: includes/templates/your_template/templates/tpl_events_calendar_default.php```
  <div class="event_image_outer">
    <div class="event_image_inner">
      <?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1" hspace="0" vspace="0"'); ?>
    </div>
    <div class="clearLeft"> </div>
  </div>
``` ...will work.
> 
> For those who still want to utilize the auto size detection feature of zen carts' image functions, they should use:```
  <div class="event_image_outer">
    <div class="event_image_inner">
      <?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1" hspace="0" vspace="0"',true); ?>
    </div>
    <div class="clearLeft"> </div>
  </div>
```Thanks,
> Rus

I applied the first option above (did not quite understand the second) and confirm it also works for me. I then removed the hspace="0" vspace="0" part from your code and also found no problem. Previously, when I had the double <img> tags, I could not get event images to show without this snippet, but now the following works:

<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1"'); ?>



Now if I may bother you with another request. In the sidebox, a user can lookup events for a certain month and year via a series of dropdowns located immediately below the calendar. However, upon selecting an event from the results returned, or subsequently clicking any other link for that matter, the selected month and year are returned to their default settiings (ie current month and year), which means that a user must reselect the same month and year to view additional events that the selected month/year may have contained. What I would like is for the selected month and year to remain set for the duration of the session or until the user decides to change these selections again. I believe the file to do this is:
includes/templates/YourTemplate/template/tpl_events_calendar_include_default.php.

Also, in Admin > Extras > Events Manager, when no manufacturer or catalog/product has been selected, can we have a "None selected" status displayed in the last line of the Store Link table. ATM this line does not appear unless a manufacturer or catalog/product is selected.

Thanks for posting your latest update.

Cheers
13 Apr 2013, 9:58 PM
#347
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

dw08gm:

I can now confirm the above code works for me.
Previously I had to set Admin > Images > Image - Use proportional images on products & categories to 1 to maintain events image proportions, but have now set this switch to 0, without any detrimental effects so far.

I applied the first option above (did not quite understand the second) and confirm it also works for me. I then removed the hspace="0" vspace="0" part from your code and also found no problem. Previously, when I had the double <img> tags, I could not get event images to show without this snippet, but now the following works:```

<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1"'); ?>
> Now if I may bother you with another request. In the sidebox, a user can lookup events for a certain month and year via a series of dropdowns located immediately below the calendar. However, upon selecting an event from the results returned, or subsequently clicking any other link for that matter, the selected month and year are returned to their default settiings (ie current month and year), which means that a user must reselect the same month and year to view additional events that the selected month/year may have contained. What I would like is for the selected month and year to remain set for the duration of the session or until the user decides to change these selections again. I believe the file to do this is:
> includes/templates/YourTemplate/template/tpl_events_calendar_include_default.php.Should be able to make it happen...this will most likely entail the use of cookies.
> Also, in Admin > Extras > Events Manager, when no manufacturer or catalog/product has been selected, can we have a "None selected" status displayed in the last line of the Store Link table. ATM this line does not appear unless a manufacturer or catalog/product is selected.Easy enough.

Thank,
Rus
14 Apr 2013, 8:38 AM
#348
dw08gm avatar

dw08gm

Totally Zenned

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

Re: Event Calendar v3

FWIW

For greater clarity or uniqueness, the tag img.c1
in \includes\templates\YourTemplate\css\stylesheet_events_calendar.css
could be changed to img.eci or img.event_calendar_image

which would then require changing class="c1" in
\includes\templates\YourTemplate\templates\tpl_events_calendar_default.php
to class="eci" or class="event_calendar_image" respectively.

the second link, with "TRUE" as the last parameter, uses the old zen_image function which imbeds the image's native height and width in the IMG tag.

Thanks, I had only traced as far as

function event_flink_small($inff, $alt='', $params='', $usew=false) {

in \includes\functions\extra_functions\events_calendar_functions.php

Cheers

15 Apr 2013, 10:16 AM
#349
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

LaCamus:

This is the front end, back end is still messy.

Here's the whole thing: Attachment 12352

  1. Has the fix/request on the link section to now show "no link selected" (not just when added and deleted).
  2. Also in link section, drop downs will show "None" at the top if not selected (except for products, those are based on a manufacturer or category being selected).
  3. Fixed problems at the bottom of the "review" page with the image resize info/warning boxes.
  4. Includes the changes to the Image function on the front end to support dw08gm's request.
  5. Has dw08gm's view long date option in there.
  6. Took CSS out in vicinity of my changes and moved to separate file, still some inline...needed in some special situations. (back end)
  7. Moved majority of javascript out into another file (back end)
  8. Moved some larger php functions out into another file (front & back)
  9. I think I caught most (maybe all) of my text, even in the drop downs, for the code I created/changed and moved it to the language file. (back end)
  10. I made a number of table and formatting changes for the screen layouts (admin side only), you may want to check to see if they look ok. For one, you will notice the default table on all events pages now stretches to 100%.
  11. Worked out "some" of the issues with checking the start and end dates before moving to the "review" page (javascript errors instead of php).
  12. Changed "delete event" section to provide user with info on what he/she is deleting (just in case).
  13. Put in the ability to delete other "matching" events that have the same title and creation date (needed for #17, see below). Warns before pulling the trigger.
  14. I think I worked out all the cross-browser issues. I would have been finished yesterday if it wasn't for this. I had to compromise(give up) on a couple of issues.
  15. Added some functionality for popup errors/warnings and help, incorporated into #17.
  16. Added the ability to copy an event. Allows you to grab an existing event and use it's data to seed a new event. (Would you believe me if I told you I pulled this off with just 3 lines of code?)
  17. The big one is the ability to add multiple events, this is not a TRUE recurring events mod, meaning that 1 event would be saved to the db and dates would be calculated from it on the front end when building the calendars/lists. What is does is calculate a # of dates into the future (configurable based on your input) and sticks them in the database, 1 event for each newly calculated date. Has the ability to see all the dates before they are added (using popup help...#15). Gives you info about your start & end dates which is completely configurable in the language file (includes the use of mergeable variables).

Things that need to be done....

  1. More testing to make sure it works for everyone else.
  2. There are lots of align and valign cellpadding border, etc. tags in the tables that will have to be addressed at some point.
  3. More inline css can still come out.
  4. The ability to delete and select (link back to) existing image files.
  5. Maybe the start/end date info mod should be added to the base edit window (currently it only shows when you click on "Multiple Events").

Testing encouraged, constructive criticism welcome...

Thanks,
Rus

15 Apr 2013, 10:48 AM
#350
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

LaCamus:

Things that need to be done....

  1. More testing to make sure it works for everyone else.
  2. There are lots of align and valign cellpadding border, etc. tags in the tables that will have to be addressed at some point.
  3. More inline css can still come out.
  4. The ability to delete and select (link back to) existing image files.
  5. Maybe the start/end date info mod should be added to the base edit window (currently it only shows when you click on "Multiple Events").
    Two very important things I left off the to do list...
  1. Move a # of the configurable defines to the admin->configuration drop down menu.
  2. Change the store-front side-box calendar build process so that no default zen cart modules have to be altered (store owners won't have to edit source code).

Those 2 things will make this module very popular for the layman...and the fact that dw08gm has it upgraded to work with 1.5.1.

Thanks,
Rus

15 Apr 2013, 1:43 PM
#351
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:

the second link, with "TRUE" as the last parameter, uses the old zen_image function which imbeds the image's native height and width in the IMG tag.Just got back from Nashville and I'm wading through all of the latest posts.. Have a question regarding the above comment.. While I understand what dw08gm is stating how image re-sizing works for him. My concern is that BOTH of the options for the display be available for users of this module (where the last parameter = "TRUE"). It's not clear if the latest code allows for BOTH options.. :smile: I will download tonight of course to see..

I am pushing this point because the reason to include the image and height in the image tag is not in support of artificially resizing the image display in the browser, but also in support of other user agents (e.g. a speech browser) which should have that information in order to relate it to the user. I understand that dw08gm is trying to maintain a fluid design for HIS site, but I need to point out that currently NONE of the available free and paid templates (ala Template Monstrosity and their ilk) are responsive design templates.

I would suggest that resolving for a responsive design issue in this ONE module will not make the rest of most user's of this module's site fluid/responsive.. There are other means/techniques which will bring responsive design to the entire site (I personally am testing a jQuery solution which will help make images responsive), and it is my understanding that the upcoming v1.6 release of Zen Cart will include a replacement for the default classic template which is a responsive design template.

My point is can the Events Calendar include BOTH image display options for those shopowners who want to maintain compatibility with other user agents. Is there a reason to not include BOTH options??:D

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.

15 Apr 2013, 3:34 PM
#352
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

The alpha release I put up earlier supports both.

15 Apr 2013, 5:59 PM
#353
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:

The alpha release I put up earlier supports both.

Cool!! Will be testing tonight.. :smile: Have I mentioned how much you rock lately!!! :smile:

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.

15 Apr 2013, 11:42 PM
#354
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

LaCamus:

Here's the whole thing: Attachment 12352

  1. Has the fix/request on the link section to now show "no link selected" (not just when added and deleted).
  2. Also in link section, drop downs will show "None" at the top if not selected (except for products, those are based on a manufacturer or category being selected).
  3. Fixed problems at the bottom of the "review" page with the image resize info/warning boxes.
  4. Includes the changes to the Image function on the front end to support dw08gm's request.
  5. Has dw08gm's view long date option in there.
  6. Took CSS out in vicinity of my changes and moved to separate file, still some inline...needed in some special situations. (back end)
  7. Moved majority of javascript out into another file (back end)
  8. Moved some larger php functions out into another file (front & back)
  9. I think I caught most (maybe all) of my text, even in the drop downs, for the code I created/changed and moved it to the language file. (back end)
  10. I made a number of table and formatting changes for the screen layouts (admin side only), you may want to check to see if they look ok. For one, you will notice the default table on all events pages now stretches to 100%.
  11. Worked out "some" of the issues with checking the start and end dates before moving to the "review" page (javascript errors instead of php).
  12. Changed "delete event" section to provide user with info on what he/she is deleting (just in case).
  13. Put in the ability to delete other "matching" events that have the same title and creation date (needed for #17, see below). Warns before pulling the trigger.
  14. I think I worked out all the cross-browser issues. I would have been finished yesterday if it wasn't for this. I had to compromise(give up) on a couple of issues.
  15. Added some functionality for popup errors/warnings and help, incorporated into #17.
  16. Added the ability to copy an event. Allows you to grab an existing event and use it's data to seed a new event. (Would you believe me if I told you I pulled this off with just 3 lines of code?)
  17. The big one is the ability to add multiple events, this is not a TRUE recurring events mod, meaning that 1 event would be saved to the db and dates would be calculated from it on the front end when building the calendars/lists. What is does is calculate a # of dates into the future (configurable based on your input) and sticks them in the database, 1 event for each newly calculated date. Has the ability to see all the dates before they are added (using popup help...#15). Gives you info about your start & end dates which is completely configurable in the language file (includes the use of mergeable variables).

Things that need to be done....

  1. More testing to make sure it works for everyone else.
  2. There are lots of align and valign cellpadding border, etc. tags in the tables that will have to be addressed at some point.
  3. More inline css can still come out.
  4. The ability to delete and select (link back to) existing image files.
  5. Maybe the start/end date info mod should be added to the base edit window (currently it only shows when you click on "Multiple Events").

Testing encouraged, constructive criticism welcome...

Thanks,
Rus

This version also includes the mod to "jump over" the event list (and go straight to the event) when you click on a day that has only one event (as a defined option).

16 Apr 2013, 3:11 AM
#355
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

Works great, spectacularly even, especially impressed by the code to copy/add multiple events.

However

  1. Issue of GIF/PNG transparency areas blackening on resize not resolved.
  2. Month/Year dropdown selections not preserved, but are changed back to current month/year upon reloading page.

Are these two problems likely to be resolved any time soon?

Cheers

16 Apr 2013, 8:33 AM
#356
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:

Two very important things I left off the to do list...

  1. Move a # of the configurable defines to the admin->configuration drop down menu.
    I've got this working and I included changes to the SQL file to support this. In support of this I made several changes to some of the admin extra_datafiles files to align things up a little more consistently (moved defines out of the admin extra_definitions database definition file for example)
//  Moved to YOUR_ADMIN/includes/languages/english/extra_definitions/events_manager.php
//define('BOX_EXTRAS_EVENTS_MANAGER', 'Events Manager');
//define('FILENAME_EVENTS_MANAGER', 'events_manager.php');

and YOUR_ADMIN/includes/languages/english/extra_definitions/events_manager.php now includes:

    define('BOX_CONFIGURATION_EVENTS_CALENDAR', 'Events Calendar Settings');
    define('BOX_EXTRAS_EVENTS_MANAGER', 'Events Manager');
    define('FILENAME_EVENTS_MANAGER', 'events_manager.php');

Also I found this and commented it out:

//    define('BOX_TOOLS_EVENTS_MANAGER', 'Events Manager'); //removed because as far as I can tell this is not being used

In the configuration settings, I included defines from the store side extra_definitions file, and I also modified the SQL so that the Events Calendar page key is now called eventsCalendar and the configuration options page key is configEventsCalendar. This makes the SQL and page keys for this module consistent with how other default Zen Cart page keys are set up (particularly the ones for configuration menu options)

that said I did not include the month defines (wanna look at the best way how to make that an admin option to support a choice between the long and short array). I also did not include the filetypes from the admin or store side in the Event Calendar configuration settings. Not sure if that should be an admin option.. thoughts on this everyone??

The following settings are included in the Events Calendar configuration setting menu and commented out in the defines files:

//    define(EVENTS_FILE_MAX_WIDTH, '800');                      //** rus.02: for max image width in px, check on uploads, change on review
//    define(EVENTS_FILE_MAX_HEIGHT,'600');                      //** rus.02: for max image height in px, check on uploads, change on review
//    define(EVENTS_FILE_RESIZE, true);                          //** rus.02: for image resizing, set to false to do/show no resizing 
//    define(EVENTS_MAX_RECURS,'52');                            //** rus.03: max possible # of recurring events to add to db at one time
// First day of the week in calendar, eg 0=Sunday, 1=Monday, etc;
//define('FIRST_DAY_OF_WEEK', 0);
// No of years to be shown in sidebox year drop-down
//define('NUMBER_OF_YEARS', 5);
// Month defines in sidebox month drop-down
define('MONTHS_SHORT_ARRAY', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
// define('MONTHS_LONG_ARRAY', 'January,February,March,April,May,June,July,August,September,October,November,December');
//**rus.03: when query returns only 1 event, jump over the event list (false=always show list on single day click)
//define(EVENTS_SINGLE_JUMP, true);
//**rus.03: use long dates (includes day of week) when displaying events
//define(EVENTS_LONG_DATES, true);

dw08gm:

but now the following works:

<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1"'); ?>

> **DivaVocals:**
>
> My point is can the Events Calendar include BOTH image display options  for those shopowners who want to maintain compatibility with other user  agents. Is there a reason to not include BOTH options??:D
> **LaCamus:**
>
> The alpha release I put up earlier supports both.

Actually it does support both, but only if one removes the "true" from the code as dw08gm did. So I added an additional admin option that allows the shopowner to chose which option they want without having to edit the code directly at all as follows:
<?php if (EVENTS_DISPLAY_IMAGE_WIDTH_HEIGHT == 'true') { ?>
<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="event_calendar_image"', true); ?>
<?php } else { ?>
<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="event_calendar_image"'); ?>
<?php } ?>
This way BOTH options are supported.. (should make everyone happy and keep novice shopowners out of the code)

> **dw08gm:**
>
> For greater clarity or uniqueness, the tag img.c1 
> in \includes\templates\YourTemplate\css\stylesheet_events_calendar.css
> could be changed to img.eci or img.event_calendar_image
> 
> which would then require changing class="c1" in
> \includes\templates\YourTemplate\templates\tpl_events_calendar_default.php
> to class="eci" or class="event_calendar_image" respectively.
I agree.. I made this change and replaced "c1" class with "event_calendar_image". The "c1" class is a bit vaguely named, and this is a LOT more explicit..

Gonna post the files I am working off of in a moment.. I need a bio break and a stretch..:smile:

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.

16 Apr 2013, 9:22 AM
#357
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

dw08gm:

Rus

Works great, spectacularly even, especially impressed by the code to copy/add multiple events.

However

  1. Issue of GIF/PNG transparency areas blackening on resize not resolved.
  2. Month/Year dropdown selections not preserved, but are changed back to current month/year upon reloading page.

Are these two problems likely to be resolved any time soon?

Cheers

  1. I will look at soon...next few days.
  2. Not "as" familiar with the front side, maybe this is going to be easy, I'm thinking its going to need some cookies...still looking at this week.
16 Apr 2013, 9:28 AM
#358
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

Okay.. I got the install and uninstall SQL all dialed in now.. Admin menu works great..

Gotta post this and scoot.. I have to be up in 3 hours for work.. What's attached is the FULL fileset with all of Rus' code and the minor changes I made including the addition of an admin menu..

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.

16 Apr 2013, 9:37 AM
#359
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

I've got this working and I included changes to the SQL file to support this. In support of this I made several changes to some of the admin extra_datafiles files to align things up a little more consistently (moved defines out of the admin extra_definitions database definition file for example)

// Moved to YOUR_ADMIN/includes/languages/english/extra_definitions/events_manager.php
//define('BOX_EXTRAS_EVENTS_MANAGER', 'Events Manager');
//define('FILENAME_EVENTS_MANAGER', 'events_manager.php');

> 
> and YOUR_ADMIN/includes/languages/english/extra_definitions/events_manager.php now includes:
> ```
    define('BOX_CONFIGURATION_EVENTS_CALENDAR', 'Events Calendar Settings');
    define('BOX_EXTRAS_EVENTS_MANAGER', 'Events Manager');
    define('FILENAME_EVENTS_MANAGER', 'events_manager.php');

Also I found this and commented it out:

// define('BOX_TOOLS_EVENTS_MANAGER', 'Events Manager'); //removed because as far as I can tell this is not being used

> 
> In the configuration settings, I included defines from the store side extra_definitions file, and I also modified the SQL so that the Events Calendar page key is now called **eventsCalendar** and the configuration options page key is **configEventsCalendar**. This makes the SQL and page keys for this module consistent with how other default Zen Cart page keys are set up (particularly the ones for configuration menu options)
> 
> that said I did not include the month defines (wanna look at the best way how to make that an admin option to support a choice between the long and short array). I also did not include the filetypes from the admin or store side in the Event Calendar configuration settings. Not sure if that should be an admin option.. thoughts on this everyone??I would say no to the images (those are pretty standard worlwide) and yes to the others...ex: some may only want to use pdf's.

> The following settings are included in the Events Calendar configuration setting menu and commented out in the defines files:
> 
> ```
//    define(EVENTS_FILE_MAX_WIDTH, '800');                      //** rus.02: for max image width in px, check on uploads, change on review
//    define(EVENTS_FILE_MAX_HEIGHT,'600');                      //** rus.02: for max image height in px, check on uploads, change on review
//    define(EVENTS_FILE_RESIZE, true);                          //** rus.02: for image resizing, set to false to do/show no resizing 
//    define(EVENTS_MAX_RECURS,'52');                            //** rus.03: max possible # of recurring events to add to db at one time
// First day of the week in calendar, eg 0=Sunday, 1=Monday, etc;
//define('FIRST_DAY_OF_WEEK', 0);
// No of years to be shown in sidebox year drop-down
//define('NUMBER_OF_YEARS', 5);
// Month defines in sidebox month drop-down
define('MONTHS_SHORT_ARRAY', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
// define('MONTHS_LONG_ARRAY', 'January,February,March,April,May,June,July,August,September,October,November,December');
//**rus.03: when query returns only 1 event, jump over the event list (false=always show list on single day click)
//define(EVENTS_SINGLE_JUMP, true);
//**rus.03: use long dates (includes day of week) when displaying events
//define(EVENTS_LONG_DATES, true);

Actually it does support both, but only if one removes the "true" from the code as dw08gm did. So I added an additional admin option that allows the shopowner to chose which option they want without having to edit the code directly at all as follows:

<?php if (EVENTS_DISPLAY_IMAGE_WIDTH_HEIGHT == 'true') { ?>
<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="event_calendar_image"', true); ?>
<?php } else { ?>
<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="event_calendar_image"'); ?>
<?php } ?>
> This way BOTH options are supported.. (should make everyone happy and keep novice shopowners out of the code)
> 
> 
> I agree.. I made this change and replaced "c1" class with "event_calendar_image". The "c1" class is a bit vaguely named, and this is a LOT more explicit..
> 
> Gonna post the files I am working off of in a moment.. I need a bio break and a stretch..:smile:All great stuff...good job.
16 Apr 2013, 6:31 PM
#360
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 would say no to the images (those are pretty standard worlwide) and yes to the others...ex: some may only want to use pdf's.

All great stuff...good job.

Trying to follow in your shoes sir.. :smile:

DivaVocals:

Okay.. I got the install and uninstall SQL all dialed in now.. Admin menu works great..

Gotta post this and scoot.. I have to be up in 3 hours for work.. What's attached is the FULL fileset with all of Rus' code and the minor changes I made including the addition of an admin menu..

Oh and for anyone stumbling into this thread:
If you decide to use ANY of the files posted by either dw08gm, LaCamus, or myself on a LIVE productions store, please know that if you read through the last 4-6 pages of this support thread you will see that these files are in QA testing at the moment and NOT meant to be used on ANYONE's live store.

(let me stress this part again)
The Event Calendar for ZC 1.5.1-v03.zip files are in QA testing at the moment and ARE NOT meant to be used on ANYONE's live store.

That said, anyone who chooses to install a beta version of ANY module on a live store, does so at their own risk and this is not recommended/supported..

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.