PDA


View Full Version : [Module] Upcoming Events - Standalone Version


Pages : [1] 2 3

Tom M
12-10-2005, 11:54 AM
After several requests I am releasing the standalone version of my implementation of the Upcoming Events module.

Upcoming Events
Critical controls done via module ACP including
Specifying which calendar to use
Number of days to look at
Display grouping (Event or Days)
Optionally display a 'No Events' message when no events available
Limit the number of events displayed

The way the dates are displayed has been changed to only show a start and end date instead of multiple dates when dealing with recurring or ranged events. Additionally, the earliest date shown will be the current date. Single date events will only have that date shown.

Lastly, events displayed when Group by Event is chosen will be shown in date order instead of by event ID (when will vB figure this out?).

The Upcoming Events section makes use of 2 new templates, adv_portal_todaysevents, and adv_portal_upcomingevents which has the phrase "Upcoming Events" in it.

This has been tested and works with the existing minicalendar module as well as my combocalendar module running at the same time. Like the combocalendar, the only real limitation is that the number of days specified for the upcoming events will be limited to the number specified for the Forum Home Page Display as the databuild routine references that variable.

Revisions

2/11/07
Corrected a minor problem when links are sorted by date instead of by event. To upgrade replace the upcoming35.php file with the new version. The module file has also been updated.

12/19/05
Corrected a problem when dealing with admin-defined Holidays. Only the php file was changed so that's all the needs to be uploaded. To display holidays it is necessary to modify the CMPS index.php file by adding the portion in red. If you already have phrasegroups listed then simply add it to them.
$phrasegroups = array('holiday');

9/5/06
Updated the code to support the display of multiple calendars, either in a single module or by using multiple modules. Also added the ability to limit the number of events displayed within a module. To use this new capability download the upcomingevents35.module file as I am also leaving the original version in place for those that may still want it.

To use the new version the existing installation will need to be deleted prior to installing the update. You may also delete the upcomingevents.php file if desired or simply rename the new one as either method will work. By default the module is set to display all the events that occur within the specified number of days. To create multiple modules for several calendars use the CMPS module "Copy" feature to first create a copy and then configure it the way you desire.

To display all calendars in a single module similar to the way events display on the Forum Home page use the "Simple" calendar.


PS - If you like this module and would like to make a donation you can do so via PayPal.
https://www.paypal.com/en_US/i/btn/x-click-but04.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support%40babblers%2eorg&item_name=Babblers%20Support%20Donation&no_shipping=0&no_note=1&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8)

Mithan
12-10-2005, 01:11 PM
Not sure if it matters, but I needed to go in and CHMOD the files to 777 after they were uploaded for this to work.

Tom M
12-10-2005, 01:22 PM
Not sure if it matters, but I needed to go in and CHMOD the files to 777 after they were uploaded for this to work.Glad you got it to work. This probably has something to do with the way your server is set up. In my case all of my modules are running just fine with 644 settings.

abel
12-15-2005, 10:25 PM
kinda weird... i added it and it wont display certain items for some reason... i have say 6 events coming up and it only displys 4 which are all the same ranged event.

leeme look into it some more.

Tom M
12-15-2005, 11:30 PM
kinda weird... i added it and it wont display certain items for some reason... i have say 6 events coming up and it only displys 4 which are all the same ranged event..When are the events? How many days do you have the look ahead set for?

If you have a link I'll be happy to take a look at it as well.

phoenixdown
12-16-2005, 01:16 AM
Glad you released this. I was having problems getting the other one to work correctly.

abel
12-16-2005, 08:06 AM
hey there tom... ill post some links here in a bit.

i set the days to like 14. it caught the events occuring on the 24th and 25th but did not display a couple of events on the 17th and 21st.

pretty weird. lonce i get into the office this morning ill post u some links. Thanks!

abel
12-16-2005, 08:11 AM
here it is...

http://www.texasphotoforum.com/cmps_index.php

on the 17th, there are two events on that day as well as one on the 21st...

Tom M
12-16-2005, 12:21 PM
here it is...

http://www.texasphotoforum.com/cmps_index.php

on the 17th, there are two events on that day as well as one on the 21st...As a guest I don't see any events on either the cmps page or the forumhome page. Do I need to register to see calendar events?

abel
12-16-2005, 12:23 PM
see thats what i saw as well once i logged out...

ahh wait a minute... i think i see a problem.. lemme check the pathe for the calendar.php

abel
12-16-2005, 12:26 PM
try this link instead

