Community Add-Ons
Events calendar
for osCommerce Online Merchant v2.2
It's a basic events calendar.
I remember reading of some request for a calendar of events, I played a little w/ this one a while ago.
The contrib can be widely improved and modified, it is just a basic version so do not expect fancy features, however I think it's a good start and hope you find it useful.
It includes:
a calendar info box w/links to events;
an events_calendar page where events info will be shown (a year_view is available)
an admin section w/ basic events manager.
NOTES:
* tested on 2.2_MS1 Feb 21, 2003 , 2.2_CVS Jan 17, 2003.
* live example at http://www.chilipepper.it/catalog/ (just to get an idea.....)
* feedback appreciated.
ivan
http://forums.oscommerce.com/index.php?showtopic=36584&hl=
Updated class file from my previous release.
Original javasript link from 2.0 MS2 release caused problems in Internet Explorer.
Links are now working correctly.
Install at your own risk.
Backup! Backup! Backup!
This is a update from the previos versions released.
There was a javascript typo in the catalog/inlcudes/classes/calendar.php file that would create a bad link when you added events to the calendar.
This contrib is a mixture between the original
Events calendar 2.0 MS2 Ivan Pascutti 7 Aug 2003
and the
Events Calendar Update pnkranger 3 May 2006
contribs submitted before.
I included a new style sheet file and language file for english, spanish, and german.
All files in the previous releae are there along with the fixes. Hope this helps others with the same problem.
Install at your own risk but this may help those with internet explorer problems.
Thanks to previous contributors. This works great for me. Hope it works great for others.
- Fixed a few small typos.
- Fixed a redundancy in calendar_content.php that caused the menu to generate twice.
- mmostler's previous update was not a "stock install" and referenced files unique to his system ("page_top.php", etc.). I added his relevant changes to a clean copies of each file.
Event Calendar Update
To install you can either replace your files with the ones included in the zip or manually diff and update sections mentioned below.
* Updated display and listing of events that cross over months (start date is in month 1 and end date is in month 2).
- now displays in All Event view
- now displays in both Month views
- now displays in Other Events listing in an event detail view.
- now displays in Day views.
+ this update can be made manually by
replacing all SQL in your events_calendar.php with the SQL in the
attached events_calendar.php
* Event Nav Bar Titles moved to the events_calendar.php language file.
+ this update can be made manually by opening events_calendar.php and locating
//add breadcrumb for requested
then replace the if ... else block that follows with:
if(isset($single_event) || $HTTP_GET_VARS['select_event'])
{
$navbarEventTitle = NAVBAR_EVENT_TITLE_DETAIL;
}
else if($HTTP_GET_VARS['year_view'] == 1)
{
$navbarEventTitle = NAVBAR_EVENT_TITLE_YEAR;
}
else if($HTTP_GET_VARS['_day'])
{
$navbarEventTitle = NAVBAR_EVENT_TITLE_DAY;
}
else if($HTTP_GET_VARS['view'] == 'all_events')
{
$navbarEventTitle = NAVBAR_EVENT_TITLE_ALL;
}
else
{
$navbarEventTitle = NAVBAR_EVENT_TITLE_MONTH;
}
then open the includes/language/english/events_calendar.php and find:
define('NAVBAR_TITLE', 'Events Calendar');
the add the following lines after it:
define('NAVBAR_EVENT_TITLE_DAY', 'Day View');
define('NAVBAR_EVENT_TITLE_MONTH', 'Month View');
define('NAVBAR_EVENT_TITLE_YEAR', 'Year View');
define('NAVBAR_EVENT_TITLE_DETAIL', 'Event Detail');
define('NAVBAR_EVENT_TITLE_ALL', 'All Events');
* Event Detail dates border and display style moved to style sheet
- new class = .event_header_dates
+ to make this change manually, open events_calendar.php and locate the
opening <td> tag above echo '<b>' . TEXT_EVENT_START_DATE . '</b>';
and change the opening <td> to:
<td class="event_header_dates" nowrap>
do the same for the <td> tag above <b><?php echo TEXT_EVENT_END_DATE;?></b>
Then open the event_calendar.css and find:
.event_header
and after its closing brace ' } ' add
.event_header_dates
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #000000;
background-color: #FFFFFF;
text-decoration: none;
border: 1px inset #F2F4F7;
}
* Display date format centralized to a variable in the events_calendar.php: $dateDisplayFormat
If there are no events found for a month then when viewing the month event list you get a bad SQL error.
This is caused due to an error in a the OS Commerce base split page results function.
To fix this you can either replace the file with the attached file
1. copy attached file to /includes/classes/split_page_results.php
Or modify the file:
1. open /includes/classes/split_page_results.php
2. locate the following line of code
$offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));
3. add the following code under the located line
if($offset < 0)
{
$offset = 0;
}
4. save and retry.
Ooops! Missed the listing file under include/modules.
Here is the full package with the missing listing file.
Updated the formatting of the cod and presentation. The code formatting update helps ease the debugging and maintence of the pages and is based on industry coding standards.
There was also some updates to the formatting of the event list and detail pages. I have also updated the sticky presentation to match the latest news presentation for a more consistent look.
There was also a fix for the events_calendar.php to properly handle no attributes passed in by displaying events for the current month.
I am including here a full package. Install is not much changed except for the change to the style sheet. I have split the calendar styles to a seperate file which is imported in the main stylesheet.css.
Add to top of stylesheet.css (make the necessary changes to match your site color scheme in events_calendar.css)
/* event calendar sytle sheet */
@import url("events_calendar.css");
NOTE: i have left the IFRAME in place since it makes possible navigation of the calendar without having to reload the entire page.
If you wish to have the IFRAME removed you will need to reapply the contribution from mediatree.
To view an example of the events calendar with the new format see <a href="http://www.oregonreining.com">www.oregonreining.com</a>
removing i frame method in includes/boxes/calendar.php
Updated the Event Manager to not require a title for all 3 languages. At least 1 of the 3 languages must be provided.
http://www.phantomprosystems.com
Fixed some tag bugs, cleaned up some tags, added some more style sheet use.
try to make the calender more multi lanugal and put out hardcoded table colors into the styleseet
own design is now easier to make
note!
there are still some hardcoded language inside /includes/classes/calendar.php
don know to bring that out
german language file is added
Traducción del calendario de eventos a Castellano.
Modificaciones realizadas:
- Traducción de etiquetas de admin y catalog
- Traducción de nombres de meses y días en el calendario.
- Traducción de la página de instalación de la versión original agregando lo necesario para la instalación del módulo en castellano.
Espero que os guste!!
I only have translated the events_calendar to spanish.
Included on this new Version:
- Translated admin and catalog event_calendar labels.
- Translated calendar month and day names to spanish
- Translated readme file including changes to include spanish version.
I wish you enjoy it!!
I was getting this error on the admin side of the event calendar
Fatal error: Cannot use string offset as an array in C:apachefriendsxampphtdocscatalogadminincludesclassestable_block.php on line 67
I fixed it by changing lines 88 and 122 of catalog/admin/inlcudes/boxes/event_drop_dns.php
echo $box->menuBox($heading,'');
Change it to
echo $box->menuBox($heading, $info_box_contents);
This post only includes the file event_drop_dns.php with those two lines changed. The rest is the same
Had some comments that the file didn't include any files, so I am re-uploading complete file again.
FIX! For the Event Calendar
So the Calendar will come up on the default page
These lines were forgotten from the install.txt
ADD:
catalog/includes/application_top.php
For it to get the information on the front page!
define('FILENAME_EVENTS_CALENDAR', 'events_calendar.php');
define('FILENAME_EVENTS_CALENDAR_CONTENT', 'calendar_content.php');
define('FILENAME_EVENTS_MANAGER', 'events_manager.php');
define('TABLE_EVENTS_CALENDAR', 'events_calendar');
Full credit goes to Ivan Pascutti. I simply made the contrib compatible for 2.2 MS1.
Changes from version 1.0:
Catalog:
- Calendar info-box can be placed either in left or right column;
- Calendar info-box is displayed inside an i-frame, you can scroll through months w/out re-loading the whole page.
Admin:
- In events_manager you can link events to a specific a product, category or special and add/upload an envent image.
* tested on: 2.2 MS2 July 12 2003 snapshot, Browsers: IE 6.0, Netscape 7.0, Opera 6.0
* live example at http://www.chilipepper.it/catalog/
* The calendar box has to be installed in the left column
* Link corrections in calendar class
* Breadcrumb bar fix
Sorry about that, but better late than never!
ivan
It's a basic events calendar.
I remember reading of some request for a calendar of events, I played a little w/ this one a while ago.
The contrib can be widely improved and modified, it is just a basic version so do not expect fancy features, however I think it's a good start and hope you find it useful.
It includes:
a calendar info box w/links to events;
an events_calendar page where events info will be shown (a year_view is available)
an admin section w/ basic events manager.
NOTES:
* tested on 2.2_MS1 Feb 21, 2003 , 2.2_CVS Jan 17, 2003.
* live example at http://www.chilipepper.it/catalog/ (just to get an idea.....)
* feedback appreciated.
ivan
