
Originally Posted by
dw08gm
Rus
Re Version 2, I encountered a few problems, all but one relatively minor.
1. Upon resizing a gif or png containing transparent sections, usually outside the margins of non-rectangular shapes, the transparent sections are turned black. For me this is no big deal, as I would normally resize these images prior to uploading, and having onscreen controls to adjust width/height makes this optimisation easy. However, for stores with colorful backgrounds, the blackening affect could look unsavoury.
Just researched...others have had issues with this, looks like there is a way to do it from what I am reading. Give me a few days. This is happening to GIF's? or just to PNG's?
2. However, the removal of <img class="c1" in tpl_events_calendar_default.php breaks my fluid and flexible design approach, as images are no longer reduced further to fit their enclosing divs. I cannot accept this change as is.
I meant to talk with you about this...the code as written was:
Code:
<!-- Note: closing ' />' for <img> is located in function zen_image -->
<img class="c1" <?php echo zen_image(DIR_WS_IMAGES .'events_images/' . $event_array['image'], '', '', 'hspace="0" vspace="0"');?>
What that did was create a reference with 2 open brackets ( <img class="c1" <img ). The zen_image function actually has support for additional parameters. It (probably) should have been written like this:
Code:
<?php echo zen_image(DIR_WS_IMAGES .'events_images/' . $event_array['image'], '', '', 'class="c1" hspace="0" vspace="0"');?>
My new function also supports extra parameters...the existing code as is can be changed to:
Code:
echo event_flink_small($event_array['image'], $event_array['title'], 'class="c1" hspace="0" vspace="0"');
3. In admin\includes\languages\english\events_manager.php, I applied the following changes. :
Code:
define('TEXT_EVENT_IMAGE', 'Event Image Info:'); // Event Info File:
define('TEXT_EVENT_NO_IMAGE', 'Unselect Image:'); // remove info file:
The checkbox for TEXT_EVENT_NO_IMAGE does not physically move or delete an image, but only deletes the link in the database. FWIW I like the fact that I can tick this checkbox to unselect an existing image and at the same time upload a replacement image.
Yeah, it is really up to the individual, that's why it is in with the language defines. I had "Event Info File" because those terms applied to both docs and images. For the 2nd one, yeah, you are right the way the program works it deselects the file by just deleting the reference in the db. I don't think the program ever did delete the files. We could add another option to "delete physical file", it would only work if the deselect was checked...your call.
4. In tpl_events_calendar_default.php, I added the following snippets in case storeowners wish to prepend the event start and end dates with the weekday ie Thursday April 11, 2013 as opposed to April 11, 2013. This is useful when viewing events beyond the current month, as the sidebox only shows the current calendar month in event view, and could force a customer the look elsewhere for the weekday of the event. To activate, simply rem the upper line and unrem the lower line of each snippet respectively.
Code:
$date_start = date($dateDisplayFormat, mktime(0,0,0,$month,$day,$year));
// $date_start = zen_date_long($events->fields['start_date']);
Code:
$date_end = date($dateDisplayFormat, mktime(0,0,0,$month_end,$day_end,$year_end));
// $date_end = zen_date_long($events->fields['end_date']);
Cheers
I like that one, good idea: On my end I made it a dynamic option via the defines file...
Code:
in /includes/languages/english/extra_definitions/your_template/events_calendar_include_defines.php
added:
// use long dates (includes day of week) when displaying events
define(EVENTS_LONG_DATES, true);
on the two lines above I changed them to:
$date_start = ( EVENTS_LONG_DATES ? zen_date_long($events->fields['start_date'])
: date($dateDisplayFormat, mktime(0,0,0,$month,$day,$year)) );
$date_end = ( EVENTS_LONG_DATES ? zen_date_long($events->fields['end_date'])
: date($dateDisplayFormat, mktime(0,0,0,$month_end,$day_end,$year_end)) );
Rus