Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Calendar Search and Download Details »
Calendar Search and Download
Mod Version: 1.10, by HCGB (Coder) HCGB is offline
Developer Last Online: Oct 2012 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (6 votes - 5.00 average) Installs: 51
Released: 21 Mar 2010 Last Update: 15 Apr 2010 Downloads: 310
Not Supported Uses Plugins Additional Files Re-usable Code Translations  

Calendar Search and Download for vB4


This mod addresses yet another basic feature missing from vB4 - calendar search and download


Features:


Replaces the Calendar menu item with a drop-down menu which adds a calendar search and export function. 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).

NEW! - v1.04b onward supports automated Google Calendar updates (view your vB 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 4.0.2 AND vBadvanced 4 beta. Product has no custom phrases or template/code edits. It uses two template hook locations in the navbar to change the calendar menu to a drop-down.


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

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

Determines the number of event items displayed per page.


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


Updates

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

v1.10
tested with vB 4.0.3
Recurring events now grouped by date
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
v1.07b
Added full support for recurring events (also included in iCal export)
v1.06b
Changed search option layout
Start year now uses current year if no year selected (iCal/PDF/Google downloads all start from current year).

v1.05b
Standardised phrasing
Added "no events found" message
v1.04b:
Added calendar selection dropdown
Fixed IE layout issues
Added Google Calendar support
v103b:
Fixed time zone issue yet again (it DOES work this time!)
v102b:
Fixed time zone issue properly this time
Added drop down to select search field
Added support for searching custom calendar fields.
v101b:
Fixed time zone date calculation (was showing event on wrong day in some locales)



John

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 27 Mar 2010, 21:31
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by is_it_me View Post
OK, I’ve had a chance to install this and I am well pleased with results so far, just a couple of things that would be an improvement if possible.

1 - by default the date range selected is 2008 - 2037; surely it should start with 2010, it’s only a small thing, but is there an easy way of changing it?

2 - the 'search for' button (or renamed 'search now') should be positioned at the end of all the options you need to complete/consider, i.e. after the date range, at the moment you work your way from left to right and when you get to the end you have to go back to the start to press search. Does that make sense?

3- and I agree with digibyte about making the drop-down menu optional, if possible.
I've made some changes (v1.06b+) which address some of these issues. The start year defaults to the current year (the drop-down allows earlier years to be selected). The search options have been rearranged to make better use of page space. The calendar selection remains as there is no easy way to handle multiple calendars otherwise

You may find it easier (now a decent calendar search is available ) to use calendar custom fields to categorise your event entries in a single calendar rather than having multiple calendars? That would get rid of the calendar selection drop-down!
__________________
Reply With Quote
  #17  
Old 27 Mar 2010, 22:58
is_it_me is_it_me is offline
 
Join Date: Mar 2009
Talking

Originally Posted by HCGB View Post
I've made some changes (v1.06b+) which address some of these issues. The start year defaults to the current year (the drop-down allows earlier years to be selected). The search options have been rearranged to make better use of page space. The calendar selection remains as there is no easy way to handle multiple calendars otherwise
Now that's what I call service, shame you're not running IB/Jelsoft at the moment.

The search options order seems so much more logical and layout cleaner, great improvement.

You may find it easier (now a decent calendar search is available ) to use calendar custom fields to categorise your event entries in a single calendar rather than having multiple calendars? That would get rid of the calendar selection drop-down!
I’ll have a think about that, my first thoughts is it maybe not a great idea for my sort of site – it would work if you knew what you were looking for, i.e. a search for ‘Fred’s Flying Circus’ brings up one result, and that’s happening 7-days a week for the period it’s listed for.

I did a search for ‘Car Boot Sale’ for 2009, on the basis the season hasn’t started properly yet this year, and it returns 50+, but recurring ones are only listed for the date range and not the day of the week. So, for example, it would be easier to view a calendar and see what particular ones were on for this Sunday.

Another example would be cinema listings; again if you just wanted to see what’s on this week, rather than a specific film, a search would list everything for the whole year, as you can’t search just for a weekend/week or month.

Just noticed a search for ‘car boot sales’ doesn’t return results for ‘car boot sale’, which is actually how most of them are listed as they are singular events, but I can see people searching by the plural.

Although, I guess, that’s where custom fields could work, not that I would have a clue how to put them in place, until I got hold of vb4.02 about four weeks ago my only ‘web-build’ experience was running a standard vb3 installation for a year, with no hacks nor mods installed even!

I am a right numpty, but learning fast, for some reason I thought upgrading and adding a few bells and whistles was going to be easy.
Reply With Quote
  #18  
Old 28 Mar 2010, 21:16
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by is_it_me View Post
Now that's what I call service, shame you're not running IB/Jelsoft at the moment.
...
I did a search for ‘Car Boot Sale’ for 2009, on the basis the season hasn’t started properly yet this year, and it returns 50+, but recurring ones are only listed for the date range and not the day of the week. So, for example, it would be easier to view a calendar and see what particular ones were on for this Sunday.
Attached is an updated version (now included in mod!) that handles recurring events by listing them (and their event dates) if they are occur within the selected year range. I haven't properly tested monthly recurring events as I can't work out how you set them in the calendar (the user interface is seriously deficient in that area ).

Just noticed a search for ‘car boot sales’ doesn’t return results for ‘car boot sale’, which is actually how most of them are listed as they are singular events, but I can see people searching by the plural.
Works OK here. The search works on event titles and content, not the calendar title (you can select the calender from the drop-down)
__________________

Last edited by HCGB; 02 Apr 2010 at 18:37.
Reply With Quote
  #19  
Old 29 Mar 2010, 09:54
is_it_me is_it_me is offline
 
Join Date: Mar 2009
Originally Posted by HCGB View Post
Attached is an updated version that handles recurring events by listing them (and their event dates) if they are occur within the selected year range. I haven't properly tested monthly recurring events as I can't work out how you set them in the calendar (the user interface is seriously deficient in that area ).
Nice one - that seems to work OK, even for monthly recurring events - I've tested it on a couple of business networking events and Chamber Chat comes up as 'Monthly....First Wednesday' and the First Friday Network comes up as monthly and, as you would expect, on the First Friday - lol.

I agree the user interface for adding events is crap, worst than on vb3, and is causing my users confusion hence I am either having to add events myself or moderate most users adding their own, so I can correct mistakes.

Actually, there’s a thought, the search returns a ‘contact’ on the right of results, which is the person that added the event but not necessary the organiser/contact for it, could that be made optional, or maybe replaced with the ‘to & from’ times?

Works OK here. The search works on event titles and content, not the calendar title (you can select the calender from the drop-down)
That's odd, because a search for car boot sales (with the 's') brings up 3 results, 2 of which doesn't include the 's' in event title nor content, in fact one doesn't even use the words 'sale or sales'.

However, a search for car boot sale returns 7 results and a search for just car boot brings up 8 results - be buggered if I can work out why.

Similar problems searching for farmers' market but worst because you can add an 's' or not to both the words and it doesn't return those with the apostrophe if you haven't included the apostrophe in the search, e.g. farmers market

ETA - And even worst it shows me up for the misuse of the apostrophe when I've imputed some as 'Farmer's Market'.

Last edited by is_it_me; 29 Mar 2010 at 10:12.
Reply With Quote
  #20  
Old 29 Mar 2010, 12:44
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by is_it_me View Post
That's odd, because a search for car boot sales (with the 's') brings up 3 results, 2 of which doesn't include the 's' in event title nor content, in fact one doesn't even use the words 'sale or sales'.
All three entries contain "sales" (one has invisible text with the word in it - do a browser search on the event page and you will find it)

However, a search for car boot sale returns 7 results and a search for just car boot brings up 8 results - be buggered if I can work out why.
"car boot" is in "car boot sales" so it will find both (it's a simple character string search , not a word list search).

Similar problems searching for farmers' market but worst because you can add an 's' or not to both the words and it doesn't return those with the apostrophe if you haven't included the apostrophe in the search, e.g. farmers market
Are you expecting the search to know that you meant to add an apostrophe in the middle of the search phrase?

The product has been updated in the orginal post above to include the recurring event code. The iCal/Google export also now supports recurring events.
__________________
Reply With Quote
  #21  
Old 29 Mar 2010, 18:05
Turbe Turbe is offline
 
Join Date: Apr 2008
You have two v1.06b in your changelog
Reply With Quote
  #22  
Old 30 Mar 2010, 16:44
gorman gorman is offline
 
Join Date: Sep 2002
How can I disable e-mail showing in the pdf and icalendar downloads? I'm using the send mail feature of vbulletin and don't want the email address of users clearly shown.

Thanks for the awesome mod, just what I was looking for.
Reply With Quote
  #23  
Old 30 Mar 2010, 18:50
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by gorman View Post
How can I disable e-mail showing in the pdf and icalendar downloads? I'm using the send mail feature of vbulletin and don't want the email address of users clearly shown.
If the event poster has email disabled in their settings then they won't show in the PDF or iCal files.

I've also modified the code (download v1.07b again) to check the email sending permissions of the current user - if they are not allowed to send email then it won't appear in the files.
__________________
Reply With Quote
  #24  
Old 31 Mar 2010, 16:20
gorman gorman is offline
 
Join Date: Sep 2002
Thanks for the answer. But I'm using the mail sender inside vB because I do not want to publish user's email in the clear. The PDF does just that.

Even if users accept emails, on my forums they are sent emails by the internal module. Other users do not have access to their addresses (unless the person replies to the e-mail, but that's fine obviously).
Reply With Quote
  #25  
Old 31 Mar 2010, 17:56
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by gorman View Post
Thanks for the answer. But I'm using the mail sender inside vB because I do not want to publish user's email in the clear. The PDF does just that.

Even if users accept emails, on my forums they are sent emails by the internal module. Other users do not have access to their addresses (unless the person replies to the e-mail, but that's fine obviously).
Extracting text from a PDF is a torturous process - it's a fairly secure format. If you want to disable email addresses completely from PDF's then you will need to edit the PHP file calsearch.php

Around line 484 delete the red text:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

OR - if you want to disable PDF downloads altogether then, rather than edit the PHP file, edit the calsearch_result template and delete the red line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Reply With Quote
  #26  
Old 02 Apr 2010, 14:31
philswallow philswallow is offline
 
Join Date: Feb 2006
Great, I think this will be useful.
Reply With Quote
  #27  
Old 02 Apr 2010, 18:00
claystation claystation is offline
 
Join Date: Jan 2007
Any thought on having the start date today's date by the end of the year their are going to be a lot of events display on calsearch.php that already past.
Reply With Quote
  #28  
Old 03 Apr 2010, 09:28
HCGB HCGB is offline
 
Join Date: Apr 2008
Real name: John
Originally Posted by claystation View Post
Any thought on having the start date today's date by the end of the year their are going to be a lot of events display on calsearch.php that already past.
Good point - I've added a month selection option to the start and end year which should solve this (or at least reduce it by 12 ).
__________________
Reply With Quote
  #29  
Old 14 Apr 2010, 22:26
teflonchest teflonchest is offline
 
Join Date: Apr 2010
will there be support for 4.0.3? got this:


This product is not compatible with version 4.0.3 of vBulletin. (Compatible starting with 4.0.2 / Incompatible with 4.0.3 and greater)


Edit: changed the xml to 4.0.4max and got this error when trying to search events:


Database error in vBulletin 4.0.3:

Invalid SQL:

SELECT
event.title,eventid,event,event.dateline,event.recurring, event.recuroption,
user.username,user.userid,
calendar.title as caltitle,calendar.calendarid,
IF(event.dst<>'0', event.dateline_from + ( * 3600), event.dateline_from + ( * 3600)) as dateline_from,
IF(event.dateline_to<>'0',
IF(event.dst<>'0', event.dateline_to + ( * 3600), event.dateline_to + ( * 3600))
,'0')
AS dateline_to,
IF(
('1') AND
(user.options & '256')
,user.email, '') AS email
FROM
event AS event
LEFT JOIN user AS user ON (event.userid = user.userid)
LEFT JOIN calendar AS calendar ON (calendar.calendarid = event.calendarid)
WHERE
event.visible = 1
AND event.calendarid IN ('1')
AND(
(
((event.dateline_from <= 2145852000) AND (event.dateline_from >= 1270098000))
OR ((event.dateline_to <= 2145852000) AND (event.dateline_to >= 1270098000))
)
OR
( event.recurring<>0
AND ((event.dateline_to >= 1270098000) AND (event.dateline_from <= 2145852000))
)
)

ORDER BY recurring DESC, dateline_from ASC
LIMIT 0, 25;

MySQL Error : 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 '* 3600), event.dateline_from + ( * 3600)) as dateline_from,
IF(event.datelin' at line 5
Error Number : 1064
Request Date : Wednesday, April 14th 2010 @ 05:35:13 PM
Error Date : Wednesday, April 14th 2010 @ 05:35:13 PM
Script :
Referrer :
IP Address :
Username : admin
Classname : vB_Database
MySQL Version : 5.0.89-community

Last edited by teflonchest; 14 Apr 2010 at 22:43.
Reply With Quote
  #30  
Old 14 Apr 2010, 22:43
claystation claystation is offline
 
Join Date: Jan 2007
1.08b is working for me on 4.03 it was installed though on 4.02. and still works after the upgrade.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 13:46.

Layout Options | Width: Wide Color: