Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Event Calender


FastEddy

Recommended Posts

Hi Rubygirl,

 

sorry for not being of help, I check frequently the Contribs forum but last time I came here (yesterday), there was no post about the calendar.

I meant to post the MS1 version also but due to the many late changes I just wanted to wait until MS2. Installing this version on MS1 the main problems are related to the split_page function.

Please post your MS1 version, since many from the list will probably need it (why have something to object? Contributions are property of the Community not of the Contributors, am I wrong? :) ).

 

Sice I'm here one thing:

to display dates according to your @setlocale , in catalog/events_calendar.php replace all the instances of

$date_start = date("F d, Y", mktime(0,0,0,$month,$day,$year));

with:

$date_start = strftime("%d %B, %Y", mktime(0,0,0,$month,$day,$year));

 

and

$date_end = date("F d, Y", mktime(0,0,0,$month_end,$day_end,$year_end));

with:

$date_end = strftime("%d %B, %Y", mktime(0,0,0,$month_end,$day_end,$year_end));

 

a minor thing: in catalog/calendar_content.php, replace line 109 with

if (($month != $this_month) || ($month_ != $this_month) ||  ($year_ != $this_year) ||  ($_year != $this_year)){

Have a nice Sunday

Ivan

Link to comment
Share on other sites

First off, I want to say that I *LOVE* this calendar. Thank you, Ivan.

 

But...one bug I seem to be having is this:

 

Today's event does not show up when you click on ALL EVENTS. It showed up yesterday, and you can get to it by clicking on the date, but not if you click the infobox title. Also, the dropdown box of events is not in the main event listing (but I only have the one event right now).

 

Any ideas?

 

Thanks,

 

Phil :?

Link to comment
Share on other sites

Hi Phil,

you are right, I did not check it with events falling "today":

line 80 and 254:

........". TABLE_EVENTS_CALENDAR ." where start_date >= '". date('Y-m-d H:i:s') ."' and ...........

add the "=" after ">".

 

as for the drop down it should show up, try adding more than 1 event

HTH

Ivan

Link to comment
Share on other sites

Yep, that fixed it!

 

I hate to be seen as one of those guys who is never satisfied, so please don't take this that way...

 

I found one or two other things which may be considered bugs:

 

In the ALL EVENTS listing, when I click on the date, it takes me back to my catalog page (www.heatherlands.com/catalog/)

 

and

 

is there any way to have multi day events displayed on all event days, rather than just on the start day?

 

I am trying to use this as a musician's performance calendar and would like to have (for instance) both days at a weekend festival clickable to the info.

 

Thanks! :oops:

Link to comment
Share on other sites

Yep, sorry this a silly mistake and thanks for spotting it.

replace line 291 with:

               '<td align="center" width="20" bgcolor="#F5F5F5" class="main" nowrap><b>'. $i .'</b></td><td width="100%" bgcolor="#D9DEE6" class="main" nowrap>'. TEXT_EVENT_DATE .'  <a href="'. $cal->getDbLink($day, $month, $year) .'">'. $event_array['date'] .'</a></td>';

is there any way to have multi day events displayed on all event days, rather than just on the start day?
other users asked for the possibility to have an event spanning across several days, unfortunately this means altering the calendar class and to be honest I do not feel like doing it now, nor I'm sure I could make it, the calendar class is not mine, I've just modified it a little to use it in this mod : http://www.cascade.org.uk/software/php/calendar/ .

Ivan

Link to comment
Share on other sites

Yep, sorry this a silly mistake and thanks for spotting it.

replace line 291 with....

 

That fixed it!

 

other users asked for the possibility to have an event spanning across several days, unfortunately this means altering the calendar class and to be honest I do not feel like doing it now, nor I'm sure I could make it, the calendar class is not mine, I've just modified it a little to use it in this mod : http://www.cascade.org.uk/software/php/calendar/ .

Ivan

 

Darn. Well, we still appreciate your work. :)

 

Thanks again,

 

