PDA

View Full Version : Calendar Enhancements - Calendar Search and Export


HCGB
03-29-2010, 10:00 PM
Calendar Search and Download


There is a vB4 version of this mod HERE (https://vborg.vbsupport.ru/showthread.php?p=2007617#post2007617)


Features:
Adds a calendar quick search and advanced search to the Search menu on the navbar. You can search in username, event title, description. custom fields, calendar and by year/month range. You can also export the search results (or the full calendar) as an iCalendar file (for import into a PC, mobile, Google, etc) or as a PDF text document.

Both export functions include email contact information for the event poster (provided that the current user has permission to view member groups and send emails AND the event poster allows email contact).

Also supports automated Google Calendar updates (view your vB site calendar on Google alongside your other calendars!)

You can use the automatic indexing feature in Google Calendars to view your forum calendar (and sync it with your Nokia/iPhone/BlackberryAndroid/etc cell phone). Only calendars that have unregistered user access will be viewable (Unregistered Usergroup->can view calendars & ->view others events to yes).

To setup Google Calendars (http://www.google.com/calendars) to view your vB calendar(s) , select Other calendars->add->add by URL then enter http://your_forum_url/calsearch.php?do=gcal (replacing your_forum_url with your real forum URL!). Google can take many hours to actually index the vB calendar so be patient! If you want to start from a particular year - &startyear=20xx (it defaults to the current year).

Tested with Vbulletin 3.8.4/3.8.5 and vBadvanced 3. Product has no custom phrases or template/code edits. It uses one template hook location in the navbar.


Settings:
None are needed - it does what it says on the tin :p.

AdminCP->vbulletin->options->message searching options->search results per page

Determines the number of event items displayed per page.


Installation

Unzip the download package and copy the contents of the UPLOAD folder into your forum folder.
Go to the VB AdminCP->Plugins & Products click "Manage Products". The click "Add/ImportProduct" at the bottom of the page.
Click "Browse" button and point to the product-calsearch-(etc).XML file included in this ZIP package.
Click "Import"... all done


Updates

To update- uninstall the product AND delete the uploaded file calsearch.php then re-install as above.

v1.09b
Added month selection options
v1.08b
Now allows reverse date order search (by entering a "To" year less than the "From" year.
Fixed user timezone issue with iCal files

John

inciarco
04-01-2010, 05:00 PM
Very Interesting Mod. :up:

Thank You For Sharing It; Works Fine on vB38x.

One Question:

Is it possible to Sort the Results to View the Most Recent Ones First. (If I Search Events From 2005 to 2010, it'll Display the Oldest Events First). :confused:

I Liked a Lot All the Search Options on the Search Results Page (calsearch.php), as well as the Displayed Info of the Events.

I Hope Results Can be Sorted Recent to Oldest. ;)

My Best Regards.

:)

HCGB
04-01-2010, 06:41 PM
Is it possible to Sort the Results to View the Most Recent Ones First. (If I Search Events From 2005 to 2010, it'll Display the Oldest Events First). :confused:

Thanks for the comments. I find your request a bit strange - none of the calendars I've seen or used display in reverse order (newest to oldest) - it doesn't make sense for most users as calendars always look toward the future.

This mod will default to the current year onwards for the search - that's what most people want (to see what is happening in the near future) - unless you can convince me otherwise ;)

inciarco
04-02-2010, 03:55 AM
You're Right. ;)

One Important Thing I Just Noticed:

Guests Can Search Without Any Limit.

- How Can I Restrict Usergroups From Using The "calsearch.php" File and/or the Searching Options? :confused:

- Is there a way to Connect it with the Usergroup Search Permissions? (if an Usergroup don't have Search Permissions then Don't Display the Search Form and Options) :confused:

I Appreciate Your Instructions to Limit Usergroups From Making Calendar Searches.

My Best Regards.

:)

HCGB
04-02-2010, 07:13 AM
Is there a way to Connect it with the Usergroup Search Permissions? (if an Usergroup don't have Search Permissions then Don't Display the Search Form and Options) :confused:

It respects calendar permissions (AdminCP->Calendars->Calendar Permissions) and usergroup calendar permission (AdminCP->UserGroup Manager : <group> : Calendar Permissions)

inciarco
04-02-2010, 11:48 AM
It respects calendar permissions (AdminCP->Calendars->Calendar Permissions) and usergroup calendar permission (AdminCP->UserGroup Manager : <group> : Calendar Permissions)

Thank You For The Update, HCGB. :up:

What Code Can I Add To Hide the Search Form and if I Like the Entire Calendar Page From Certain Usergroups? :confused:

I don't Like Visitors (Usergroup 1), Not Activated (Usergroup 3), Not Approved (Usergroup 4), and Other Banned Usergroups (Included 8), To Be Able to Make Searchs with the "calsearch.php" Page. :confused:

I'll Apply the Same Code You Provide For This Mod to Your Album and Pictures Gallery, where I Asked the Same Question, (I'd like to Hide the Search Form on Both Pages on "albumall.php" and "picall.php", because I don't want certain Usergroups to Make Searchs). :confused:

I Usually Set this Permissions on the Mod's Templates, but Your Mods have Everything on the php Files, and I haven't done this Coding for Usergroup Permissions on the php Files. :confused:

I Appreciate Your Help by Providing me the php Code I should Use to Set Those Usergroup Permissions. ;)

My Best Regards.

:)

