Forums / All Other Contributions/Addons / Event Calendar v3

Event Calendar v3

Locked

Views: 68,123

Results 361 to 380 of 500
This thread is locked. New replies are disabled.
16 Apr 2013, 9:28 PM
#361
divavocals avatar

divavocals

Totally Zenned

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

Event Calendar v3

DivaVocals:

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).

So I'm looking at the code in includes/templates/custom_template/templates/tpl_events_calendar_include_default.php. Around line #64 I found this code:

                $monthShort = explode(",", MONTHS_SHORT_ARRAY);
                $month = date('m');
                while (list($key, $value) = each($monthShort))

I'm considering that perhaps I could do something similar to the code I added to **includes/templates/custom_template/templates/tpl_events_calendar_default.php

**```

<?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 } ?>

So to the **tpl_events_calendar_include_default.php** file just below that other block (which starts at line #64) I could add something like this:
            $monthLong = explode(",", MONTHS_LONG_ARRAY);
            $month = date('m');
            while (list($key, $value) = each($monthLong))

With a conditional statement around this whole block tied to an admin configuration setting where if you choose one option you will use the long months and if you choose the other it will give you the short months. (with the default being the short months of course). The admin month defines would remain where they are, (with the LONG months options now uncommented) and this admin option simply allows you to choose one or the other.. If something like this works, I am not sure what this will LOOK like in the sidebox.. (I believe these are the months in the sidebox dropdown??) Will be playing around with this tonight unless I'm dead wrong here and Rus has a BETTER idea how to include these month options as an admin setting..

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.

17 Apr 2013, 3:46 AM
#362
dw08gm avatar

dw08gm

Totally Zenned

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

Re: Event Calendar v3

Hi Diva

includes/templates/custom_template/templates/tpl_events_calendar_include_default.php addresses the sidebox. These months are best kept in their short form to keep the sidebox compact. Another option could be to provide numbered months, although I would prefer the short form.

cheers

17 Apr 2013, 4:25 AM
#363
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

So I'm looking at the code in includes/templates/custom_template/templates/tpl_events_calendar_include_default.php. Around line #64 I found this code:

            $monthShort = explode(",", MONTHS_SHORT_ARRAY);
            $month = date('m');
            while (list($key, $value) = each($monthShort))
> 
> I'm considering that perhaps I could do something similar to the code I added to **includes/templates/custom_template/templates/tpl_events_calendar_default.php
> 
> **```
<?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 } ?>

