Forums / All Other Contributions/Addons / Event Calendar v3

Event Calendar v3

Locked

Views: 68,123

Results 461 to 480 of 500
This thread is locked. New replies are disabled.
25 Apr 2013, 5:03 PM
#461
divavocals avatar

divavocals

Totally Zenned

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

Event Calendar v3

dw08gm:

Resizing is an admin event_manager function and is completely separate to the display of event images in event calendar.
That's not completely true.. the re-sized image is what is displayed on the events page.. the resizing is taking place in the events manager.. You made it clear early on in these discussions that YOU don't necessicarily want this module to re-size images for you that you would prefer to do this work yourself and upload the full image. on the front end to support the CSS driving the image resizing, you do need to remove the IMG height and width or the images will distort.

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.

25 Apr 2013, 5:31 PM
#462
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:

That's not completely true.. the re-sized image is what is displayed on the events page.. the resizing is taking place in the events manager.. You made it clear early on in these discussions that YOU don't necessicarily want this module to re-size images for you that you would prefer to do this work yourself and upload the full image. on the front end to support the CSS driving the image resizing in the display, versus actually re-sizing the image file, you do need to remove the IMG height and width or the images will distort.

More on this and a correction to my previous post..

A lot of people seem to wonder about just how to proportionally scale images with CSS; for the image to fit into FOO x BAR container... Thing is, a browser is not a graphics application and CSS isn't a graphics API. What it means is that you can't do that with CSS! What you CAN do, however, is have the <img> proportionally scale within one-axis limit. You can make large images smaller and smaller images larger by setting a specified width or max-width while leaving the height to be scaled proportionally to width. Turning it around, you can use the height constrains while leaving the width scale proportionally. You can't have both at the same time.

To add to this you cannot use the inline IMG height and width settings AND use these kinds of CSS scaling techniques together.. or you will get distorted images.. Re-sizing the physical image files is and should be a user preference, and it may or may not affect the display.. If the shopowner scales the image to fit the container using the re-sizing tool in the admin, they should be able to do that..

the display of those images is indeed a different matter, and if one wants to let the CSS alone determine how the image dimensions are displayed, there are options to help support that as well..

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.

25 Apr 2013, 6:03 PM
#463
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

and more to add to the quote above:

A lot of people seem to wonder about just how to proportionally scale images with CSS; for the image to fit into FOO x BAR container... Thing is, a browser is not a graphics application and CSS isn't a graphics API. What it means is that you can't do that with CSS! What you CAN do, however, is have the <img> proportionally scale within one-axis limit. You can make large images smaller and smaller images larger by setting a specified width or max-width while leaving the height to be scaled proportionally to width. Turning it around, you can use the height constrains while leaving the width scale proportionally. You can't have both at the same time.

An important thing to note here is that I removed the width="" and height="" attributes from <img> element in the scaling examples. This is necessary as specifying those will prevent the image from being scaled proportionally.

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.

26 Apr 2013, 2:41 AM
#464
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:

Using the IMG height and width tells the BROWSER what size to display the image. If you use that with the CSS settings that are meant to re-size the image to the container, and the image is larger or smaller than those settings, the images will distort.

If you want the CSS to control the image display size
and
you are NOT going to use the resizing features (the full sized image will be uploaded and left as is)
and
the image is larger (or smaller) than the dimensions of the page container

then you need to remove the height and width from the IMG tag so that the image will not distort, and so the CSS will properly display the image in the correct proportions.