HCGB
04-02-2010, 02:31 PM
Thank You For The Update, HCGB. :up:

What Code Can I Add To Hide the Search Form and if I Like the Entire Calendar Page From Certain Usergroups? :confused:

I don't Like Visitors (Usergroup 1), Not Activated (Usergroup 3), Not Approved (Usergroup 4), and Other Banned Usergroups (Included 8), To Be Able to Make Searchs with the "calsearch.php" Page. :confused:

Now I'm confused - why would you want to hide the search options when the user will still be able to view all of the calendar content? All you are doing is making life slightly harder for them - you aren't stopping them accessing anything? If you want them not to be able to view the calendar then set their usergroup (or calender) permissions.

I Usually Set this Permissions on the Mod's Templates, but Your Mods have Everything on the php Files, and I haven't done this Coding for Usergroup Permissions on the php Files. :confused:
Although I don't understand the reason why you would want to stop people searching pictures but still let them view them all - you could easily modify the templates to remove the search option form for particular groups (you don't need to touch the PHP code at all)

inciarco
04-02-2010, 05:46 PM
...
Although I don't understand the reason why you would want to stop people searching pictures but still let them view them all - you could easily modify the templates to remove the search option form for particular groups (you don't need to touch the PHP code at all)

You're Right I wasn't Smart Enough to Analyze the XLM Code and Check the Created Templates to Notice that I Just Needed to Edit the Templates "calsearch_result" for the Calendar Search and "gallery_albumall" for the Albums and Pictures Galleries.

Thank You For Pointing me that there were Templates, I don't know why I thought there weren't and that Everything was done with the php Files.

I Appreciate Your Patience and Help.

My Best Regards.

:)

inciarco
04-04-2010, 01:53 PM
Thank You Veru Much For the Update, HCGB. :up:

:)

inciarco
04-04-2010, 02:11 PM
I've Tested this Mod and the Album and Picture Gallery on vB373 PL1, and both Mods Work Fine. :up:

One Small Detail I Found:

On the Template "calendar_search" you have a "+-" text at the end of all the Template Code that should not be there; it should be removed because it displays that text above the Search Dropdown Menu. :confused:

My Best Regards.

:)

HCGB
04-06-2010, 06:33 AM
Fixed- re download the 109b version.

OpenPitLane
04-09-2010, 08:28 PM
We have rather a large calendar at http://openpitlane.co.uk/index.php?pageid=trackdays and this functionality would be great for our users.

But will it work with 3.6.8 by any chance, or do I need to upgrade?

HCGB
04-12-2010, 11:05 AM
We have rather a large calendar at http://openpitlane.co.uk/index.php?pageid=trackdays and this functionality would be great for our users.

But will it work with 3.6.8 by any chance, or do I need to upgrade?

No idea - It doesn't modify the database so it's perfectly safe to test it on older versions.

OpenPitLane
04-12-2010, 05:35 PM
No idea - It doesn't modify the database so it's perfectly safe to test it on older versions.

Great - I will give it a test. Thanks so much for replying. :D

OpenPitLane
04-12-2010, 06:05 PM
Great - I will give it a test. Thanks so much for replying. :D

It won't actually let me import the xml file as we are on version 3.6.8. Is there a way to get round this?

HCGB
04-13-2010, 12:41 PM
It won't actually let me import the xml file as we are on version 3.6.8. Is there a way to get round this?

Edit the XML file and, on line 10, change minversion="3.8.4" to minversion="3.6.8".

OpenPitLane
04-13-2010, 05:11 PM
Edit the XML file and, on line 10, change minversion="3.8.4" to minversion="3.6.8".

Done and installed. Many thanks.

OpenPitLane
04-15-2010, 03:58 PM
I have just noted that on our install, all the dates displayed are one day out. This is the location:

http://www.openpitlane.co.uk/forum/calsearch.php

All our events are saved as single - all day events if that make any difference. I have tried adjusting the timezone back to GMT (as they would have been created in).

Any help appreciated.

benstillman
10-22-2010, 01:53 AM
I have just noted that on our install, all the dates displayed are one day out. This is the location:

http://www.openpitlane.co.uk/forum/calsearch.php

All our events are saved as single - all day events if that make any difference. I have tried adjusting the timezone back to GMT (as they would have been created in).

Any help appreciated.

Same problem. Any fix yet?

benstillman
10-22-2010, 02:14 AM
Also need to get the emails removed from iCal and PDF. How would I go about doing that?

This is an awesome mod. I'd love to be able to release it to my users.

benstillman
01-18-2011, 06:52 PM
Welp, uninstalled. No supported in three months. Oh well.

imedic
02-17-2011, 07:07 PM
I have database error when using the search capability in both advance or direct search.
I have to uninstall it and keep an eye if something is changing.

Idea is great!

helvbu
04-11-2011, 06:09 PM
Thanks for this plugin!

It work great on english language but we received an error when we switch in french language.

try it on my forum http://forums.hobbyclassified.com/calendar.php and switch in french