Phil (who wishes he were a better coder)

Link to comment
Share on other sites

Hi Rubygirl,

 

I have a problem with the splitpageresult.php delivered with your contri: while it works with the calendar, now display for default.php (if you select a bottom category) is broken. I can't post you a link as I had to replace it with the old code (productive system) Seems I get two ORDER BY clauses in the query being generated. I will have a look at it next week, but probably someone else already ran into this...

 

Anyone ran into this, too?

 

Regards,

Norbert

Link to comment
Share on other sites

can someone help me with the following error

 

####################################

Warning: Division by zero in C:Inetpubwwwrootcatalogcatalogincludesclassessplit_page_results.php on line 48

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DAYOFMONTH(start_date)' at line 1

 

select *, DAYOFMONTH(start_date) AS event from events_calendar where MONTH(start_date) = '8' and YEAR(start_date) = '2003' and language_id = '1' order by start_date limit 0, DAYOFMONTH(start_date)

 

####################################

 

i a using the snapshot of 13th July 2003, and the latest event calenders mod.

 

thanks

 

bookseller

Link to comment
Share on other sites

Well I started this thread and just now installed the contribution.

Works great.

 

2 things I would like to see.

 

1- Copy event to: We attend events that are in the same place several times a year and it would be a great time saver.

 

2- E-Mail event. This would allow me to e-mail a reminder to our customers to come and see us. Possibly even a subscribe to this event mailing list. Many of our customers prefer to purchase at trade-shows rather than over the internet. We could also e-mail discount coupons to them to use at the event.

 

Thanks a million

-Ed

Link to comment
Share on other sites

The tip on the strftime worked well, and you need to change the $date around line 214 and 286 so the titles and dates are displayed on the same format.

 

I?m looking for a way to change the language on the calendar box. The month and weekdays are in english, and I need them in portuguese.

 

 

 

Any suggestions?

 

 

Thank?s

 

Claudio

Link to comment
Share on other sites

Hello,

 

i just installed the contribute Event Calendar MS1. Now I get this Error Message on load the Admin Section:

 

Fatal error: Cannot redeclare class mime in /www/htdocs/*****/shop/admin/includes/classes/mime.php on line 22

 

Please can someone help me?!

 

Thanx Lars

Link to comment
Share on other sites

Hello again,

 

I fixed my Problem with the mime.php! Yes... :lol:

 

But now I have a new problem: :cry:

 

Fatal error: Cannot pass parameter 3 by reference in /www/htdocs/v080997/shop/catalog/events_calendar.php on line 323

 

 

Aaaaah - what does it mean? What can I do? Please help!

 

Thanx Lars

Link to comment
Share on other sites

hi. i have installed 26 events for a month. when i click on the "sep" button, to display all events... all good. it shows five and then there are links to more.

 

but the links do not work. keeps going to december ("no events found").... the status bar looks good, but the links are bad. i tried looking at code... could not spot anything.

 

in the meanwhile, i set the options for events per page to 50. i would like to have the 5 per page if we could fix this.

 

million thanks!

Link to comment
Share on other sites

I too am having the following problem, would appreciate any suggestions (running 2.2)

Fatal error: Cannot pass parameter 3 by reference in /www/htdocs/v080997/shop/catalog/events_calendar.php on line 323

This error appears whenever I try to view a month's worth of events (the go button) or click on the Events Calendar link at the top of the control. I can, however view the full year page and individually loaded events.

It appears to relate to this function:

$events_split = new splitPageResults($events_query_raw, MAX_DISPLAY_NUMBER_EVENTS, 'DAYOFMONTH(start_date)');

I feel I am so close! Any suggestions greatly appreciated ;-)

Regards, Rob

Link to comment
Share on other sites

Try changing to

$day_of_month_start_date = 'DAYOFMONTH(start_date)';

$events_split = new splitPageResults($events_query_raw, MAX_DISPLAY_NUMBER_EVENTS, $day_of_month_start_date);