So to the tpl_events_calendar_include_default.php file just below that other block (which starts at line #64) I could add something like this:

            $monthLong = explode(",", MONTHS_LONG_ARRAY);
            $month = date('m');
            while (list($key, $value) = each($monthLong))
> 
> With a conditional statement around this whole block tied to an admin configuration setting where if you choose one option you will use the long months and if you choose the other it will give you the short months. (with the default being the short months of course). The admin month defines would remain where they are, (with the LONG months options now uncommented) and this admin option simply allows you to choose one or the other.. If something like this works, I am not sure what this will LOOK like in the sidebox.. (I believe these are the months in the sidebox dropdown??) Will be playing around with this tonight unless I'm dead wrong here and Rus has a BETTER idea how to include these month options as an admin setting..

That program is for creating the side box and those month names are for the drop down...I tried it with the long and it fits for my scenario.  But you could write it like this (keep in mind $monthShort is just an array, once you set it to the exploded define there's no need to follow it, its just a name, meaning there is no need to change that 3rd line.)....this is and example if you called the define variable EVENTS_LONG_MONTH_SELECT ("true" meaning use long month names):
in  tpl_events_calendar_include_default.php```
               $monthShort = explode(",", (EVENTS_LONG_MONTH_SELECT ? MONTHS_LONG_ARRAY : MONTHS_SHORT_ARRAY));

in the defines

// 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');
define('EVENTS_LONG_MONTH_SELECT',true);

Maybe we should stick EVENTS_ in front of those define names...I searched and tpl_events_calendar_include_default.php is the only program to use it.

Another thing to consider would be to use the month names already defined with the base package of zen carts, that way it only has to be changed once...plus if someone already has another language in place and drops this module in then they are good as far as months. I'm not a language expert, but does every language use the 1st 3 letters for the short version of month names? If so we could create the short month just by cutting the rest.

Last thing: If they want the option of long/short names for the drop down, do you think they want them for the side calendar and the yearly views too? If you make the following change to tpl_events_calendar_include_default.php and tpl_events_calendar_default.php it will change all of them...
Just add the line below after "$cal = new Calendar;" in both files:```
$cal = new Calendar;
[B]$cal->setMonthNames(explode(",", (EVENTS_LONG_MONTH_SELECT ? MONTHS_LONG_ARRAY : MONTHS_SHORT_ARRAY))); //**rus: via diva: add[/B]


Thanks,
Rus
17 Apr 2013, 4:49 AM
#364
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

Just thinking we(maybe mostly me) are making this more complicated then it needs to be. Why not just have 2 fields:```
define('[B]EVENTS_MONTHS_DROP_DOWNS[/B]', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
define('[B]EVENTS_MONTHS_TITLES[/B]', 'January,February,March,April,May,June,July,August,September,October,November,December');

Then in tpl_events_calendar_default.php after "$cal = new Calendar;":```
$cal = new Calendar;
[B]$cal->setMonthNames(explode(",", EVENTS_MONTHS_TITLES));  //**rus: via diva: add[/B]

Then in tpl_events_calendar_default.php
after "$cal = new Calendar;":$cal = new Calendar; [B]$cal->setMonthNames(explode(",", EVENTS_MONTHS_TITLES)); //**rus: via diva: add[/B]and for the drop downs:```
[B]$monthShort = explode(",",EVENTS_MONTHS_DROP_DOWNS);[/B]
$month = date('m');
while (list($key, $value) = each($monthShort))


Simple, now anyone can come in, see what they are, and change to whatever, numbers, short, long, etc.

Rus
17 Apr 2013, 5:02 AM
#365
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:

Hi Diva

includes/templates/custom_template/templates/tpl_events_calendar_include_default.php addresses the sidebox. These months are best kept in their short form to keep the sidebox compact. Another option could be to provide numbered months, although I would prefer the short form.

cheers
Understood.. again the idea here is to make this flexible and provide folks options that they can select for their individual store preferences. If you like the short form, then there's nothing to do since it will be the default, but for folks who would like the longer form, they can easily configure that in the module's admin settings.. This way everyone gets what they want..

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.

17 Apr 2013, 5:14 AM
#366
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:

That program is for creating the side box and those month names are for the drop down...I tried it with the long and it fits for my scenario. But you could write it like this (keep in mind $monthShort is just an array, once you set it to the exploded define there's no need to follow it, its just a name, meaning there is no need to change that 3rd line.)....this is and example if you called the define variable EVENTS_LONG_MONTH_SELECT ("true" meaning use long month names):
in tpl_events_calendar_include_default.php```
$monthShort = explode(",", (EVENTS_LONG_MONTH_SELECT ? MONTHS_LONG_ARRAY : MONTHS_SHORT_ARRAY));

> 
> in the defines 
> ```
// 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');
define('EVENTS_LONG_MONTH_SELECT',true);

Maybe we should stick EVENTS_ in front of those define names...I searched and tpl_events_calendar_include_default.php is the only program to use it.

Another thing to consider would be to use the month names already defined with the base package of zen carts, that way it only has to be changed once...plus if someone already has another language in place and drops this module in then they are good as far as months. I'm not a language expert, but does every language use the 1st 3 letters for the short version of month names? If so we could create the short month just by cutting the rest.

Last thing: If they want the option of long/short names for the drop down, do you think they want them for the side calendar and the yearly views too? If you make the following change to tpl_events_calendar_include_default.php and tpl_events_calendar_default.php it will change all of them...
Just add the line below after "$cal = new Calendar;" in both files:```
$cal = new Calendar;
[B]$cal->setMonthNames(explode(",", (EVENTS_LONG_MONTH_SELECT ? MONTHS_LONG_ARRAY : MONTHS_SHORT_ARRAY))); //**rus: via diva: add[/B]

> 
> Thanks,
> Rus

> **LaCamus:**
>
> Just thinking we(maybe mostly me) are making this more complicated then it needs to be.  Why not just have 2 fields:```
define('[B]EVENTS_MONTHS_DROP_DOWNS[/B]', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
define('[B]EVENTS_MONTHS_TITLES[/B]', 'January,February,March,April,May,June,July,August,September,October,November,December');

Then in tpl_events_calendar_default.php after "$cal = new Calendar;":```
$cal = new Calendar;
[B]$cal->setMonthNames(explode(",", EVENTS_MONTHS_TITLES)); //**rus: via diva: add[/B]

> Then in tpl_events_calendar_default.php
> after "$cal = new Calendar;":```
$cal = new Calendar;
[B]$cal->setMonthNames(explode(",", EVENTS_MONTHS_TITLES));  //**rus: via diva: add[/B]
```and for the drop downs:```
                [B]$monthShort = explode(",",EVENTS_MONTHS_DROP_DOWNS);[/B]
                $month = date('m');
                while (list($key, $value) = each($monthShort))

Simple, now anyone can come in, see what they are, and change to whatever, numbers, short, long, etc.

Rus
thanks for setting me straight on the correct code. as you know I am a software BA, not a developer.. (I just play with them at work..:laugh:) Okay so the first post I totally understood.. but the second one ya lost me.. kinda.. I'm trying to figure out how that second one ties into an admin setting for selecting long versus short months.. and I am HELLA confused.. :shocking: To quote Denzel from the movie "Philadelphia",

"Can ya explain it to me like I'm a 3 year old" :laugh:

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.

17 Apr 2013, 11:12 AM
#367
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

Notta problem....
Actually if you want to make it admin menu configurable then we need to do it the first way. I was thinking that this would most likely be set once at setup, and didn't need to be in the admin menu configs. But it doesn't matter either way to me. It could be argued both ways. The second way lets them choose one define for titles at the top of calendars, the other for the drop down (which is currently the short names). If you want both long then just type the full month names in both defines. When dw08 mentioned possibly using #'s for the short version I figured just have the 2 defines and let them change either. The 1st way I setup lets them flip ALL month names to short or long, titles and drop down the same.

But like I said, let me know....I am finished the cookies...scratch that, session variables mod to keep month, day, year throughout the users stay. As soon as you tell me option 1 or 2 (for month names) I can put in the code changes and upload the front side programs again.

BTW, I had to put in another define for the first letter of each day name:```
define('EVENTS_WEEKDAY_FIRST_CHARS', 'S,M,T,W,T,F,S');


Something to add to our list:
The Calendar class is very inefficient.  It hits the sql server for every single day while building the monthly calendars...that's a minimum of 28 hits to the db every time you update your page (if using the side box calendar).  When you click on a year that's 390+ hits to the db.  It should hit it once per month calendar at most and then once when looking at the year.  Something to keep in mind.

Thanks,
Rus
17 Apr 2013, 2:03 PM
#368
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:

Notta problem....
Actually if you want to make it admin menu configurable then we need to do it the first way. I was thinking that this would most likely be set once at setup, and didn't need to be in the admin menu configs. But it doesn't matter either way to me. It could be argued both ways. The second way lets them choose one define for titles at the top of calendars, the other for the drop down (which is currently the short names). If you want both long then just type the full month names in both defines. When dw08 mentioned possibly using #'s for the short version I figured just have the 2 defines and let them change either. The 1st way I setup lets them flip ALL month names to short or long, titles and drop down the same.

But like I said, let me know....I am finished the cookies...scratch that, session variables mod to keep month, day, year throughout the users stay. As soon as you tell me option 1 or 2 (for month names) I can put in the code changes and upload the front side programs again.

BTW, I had to put in another define for the first letter of each day name:```
define('EVENTS_WEEKDAY_FIRST_CHARS', 'S,M,T,W,T,F,S');

> 
> Something to add to our list:
> The Calendar class is very inefficient.  It hits the sql server for every single day while building the monthly calendars...that's a minimum of 28 hits to the db every time you update your page (if using the side box calendar).  When you click on a year that's 390+ hits to the db.  It should hit it once per month calendar at most and then once when looking at the year.  Something to keep in mind.
> 
> Thanks,
> Rus
Like the software I typically spec out requirements for in my day gig, I am a fan of highly configurable software options for end users where it makes sense to do so.. I am also not a fan of novice shopowners having to modify PHP pages in order to setup options they want to use in their shops.. So I like to move these kinds of options to the admin settings page so that the shopowner can select the option they want and the code handles the rest..

Now I understand why I didn't understand the second post.. :laugh:

Okay so that said I do like the idea of having multiple options for both the month titles at the top of the calendar as well as the dropdowns.. What code would we need to achieve this using a define that the shopowner can use to chose his option for the month title and his option for the month dropdowns??

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.

17 Apr 2013, 4:00 PM
#369
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:

Like the software I typically spec out requirements for in my day gig, I am a fan of highly configurable software options for end users where it makes sense to do so.. I am also not a fan of novice shopowners having to modify PHP pages in order to setup options they want to use in their shops.. So I like to move these kinds of options to the admin settings page so that the shopowner can select the option they want and the code handles the rest..

Now I understand why I didn't understand the second post.. :laugh:

Okay so that said I do like the idea of having multiple options for both the month titles at the top of the calendar as well as the dropdowns.. What code would we need to achieve this using a define that the shopowner can use to chose his option for the month title and his option for the month dropdowns??

Nevermind this.. It appears that the answer was in your other post.. LOL (see in red.. are these the right changes to make??)

LaCamus:

That program is for creating the side box and those month names are for the drop down...I tried it with the long and it fits for my scenario. But you could write it like this (keep in mind $monthShort is just an array, once you set it to the exploded define there's no need to follow it, its just a name, meaning there is no need to change that 3rd line.)....this is and example if you called the define variable EVENTS_LONG_MONTH_SELECT ("true" meaning use long month names):
in tpl_events_calendar_include_default.php

$monthShort = explode(",", (EVENTS_LONG_MONTH_DROPDOWNS ? EVENTS_MONTHS_LONG_ARRAY : EVENTS_MONTHS_SHORT_ARRAY));

> 
> in the defines 
> ```
// Month defines in sidebox month drop-down
define('EVENTS_MONTHS_SHORT_ARRAY', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
define('EVENTS_MONTHS_LONG_ARRAY', 'January,February,March,April,May,June,July,August,September,October,November,December');
define('EVENTS_LONG_MONTH_DROPDOWNS',true);
define('EVENTS_LONG_MONTH_TITLES',true);

Maybe we should stick EVENTS_ in front of those define names...I searched and tpl_events_calendar_include_default.php is the only program to use it.

Another thing to consider would be to use the month names already defined with the base package of zen carts, that way it only has to be changed once...plus if someone already has another language in place and drops this module in then they are good as far as months. I'm not a language expert, but does every language use the 1st 3 letters for the short version of month names? If so we could create the short month just by cutting the rest.

Last thing: If they want the option of long/short names for the drop down, do you think they want them for the side calendar and the yearly views too? If you make the following change to tpl_events_calendar_include_default.php and tpl_events_calendar_default.php it will change all of them...
Just add the line below after "$cal = new Calendar;" in both files:```
$cal = new Calendar;
[B]$cal->setMonthNames(explode(",", ([/B][B]EVENTS_LONG_MONTH_TITLES[/B][B] ? EVENTS_MONTHS_LONG_ARRAY : EVENTS_MONTHS_SHORT_ARRAY))); //**rus: via diva: add[/B]

> 
> Thanks,
> Rus

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.

17 Apr 2013, 4:16 PM
#370
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

Nevermind this.. It appears that the answer was in your other post.. LOL (see in red.. are these the right changes to make??)

Wait, here's the new files....I put in two options, one for dropdowns and 1 for titles...this also has the mod so the month/year stay selected throughout the users session:
Attachment 12361

Here's the fix for the image manipulator, just copy over the old in your_admin/includes/classes/
Attachment 12362

Thanks,
Rus

17 Apr 2013, 4:32 PM
#371
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

My post expired so I wanted to add this.. Also I need to explain why I am advocating for admin settings versus having novice shopowners edit PHP files.. I know from experience of being a member of this community that most novice web designers and shopowners often run afoul of things when they make edits in PHP files. Putting admin and configuration items into a settings menu minimizes this possibility as fewer problems are seen when these kinds of configuration/options are properly put into an admin setting menu. The menu provides shopwoners easy access to set things up the way they want, and they do not have to monkey with the code to get there.. Options like day long versus short months should be made an admin option that is accessed via an admin menu so that novice shopowners will have fewer issues installing and setting this module up.

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.

17 Apr 2013, 4:39 PM
#372
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:

Wait, here's the new files....I put in two options, one for dropdowns and 1 for titles...this also has the mod so the month/year stay selected throughout the users session:
Attachment 12361

Here's the fix for the image manipulator, just copy over the old in your_admin/includes/classes/
Attachment 12362

Thanks,
Rus
Cool.. I'll incorporate this into the my working files and I'll update the admin settings menu script to add the new options.. I may even go an extra step to include an auto-installer file for the admin menu script to further reduce installation errors (this is especially helpful for novice shopowners)

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.

17 Apr 2013, 4:41 PM
#373
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:

Something to add to our list:
The Calendar class is very inefficient. It hits the sql server for every single day while building the monthly calendars...that's a minimum of 28 hits to the db every time you update your page (if using the side box calendar). When you click on a year that's 390+ hits to the db. It should hit it once per month calendar at most and then once when looking at the year. Something to keep in mind.

Didn't want this to get lost because you make a VERY good point.. Is this something that you are working on for this module or is it something you are raising that should be put on a to-do later list??

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.

17 Apr 2013, 4:50 PM
#374
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

Didn't want this to get lost because you make a VERY good point.. Is this something that you are working on for this module or is it something you are raising that should be put on a to-do later list??

We should probably pause here and regroup...get all the mods put together so everyone can start working off the same version.

17 Apr 2013, 4:51 PM
#375
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:

We should probably pause here and regroup...get all the mods put together so everyone can start working off the same version.I agree..

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.

18 Apr 2013, 1:22 AM
#376
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

I agree..Dang it, all right, you convinced me. I'll optimize the Calendar class, do the mini file handler, attempt to separate the code from tpl_main_page.php... and then pause.

18 Apr 2013, 1:41 AM
#377
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:

Dang it, all right, you convinced me. I'll optimize the Calendar class, do the mini file handler, attempt to separate the code from tpl_main_page.php... and then pause.

:laugh: We finally GOTCHA!!! :laugh:

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.

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

Wait, here's the new files....I put in two options, one for dropdowns and 1 for titles...this also has the mod so the month/year stay selected throughout the users session:
Attachment 12361

Here's the fix for the image manipulator, just copy over the old in your_admin/includes/classes/
Attachment 12362

Thanks,
Rus

Brilliant, will check these tonight. Despite our time differences, I sense the events_calendar camel is almost in train.

Cheers

18 Apr 2013, 4:37 PM
#379
dw08gm avatar

dw08gm

Totally Zenned

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

Re: Event Calendar v3

Issues considered fixed:

Admin Side:
GIF/PNG transparencies now preserved upon resizing these types of transparent images in event manager.

Sidebox
Month/Year dropdown selections now retained through subsequent page refreshing or link clicking, and can now be used for greater calendar control (selecting specific calendar months/years, calendar years, and for easily returning to view multiple events within the aforesaid selections).

Except for one minor problem:

Store Side:
Because images larger than the encapsulating divs would not automatically shrink to within the encapsulating divs, nor shrink in proportion, I had to change Line 205 in \includes\templates\amanita\templates\tpl_events_calendar_default.php
from

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

to

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

while the following also worked

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

I found it made no difference toggling through the following Admin > Images settings:
Calculate Image Size = True (default)
Image - Use Proportional Images on Products and Categories = 1 (default)

or switching zen_image_OLD with zen_image in \includes\functions\extra_functions\events_calendar_functions.php (Line 70).

$dumi = ($usew ? zen_image_OLD($wf, $alt, '', '', $params) : ('<img src="'.$wf.'" alt="'.$alt.'" title=" '.$alt.' " '.$params.' />'));

While I remain unclear what that true/false setting in tpl_events_calendar_default.php is intended to do exactly, I have not yet found any other way to fix this problem.

As I contemplate re-writing the readme, I am wondering how to explain this setting, and whether or not the changing of this setting can or should be placed in a language file or elsewhere.

Has anyone else experienced the same or similar problem with images larger than the encapsulating divs?

As I consider all known bugs have now been fixed or otherwise resolved, and notwithstanding the minor problem raised above, further problems, comments, criticisms or objections, I would be immensely pleased to undertake the final packaging of this mod for submission to Plugins beginning this weekend.

Rus and Diva, I cannot thank you enough for your fabulous contributions and untiring efforts, other than to say brilliant, absolutely brilliant, to the both of you.

Cheers :cheers:

18 Apr 2013, 4:51 PM
#380
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:

Store Side:
Because images larger than the encapsulating divs would not automatically shrink to within the encapsulating divs, nor shrink in proportion, I had to change Line 205 in \includes\templates\amanita\templates\tpl_events_calendar_default.php
from

<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1" hspace="0" vspace="0"', true); ?>
> to
> ```
<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1" hspace="0" vspace="0"', false); ?>

while the following also worked

<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1"', false); ?>
> 
> 
> I found it made no difference toggling through the following Admin > Images settings:
> Calculate Image Size = True (default)
> Image - Use Proportional Images on Products and Categories = 1 (default)
> 
> or switching zen_image_OLD with zen_image in \includes\functions\extra_functions\events_calendar_functions.php (Line 70).
> ```
$dumi = ($usew ? zen_image_OLD($wf, $alt, '', '', $params) : ('<img src="'.$wf.'" alt="'.$alt.'" title=" '.$alt.' " '.$params.' />'));

While I remain unclear what that true/false setting in tpl_events_calendar_default.php is intended to do exactly, I have not yet found any other way to fix this problem.

As I contemplate re-writing the readme, I am wondering how to explain this setting, and whether or not the changing of this setting can or should be placed in a language file or elsewhere.

If you refer back to some of my recent posts this is explained.. "true" adds the "height" and "width" attributes to the IMG tag, false or NO value leaves them out.

so you either end up with HTML that looks like this:

<img src="images/events_images/IMAG0060.jpg" alt="Recurring Event" title=" Recurring Event " width="600" height="450" class="event_calendar_image" />
```or it looks like this:

<img src="images/events_images/IMAG0060.jpg" alt="Recurring Event" title=" Recurring Event " class="event_calendar_image" />

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.