http://www.texasphotoforum.com/forum/cmps_index.php

Seej
12-17-2005, 11:21 PM
Is there any way to display an event's custom fields with this module?

I'd like to use it as a center block with columns displaying additional event information from the custom fields.

Something like this for each event:
| Start Date | EventName | CustomField1 | CustomField2 |

Tom M
12-18-2005, 12:54 AM
If you have custom fields the information should be available as part of the $eventinfo array. All you should then need to do is modify the adv_portal_todaysevents template to format the information how you'd like it.

conkien
12-18-2005, 11:42 PM
Thank you for making this module for us Tom.

One thing, this module pull the date straight from the calendar and display it. If an event, say a party, start from midnight to the next moring (ex 11PM - 2AM), it will display 2 events for ONE party.

At vbulletin.org, there's a hack that take care of this problem, it only shows as a single event on top of the forum specify for the calendar even the situation as describe above. Is there a way you could make this for your hack? The hack @ vbulletin.org is located here:

http://www.vbulletin.org/forum/showthread.php?t=102213&highlight=vb+event

Tom M
12-18-2005, 11:49 PM
I'm not really sure what you're asking here.

The event spans 2 days and so will show on 2 days if Group by Date is chosen. If the display mode is set to Group by Event it will only appear once as it's a single event.

abel
12-19-2005, 03:15 PM
hey there tom... any chance youve taken a look at my portal page..

http://www.texasphotoforum.com/forum/cmps_index.php

im really stuck on the reasoning as to why it is not listing certain items... very weird.

thanks in advance

Tom M
12-19-2005, 05:11 PM
I logged in and don't see any events on the forum home page. Do you have those activated?

I do see events on the cmps page but not the test events. Are they all on the same calendar?

abel
12-19-2005, 05:15 PM
yeah theyre all on the same calendar...

the events only show up on the main forum index page the day they occur... not upcoming. i need to look and see if theres an option for that.

on the CMPS page u can see the ICE AT GAYLORD events... well u can also see the Mini Calendar there as well and theres an event for the 21st. its just a test event but the info is on the calendar.

very weird.

abel
12-19-2005, 05:18 PM
ahh ok... if i change the events to display on the forumhome page say 7 days out and now the events on the 21st show up on the cmps page

i wasnt aware they were tied in to each other

i guess since the Gaylord event is ranged and occurs every weekend for some reason it got posted on the cmps page

Tom M
12-19-2005, 05:24 PM
ahh ok... if i change the events to display on the forumhome page say 7 days out and now the events on the 21st show up on the cmps page

i wasnt aware they were tied in to each other

i guess since the Gaylord event is ranged and occurs every weekend for some reason it got posted on the cmps pageOf course! Slaps forehead :eek:

The cached events won't go out any further than the datacache for the main page. It even says that, though perhaps not as clearly as it could, on the options page for the module. This is because the functions that fetch the events information reference the number of days specified for the forumhome page. Not much can be done about that w/o hacking the code.

abel
12-19-2005, 05:27 PM
not a problem...

sorry tom for giving u the run around on my issue.. hehe...

i guess i should read the module page a bit more slowly. i guess i was in a hurry.

i dont mind posting the upcoming info on the forumhome page, in fact i think its better that was instead of just displaying the event the day it occurs.

thanks again for the help and feel free to slap my forehead as well.. hehe

Tom M
12-19-2005, 11:54 PM
An new version of the upcomingevents module which corrects a problem when dealing with holidays has been placed in the first post. If you don't show holidays there's no need to update anything.

Tom M
01-15-2006, 11:25 PM
question: where do I get the templates that are mentioned? when I installed this, they didn't appear in my templatesThe templates are part of the .module file included in the first post. If it was installed properly they should definitely be there. Did you install this in a specific style instead of the default style?

The other possibility is that you may be looking in the wrong place. They won't appear with the other CMPS templates. Instead, they'll be up at the top of the list under 'Custom Templates'.

Andy R
03-02-2006, 09:10 PM
I have this module running (thanks Tom!) but I have a few questions. I want to customize the templates so that the info will fit better. I have edited adv_portal_todaysevents but cannot seem to get the tweaks I want.

You can see the module here:
http://www.airstreamforums.com

I plan to reposition it and make it fit in better shortly...

What I would really like to do is two things:
1. remove the event icon so that it is only text
2. Change the date so it does not include year since with the year it does not fit in the column.

Will these changes be possible with this module?