Note: I have no idea what you are trying to do here, but this should fix the cannot pass by reference error. Might have other issues.

 

Hth,

Matt

Link to comment
Share on other sites

Thanks Matt, I tried your fix and it bunny-hopped the problem along a few pages and lines of code. I don't want to waste your time with this, there must be something fundamentally wrong with my setup.

 

Perhaps other contributions I've installed are conflicting. I guess that 's what you get when you're a noob.

 

Cheers anyway, Rob

 

P.S. I'm trying to get the Event Calendar contribution working with MS2.2.

 

http://www.oscommerce.com/community/contributions,1061

Link to comment
Share on other sites

Yay, managed to fix my earlier problem relating to installing the Event Calendar on MS2.2:

Fatal error: Cannot pass parameter 3 by reference in .../catalog/events_calendar.php on line 323

Basically, I replaced one of the files modified (/catalog/includes/classes/split_page_results.php) in the Event Calendar contribution with it's unmodifed version from an earlier backup.

Not sure exactly what part of the code wasn't working, but am happy now that my Calendar works ;-)

Hope this helps someone else...Rob

Link to comment
Share on other sites

  • 2 weeks later...

OK, hopefully someone can help me out here. I am very new to this php stuff, but I am getting the hang of it.

 

I set up the event calendar, and everything is working fine except when I pull up the events calendar from the admin area. When I do open the admin area I get this error

 

1054 - Unknown column 'description' in 'field list'

 

select *, LENGTH(description) as content_length from events_calendar where language_id = '1' order by start_date

 

[TEP STOP]

 

I can't add any events either. I am assuming because of the same error as above.

 

Can anyone figure out what I've done wrong??

 

Thanks a bunch in advance :)

Link to comment
Share on other sites

Hi jasonaudio,

did you add the db table ?

DROP TABLE IF EXISTS events_calendar;

CREATE TABLE events_calendar (

event_id int(3) NOT NULL auto_increment,

language_id int(11) NOT NULL default '1',

start_date date NOT NULL default '0000-00-00',

end_date varchar(20) default NULL,

title varchar(255) default NULL,

event_image varchar(64) default NULL,

link varchar(255) default NULL,

OSC_link varchar(255) default NULL,

description text,

date_added datetime NOT NULL default '0000-00-00 00:00:00',

PRIMARY KEY (event_id,language_id)

) TYPE=MyISAM;

you can use "phpMyAdmin" or something similar.

Link to comment
Share on other sites

hi alverman,

hi all,

 

first big thanx for the calendar. its a great contrib and it fits perfectly to my side.

 

since today - and I am using the calendar for 4 weeks - my shopping cart link "continue shopping" has changed to this:

 

http://www.xxxxxxx.at/cat/calendar_content...?_month=&_year=

 

instead of the two steps back, set in the shopping_cart.php.

--> $back = sizeof($navigation->path)-2;

 

That happens after having updated any of the shopping cart content by the customer.

I tried to change the steps back to 1, and 3 whatever...that doesnt work.

 

There is a conflict, but, sorry, I can not find it.

any ideas ?

 

jako

Link to comment
Share on other sites

It's because the calendar is loaded inside the i-frame and therefore also the calendar page is added to "navigation history" (did not think about it before).

Try this:

in catalog/includes/application_top find:

$navigation->add_current_page();

and change to :

if (basename($PHP_SELF) != FILENAME_EVENTS_CALENDAR_CONTENT){
 $navigation->add_current_page();
}

 

by the way also "who's on line" in admin, is affected by the same problem so in catalog/includes/application_top find:

// include the who's online functions
 require(DIR_WS_FUNCTIONS . 'whos_online.php');
 tep_update_whos_online();

and do the same thing:

// include the who's online functions
if (basename($PHP_SELF) != FILENAME_EVENTS_CALENDAR_CONTENT){
 require(DIR_WS_FUNCTIONS . 'whos_online.php');
 tep_update_whos_online();
}

HTH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...