You indicated that you wanted to maintain the ability to upload the full image size and let the CSS do the proportioning and resizing the image display versus explicitly resizing the image upon upload and then telling the browser what those image dimensions are. Rus provided the code to achieve this, and also provided the code for those who were okay with using the resizing features.. If you go back to the posts where Rus introduced this code you will see that this is what he said, and you confirmed that this code worked.. All I did was add a conditional statement so that BOTH options could be used.
Okay... despite the fact that I think image scaling can be a performance Achilles heel for a site (which is why I'll personally never use the technique without at LEAST resizing-optimizing images :laugh:), I think I figured out how you can have your cake AND eat it too.. The key is to use height:auto to override any height or width attribute already present on the image.

I modified the following in the stylesheet..

    img.event_calendar_image {max-width:100%; margin:0em auto; height: auto;}

Now with the IMG height and width, the images still scale correctly on my test site.. (http://zentestcart(dot)overthehillweb(dot)com/index.php?main_page=events_calendar&_day=23&_month=04&_year=2013) I've tested it with the latest versions of IE, Opera, Safari, Firefox, and Chrome. I know that there may still be issues with IE8 and IE7, but I cannot confirm as I cannot test in either of these browsers..

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.

26 Apr 2013, 1:31 PM
#465
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

I've attached all the files I've been using in my testing.. I haven't touched the readme because until this is stable, I want to hold off on the readme updates just yet..:smile:

this includes the changes Rus posted to stop the internal manufacturer/categories/products links form opening inside a new page.

Once dw08gm confirms that the fix I posted last night addresses his concerns with the CSS image scaling, this admin setting can be removed:

(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.<br /><br />Default is true.', @t4, 10, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),

and this code in includes/templates/custom_template/templates/tpl_events_calendar_default.php:

<!-- **rus.02:start -->
<?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 } ?>
<!-- **rus.02:stop -->

can be modified to this:

<!-- **rus.02:start -->
    <?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="event_calendar_image"', true); ?>
<!-- **rus.02:stop -->

I've seperated the sidebox stylesheet from the page stylesheet, and named the page stylesheet so that it only loads when on the events page. I've also added additional defines for the short month dropdowns to seperate the page dropdowns from the sidebox dropdowns to includes/languages/english/extra_definitions/events_calendar_include_defines.php as follows:

define('EVENTS_MONTHS_SHORT_SIDEBOX_DROPDOWNS', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
//define('EVENTS_MONTHS_SHORT_SIDEBOX_DROPDOWNS', 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec');
define('EVENTS_MONTHS_SHORT_PAGE_DROPDOWNS', 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec');
//define('EVENTS_MONTHS_SHORT_PAGE_DROPDOWNS', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');

I included BOTH set of options for both so that all a shopowner has to do is uncomment/comment the ones they want to use.. The defaut for the events page as you can see is the titlecase defines, while the sidebox default is the uppercase defines.

to support using these new defines I modified: includes/templates/custom_template/templates/tpl_events_calendar_default.php and includes/templates/custom_template/templates/tpl_events_calendar_include_default.php

DivaVocals:

Okay... despite the fact that I think image scaling can be a performance Achilles heel for a site (which is why I'll personally never use the technique without at LEAST resizing-optimizing images :laugh:), I think I figured out how you can have your cake AND eat it too.. The key is to use height:auto to override any height or width attribute already present on the image.

I modified the following in the stylesheet..

img.event_calendar_image {max-width:100%; margin:0em auto; height: auto;}
> 
> 
> Now with the IMG height and width, the images still scale correctly on my test site.. (http://zentestcart(dot)overthehillweb(dot)com/index.php?main_page=events_calendar&_day=23&_month=04&_year=2013) I've tested it with the latest versions of IE, Opera, Safari, Firefox, and Chrome. I know that there may still be issues with IE8 and IE7, but I cannot confirm as I cannot test in either of these browsers..


I believe this addresses all concerns raised.. I do have one more thing on resizing, but I'll put that in a separate post..

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.

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

but there is one last thing regarding the image resizing features.. The admin setting for turning on/off resizing doesn't appear to do anything at all.

(NULL, 'Automatically re-size event images?', 'EVENTS_FILE_RESIZE', 'true', 'If this option is set to true, the module will re-size event images \(based on maximum width and height settings above\).<br /><br />Set to false to disable image resizing.<br /><br />Default is true.', @t4, 5, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),

I see the define for EVENTS_FILE_RESIZE being used in two places.
Lines 63 - 72 of YOUR_ADMIN/includes/functions/events_manager_functions.php

        if (EVENTS_FILE_RESIZE && $rezit && $rez) {
          $enew = $eman->resample($nwid, $nhei, false);
          if (is_file($f)) unlink($f);
          if (!$eman->save($f)) {
            $er=true; $erm .= TEXT_EVENT_IMAGE_SIZE_ERR;
          } else {
             $erm .= TEXT_EVENT_IMAGE_RESIZED .' ' . $owid . 'x' . $ohei .  ' ' . TEXT_EVENT_IMAGE_TO . ' ' . $nwid . 'x' . $nhei .  '.';
            $owid = $nwid; $ohei = $nhei;
          }
        }

Lines 75 - 105 of YOUR_ADMIN/includes/functions/events_manager_functions.php

      if (EVENTS_FILE_RESIZE && $showz) {
         $dumi = '<div style="display: inline-block;"><table  width="100%" cellpadding="0" cellspacing="0"  border="0"><tr><td width="100%" align="left">' . $dumi .  '</td></tr><tr><td width="100%" align="left">';
         $dumi .= '<strong>'.TEXT_EVENT_IMAGE_WIDTH  .'</strong><span  class="smalltext">('.TEXT_EVENT_IMAGE_CURRENT.'='.$owid.')</span> '.
                  zen_draw_input_field('image_new_width', $nwid, 'id="image_new_width"  size="3" maxlength="4" onkeyup="return image_rez_check(this);"', false) .  '   ';
        $dumi .=  '<strong>'.TEXT_EVENT_IMAGE_HEIGHT .'</strong><span  class="smalltext">('.TEXT_EVENT_IMAGE_CURRENT.'='.$ohei.')</span> '.
                  zen_draw_input_field('image_new_height', $nhei, 'id="image_new_height"  size="3" maxlength="4" onkeyup="return image_rez_check(this);"', false) .  '   ';
        $dumi .=  zen_draw_checkbox_field('image_aspect','',false,'', ' checked  id="image_aspect" onclick="return image_rez_check(this);"') .  TEXT_EVENT_IMAGE_ASPECT . '   ';
         $dumi .= zen_draw_radio_field('image_doresize_cb','',false,'',  'id="image_doresize_cb" onclick="if(irezit(this)){submit();};"') .  ' ' . TEXT_EVENT_IMAGE_RESIZE;
        $dume = '';
         if ((EVENTS_FILE_MAX_WIDTH>0 &&  $owid>EVENTS_FILE_MAX_WIDTH) || (EVENTS_FILE_MAX_HEIGHT>0  && $ohei>EVENTS_FILE_MAX_HEIGHT)) {
          $dume .=  TEXT_EVENT_IMAGE_GREATER . ' (' . (EVENTS_FILE_MAX_WIDTH>0 ?  (TEXT_EVENT_IMAGE_WIDTH.': '.EVENTS_FILE_MAX_WIDTH.' ') : '') .
                   (EVENTS_FILE_MAX_HEIGHT>0 ? (TEXT_EVENT_IMAGE_HEIGHT.': '.EVENTS_FILE_MAX_HEIGHT) : '') . ')<br />';
        }
        if ($er && $erm) $dume .=  $erm. '<br />';
        if ($dume) {
          $dumi .= '<div id="image_warning" class="rec_warn">'.$dume.'</div>';
        } else {
          $dumi .= '<div id="image_warning" class="rec_warn" style="display: none;"></div>';
        }
        $dumg = '';
        if (!$er && $erm) $dumg .=  $erm. '<br />';
        if ($dumg) {
          $dumi .= '<div id="image_success" class="rec_good">'.$dumg.'</div>';
        } else {
          $dumi .= '<div id="image_success" class="rec_good" style="display: none;"></div>';
        }
        $dumi .= '<div id="image_blue" class="rec_cool" style="display: none;"></div>';
        $dumi .= zen_draw_hidden_field('image_doresize','','id="image_doresize"');
         $dumi .= zen_draw_hidden_field('image_ow',$owid,'id="image_ow"') .  zen_draw_hidden_field('image_oh',$ohei,'id="image_oh"');
        $dumi .= '</td></tr></table><br /><br /></div>';
      }

However regardless of whether this is on or off, one can rezsize images by simply selecting the resize radio button that appears on the events preview page. I've looked at this code and I'll admit I do not understand for the life of me what this define "does".

I would assumed that it turns off the resizing functions when set to "off" (re-sizing is not going to occur nor will the re-sizing functions be available to the user). I also would expect that when "on" the re-sizing would occur without an additional action on the part of the user (clicking the re-size button).. The actual behavior is quite different, so I'm confused as to what on/off here means.. Hoping Rus can shed some light..

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.

26 Apr 2013, 1:47 PM
#467
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

Whoooops.. small modification to the seperated stylesheets.. The one for the sidebox was missing a few things..

The attached file makes that change and one small change to the additional link code so that the "http://" is included in the link displayed on the events page.

To anyone happening across this thread, any files attached here are BETA files should NOT be used on a live store..

DivaVocals:

I've attached all the files I've been using in my testing.. I haven't touched the readme because until this is stable, I want to hold off on the readme updates just yet..:smile:

this includes the changes Rus posted to stop the internal manufacturer/categories/products links form opening inside a new page.

Once dw08gm confirms that the fix I posted last night addresses his concerns with the CSS image scaling, this admin setting can be removed:

(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.<br /><br />Default is true.', @t4, 10, NOW(), NULL, 'zen_cfg_select_option(array('true', 'false'),'),

> 
> and this code in includes/templates/custom_template/templates/tpl_events_calendar_default.php:
> ```
<!-- **rus.02:start -->
<?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 } ?>
<!-- **rus.02:stop -->

can be modified to this:

<!-- **rus.02:start -->
<?php echo event_flink_small($event_array['image'], $event_array['title'], 'class="event_calendar_image"', true); ?>
<!-- **rus.02:stop -->
> 
> I've seperated the sidebox stylesheet from the page stylesheet, and named the page stylesheet so that it only loads when on the events page. I've also added additional defines for the short month dropdowns to seperate the page dropdowns from the sidebox dropdowns to **includes/languages/english/extra_definitions/events_calendar_include_defines.php** as follows:
> ```
define('EVENTS_MONTHS_SHORT_SIDEBOX_DROPDOWNS', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');
//define('EVENTS_MONTHS_SHORT_SIDEBOX_DROPDOWNS', 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec');
define('EVENTS_MONTHS_SHORT_PAGE_DROPDOWNS', 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec');
//define('EVENTS_MONTHS_SHORT_PAGE_DROPDOWNS', 'JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC');

I included BOTH set of options for both so that all a shopowner has to do is uncomment/comment the ones they want to use.. The defaut for the events page as you can see is the titlecase defines, while the sidebox default is the uppercase defines.

to support using these new defines I modified: includes/templates/custom_template/templates/tpl_events_calendar_default.php and includes/templates/custom_template/templates/tpl_events_calendar_include_default.php

I believe this addresses all concerns raised.. I do have one more thing on resizing, but I'll put that in a separate post..

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.

26 Apr 2013, 3:37 PM
#468
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

Re Posts 461-467

Stellar stuff - you're a star.

I also stumbled upon the height:auto; attribute today, but am unable to test run same until Sunday. Your results are very encouraging.

Re: css
I prefer not to split this up. It is not that large a file to worry about and splitting it up may cause more problems than it is worth.

Cheers

26 Apr 2013, 3:56 PM
#469
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

Re Posts 461-467

Stellar stuff - you're a star.

I also stumbled upon the height:auto; attribute today, but am unable to test run same until Sunday. Your results are very encouraging.

Re: css
I prefer not to split this up. It is not that large a file to worry about and splitting it up may cause more problems than it is worth.

Cheers
Yes.. but it's a suggested method (see the Zen Cart Wiki) and other modules which implement their own pages use the same method for good reason.. the same reasons I am suggesting making the change..

while you have been concentrating on (how did you put this:smile:), fluid and flexible design, I have been concentrating on page load improvements.. To that end I have been making more use of page specific CSS, and JS, the use of and CDNs to load jQuery libraries (and eliminating the jQuery clusterf*** mess that comes with so many add-ons using different versions of jQuery). While it's a SMALL improvement to eliminate the loading of the events manager CSS on ALL pages, it's an improvment nontheless, and it may make a difference to shops.. ESPECIALLY since the sidebox loading inside an iframe IS a performance hit.. Personally I found it MUCH easier to manage the look/feel with these guys seperated..

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.

26 Apr 2013, 5:42 PM
#470
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

Re Posts 461-467

Stellar stuff - you're a star.

I also stumbled upon the height:auto; attribute today, but am unable to test run same until Sunday. Your results are very encouraging.

I can confirm that IE8 still distorts the images.. (at work can only test this here) I'm thinking that adding IE only styles will resolve this.. perhaps width versus max-width.. Beter way to do this is to use the same method implemented in the PicaFlor templates for cross browser compatibility.. I'll add those changes over the weekend..

dw08gm:

Re: css
I prefer not to split this up. It is not that large a file to worry about and splitting it up may cause more problems than it is worth.

Cheers

From the Zen Cart Wiki (which is similar senitments to other sources on this)

To save loading time, only new selectors or selectors whose properties you wish to change should be in the subsequent optional CSS files.

Exactly what "problems" do you foresee coming out of having two stylesheets?? In addition to improving page load, (even incremetnally)it actually makes things EASIER to manage.. Not seeing what would be a "problem"..

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.

26 Apr 2013, 7:00 PM
#471
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

dw08gm:

I am really struggling to explain with this phenomena....

The original code, before the introduction of the image manipulation code and before I inadvertantly did the double <img> thing, returned the actual image width and height in px (as listed in view source and as stored in the events_images folder) and, even though the image as displayed on the event page may have been smaller than the actual image size, the proportions were maintained.

This should still be the case after image manipulation, but somehow some function (zen_image, zen_image_OLD or whatever) is distorting this process. My limited understanding of coding prevents from seeing how the image width and height values as collected should not be maintained in whatever code does the proportioning for the display.

Does/can event_flink_small do any proportioning, or is the proportioning entirely dependent upon zen_image/zen_image_OLD?the flink function does not resize on the store side. If the true parameter is used it will use zen_image_OLD to create the image tag, if false (or "blank") is used it creates an image tag without height and width. I am doing nothing out of the ordinary. I think what was happening before is that because of the double open on the IMG tag the height and width were not being detected by the browser.

26 Apr 2013, 7:16 PM
#472
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

well just where the heck have YOU been mister??? :laugh::laugh:

LaCamus:

the flink function does not resize on the store side. If the true parameter is used it will use zen_image_OLD to create the image tag, if false (or "blank") is used it creates an image tag without height and width. I am doing nothing out of the ordinary. I think what was happening before is that because of the double open on the IMG tag the height and width were not being detected by the browser.Yep.. that's kind of what I suspected.. which probably explains why his old code "appeared" to work.. The real issue is that the CSS using to maintain image dimensions is not complete/correct as it will not work if the IMG tag height and width are there.. The CSS solution I posted (and included with my last fileset upload) should fix that, but it appears that (as usual) Internet Exploder 7 & 8 doesn't like it and needs it OWN 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.

26 Apr 2013, 7:26 PM
#473
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

...However regardless of whether this is on or off, one can rezsize images by simply selecting the resize radio button that appears on the events preview page. I've looked at this code and I'll admit I do not understand for the life of me what this define "does".

I would assumed that it turns off the resizing functions when set to "off" (re-sizing is not going to occur nor will the re-sizing functions be available to the user). I also would expect that when "on" the re-sizing would occur without an additional action on the part of the user (clicking the re-size button).. The actual behavior is quite different, so I'm confused as to what on/off here means.. Hoping Rus can shed some light..
This define is just for resizing the image in the IMG tag when on the admin side only. Meaning if you turn it off and then upload a large image the whole original image will be seen on the edit and review screens. If it is on then it resizes it only on the tag so that you can reasonably view the image when editing/reviewing. Does that make sense?

26 Apr 2013, 7:38 PM
#474
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:

This define is just for resizing the image in the IMG tag when on the admin side only. Meaning if you turn it off and then upload a large image the whole original image will be seen on the edit and review screens. If it is on then it resizes it only on the tag so that you can reasonably view the image when editing/reviewing. Does that make sense?
Ahhh yes.. that does.. So the "click here to resize" is an explicit action the user must take in order to resize the image file that is uploaded and this re-sized file will then displayed on the front-end?? Correct???

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.

26 Apr 2013, 7:41 PM
#475
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

LaCamus:

This define is just for resizing the image in the IMG tag when on the admin side only. Meaning if you turn it off and then upload a large image the whole original image will be seen on the edit and review screens. If it is on then it resizes it only on the tag so that you can reasonably view the image when editing/reviewing. Does that make sense?Sorry sorry, scratch that...
No, resizing should take place with true, and it doesn't when false. Options are not shown when set to false....make sure you did not set the variable to the string 'false', that is not an actual false, if the string contains any text it will create a true condition. The field type in the db has to be boolean. If you can't achieve this try setting the false selection to blank ( '' empty quotes).

26 Apr 2013, 7:46 PM
#476
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

Ahhh yes.. that does.. So the "click here to resize" is an explicit action the user must take in order to resize the image file that is uploaded and this re-sized file will then displayed on the front-end?? Correct???again, sorry, but yes the user has to click the resize radio button in order to resize the image, it is resized only in the img for viewing when oversized, it is not actually resized and saved until the button is clicked.

26 Apr 2013, 10:30 PM
#477
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:

Sorry sorry, scratch that...
No, resizing should take place with true, and it doesn't when false. Options are not shown when set to false....make sure you did not set the variable to the string 'false', that is not an actual false, if the string contains any text it will create a true condition. The field type in the db has to be boolean. If you can't achieve this try setting the false selection to blank ( '' empty quotes).Great that explains why I wasn't seeing what I expected.. (that the re-sizing options are not displayed at all when this is set to the strong 'false') I have modified the install the script as follows:
from:

(NULL, 'Automatically re-size event images?', 'EVENTS_FILE_RESIZE', 'true', 'If this option is set to true, the module will re-size event images \(based on maximum width and height settings above\).<br /><br />Set to false to disable image resizing.<br /><br />Default is true.', @t4, 5, NOW(), NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),'),

to

(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 above\).<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, 5, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),

Now this works as I expected.. Thanks..

LaCamus:

again, sorry, but yes the user has to click the resize radio button in order to resize the image, it is resized only in the img for viewing when oversized, it is not actually resized and saved until the button is clicked. Got it.. Now that I have modified the admin setting and supporting menu text this now makes more sense.. Gonna make one small change to the UI to make the "Click here to re-size" stand out a little more.

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, 3:29 AM
#478
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

DivaVocals:

Great that explains why I wasn't seeing what I expected.. (that the re-sizing options are not displayed at all when this is set to the strong 'false') I have modified the install the script as follows:
from:

(NULL, 'Automatically re-size event images?', 'EVENTS_FILE_RESIZE', 'true', 'If this option is set to true, the module will re-size event images (based on maximum width and height settings above).<br /><br />Set to false to disable image resizing.<br /><br />Default is true.', @t4, 5, NOW(), NULL, 'zen_cfg_select_option(array('true', 'false'),'),

> to
> ```
(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 above\).<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, 5, NOW(), NULL, 'zen_cfg_select_option(array(\'1\', \'0\'),'),

Now this works as I expected.. Thanks..Try using just true and false without the quotes.

27 Apr 2013, 4:59 AM
#479
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:

Try using just true and false without the quotes.
I did, but trying to make that into a selectable admin option looks strange.. I had to use 1 & 0 for another admin option for the same reasons.. Is there a reason I shouldn't use 1 & 0?? it appears to have the same affect..

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, 5:43 AM
#480
lacamus avatar

lacamus

New Zenner

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

Re: Event Calendar v3

I was looking at the description...it uses the word "true", but you could use 1 & 0.