Thanks,

Andy

Tom M
03-02-2006, 09:30 PM
What I would really like to do is two things:
1. remove the event icon so that it is only text
2. Change the date so it does not include year since with the year it does not fit in the column.

Will these changes be possible with this module?
To make both of those changes you'll need to edit the upcomingevents.php file. The dates can be converted however you would like them w/o too much trouble and dropping the leading >> is easy as well. It will help if you are a bit familiar with php but if you have any programming background it should still be pretty easy.

ang2el
03-08-2006, 05:28 AM
I uploaded the module and applied it couldn't display the events help please

Tom M
03-08-2006, 09:27 AM
I uploaded the module and applied it couldn't display the events help pleaseIf no events show then

1) Do they show on your forum home page?
2) How many days do you have selected for forum home and this module?
3) Is it using the correct calendar?

Also

4) Is the module marked as Active?
5) Is the module selected to display on the page?

If it still doesn't show after going through the above then a link to the web site would be helpful.

s1opp
03-10-2006, 04:13 PM
I need a little help.

I can't get this module to show.

I've uploaded it, it's active.

I have an event in showing on Forumhome.

But nothing displays on CMPS.

I'd like to remove it completely and install it again, but I can only remove so much and not everything, after I think I've got all of it off, I get this error when I try and upload it.

Invalid SQL:
INSERT INTO phrase (languageid, varname, text, phrasetypeid) VALUES (0,
'setting_portal_ue_showevents_title', 'Events Event Days', 5000);

MySQL Error : Duplicate entry 'setting_portal_ue_showevents_title-0-5000' for
key 2
Error Number : 1062
Date : Friday, March 10th 2006 @ 07:46:49 PM
Script : http://www.sparkyslider.co.uk/forum/admincp/vba_cmps_admin.php
Referrer :
http://www.sparkyslider.co.uk/forum/admincp/vba_cmps_admin.php?do=download
IP Address : ********
Username : *****
Classname : vb_database



How do I get completly remove all traces of this module?

nb. not because I don't want it, but I need it to work!

Tom M
03-10-2006, 05:16 PM
I need a little help.

How do I get completely remove all traces of this module?

nb. not because I don't want it, but I need it to work!
I'm not sure why vBa doesn't remove it all. The only solution I know of is to remove this left over bits from the db manually. One can use phpMyAdmin to do this or it can be done via the ACP. If you aren't up to the task or aren't sure I can do it for you. If the latter is the case then let me know via a PM and send along the necessary information so I can access your Cpanel or ACP (your choice).

yinyang
03-14-2006, 04:10 AM
Tom, great work as usual. *clicks install*

DMH
03-14-2006, 09:31 PM
I have got to be doing something wrong. Can someone tell me how to get this installed and working? Maybee on like a third grade level?

thanks

DMH
03-15-2006, 09:19 AM
In my modules folder I have a upcomingevents.ph p file along with the upcomingevents.module file.

is the .module file supposed to be there?

Tom M
03-15-2006, 11:06 AM
In my modules folder I have a upcomingevents.ph p file along with the upcomingevents.module file.

is the .module file supposed to be there?The .module file would only be there if that's where you uploaded it to/installed it from. Once installed the .module file could be deleted if desired.

Do you have the vBa module set up and running?

DMH
03-15-2006, 11:31 AM
The .module file would only be there if that's where you uploaded it to/installed it from. Once installed the .module file could be deleted if desired.

Do you have the vBa module set up and running?

I uploaded it thru vba CMPS, download/upload module and that's were it ended up.

The module is there but I can't get it to show up on the vba page.

http://www.floridaquadriders.com/cmps_index.php

Also, I cannot find the page of the screen shot you posted!:confused:

If you have any ideas on what is wrong or what I did wrong I'd really appreciate the help.

Tom M
03-15-2006, 11:59 AM
I uploaded it thru vba CMPS, download/upload module and that's were it ended up.

The module is there but I can't get it to show up on the vba page.

http://www.floridaquadriders.com/cmps_index.php

Also, I cannot find the page of the screen shot you posted!:confused:

If you have any ideas on what is wrong or what I did wrong I'd really appreciate the help.It sounds like you installed it but it's not showing up. Correct?

1. Is the module marked as Active?
2. Is it selected to display on the page?
3. Are there any events to show?

The screen shot should be in the first post in this thread.

DMH
03-15-2006, 12:18 PM
"It sounds like you installed it but it's not showing up. Correct?"

Correct!

"1. Is the module marked as Active?"
Yes

"2. Is it selected to display on the page?"
Yes

"3. Are there any events to show?"
Yes, one today and one for tomorrow

"The screen shot should be in the first post in this thread."

I can see it in your post but I can't find that menu in my cp. Sorry for the confusion.

Tom M
03-15-2006, 12:37 PM
"The screen shot should be in the first post in this thread."

I can see it in your post but I can't find that menu in my cp. Sorry for the confusion.Ah, that makes more sense!

Those options/variables should be at the bottom of the settings page for the module.

DMH
03-15-2006, 12:52 PM
Edit Modules/Upcoming Events

I've got:

"Edit Module: Upcoming Events"

"Main Options"

"PHP File Module Options"

"Module Shell Template Options"

and

"Usergroups"

:confused:

DMH
03-15-2006, 01:00 PM
Also started getting this error:

Database error in vBulletin 3.5.3:

Invalid SQL:
INSERT INTO phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'setting_portal_ue_showevents_title', 'Events Event Days', 5000);

MySQL Error : Duplicate entry 'setting_portal_ue_showevents_title-0-5000' for key 2

Tom M
03-15-2006, 01:14 PM
Also started getting this error:

Database error in vBulletin 3.5.3:

Invalid SQL:
INSERT INTO phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'setting_portal_ue_showevents_title', 'Events Event Days', 5000);

MySQL Error : Duplicate entry 'setting_portal_ue_showevents_title-0-5000' for key 2Did you delete the module and/or try ti install it again? If so, you will need to manually clean up the db using phpMyAdmin or some other mechanism before it can be installed as there's a bug in vBa where it doesn't seem to clean up properly on a module delete.

DMH
03-15-2006, 02:08 PM
Did you delete the module and/or try ti install it again?
A few times!

"manually clean up the db" sounds like fun, guess I'm off to learn that. Thanks for all the help.

s1opp
03-17-2006, 06:06 AM
"manually clean up the db" sounds like fun, guess I'm off to learn that. Thanks for all the help.

That's pretty much where I left it. I need to find some time to get this sorted.

DMH
03-18-2006, 09:05 AM
That's pretty much where I left it. I need to find some time to get this sorted.

I chickened out and just installed this one.:D

http://www.vbadvanced.com/forum/showthread.php?t=13312

Thank again for all the help Tom

Tom M
03-18-2006, 10:53 AM
I chickened out and just installed this one.:D

http://www.vbadvanced.com/forum/showthread.php?t=13312

Thank again for all the help Tom
Well, since it's basically the same code I'm happy ;). And yes, the 2 modules can coexist with each other.

BTW - If you'd like help with the db stuff let me know via a PM.

DMH
03-18-2006, 11:35 AM
BTW - If you'd like help with the db stuff let me know via a PM.

Tom, I appreciate the offer but for now I have mooched enough off of ya. Let me get some funds in the paypal account and I'll be in touch.

Thanks a bunch

jaygreentree
03-18-2006, 01:39 PM
Im getting the error

Fatal error: Cannot redeclare ue_compare_dates() (previously declared in /modules/upcomingevents.php:4) in /modules/upcomingevents.php on line 4

Can I get some help please?

Tom M
03-18-2006, 02:39 PM
Im getting the error

Fatal error: Cannot redeclare ue_compare_dates() (previously declared in /modules/upcomingevents.php:4) in /modules/upcomingevents.php on line 4
Can I get some help please?Do you have things installed more than once or did you copy the module and have it running twice?

Do you have something else that has "upcoming events" displayed?

jaygreentree
03-19-2006, 05:02 AM
Do you have things installed more than once or did you copy the module and have it running twice?

Do you have something else that has "upcoming events" displayed?
I downloaded the the full version with calendar and struff and that worked

Rukbat
04-01-2006, 11:43 AM
Works great, easy install. Used this standalone over the other available module since the minical and birthdays were already on my CMPS page after initially installing vBadanced.

Question tho:
I have two different calendars that my 'group' uses. Is it possible to have the upcoming events pull from one calendar and the birthdays/mini-calendar pull from the other one?
Sorry if that sounds silly....

Tom M
04-01-2006, 11:54 AM
I have two different calendars that my 'group' uses. Is it possible to have the upcoming events pull from one calendar and the birthdays/mini-calendar pull from the other one?
Since you are using the minical and birthdays as separate modules from the upcoming events you should be able to specify a different calendar for the events in the module options.