Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Calendar Search and Download Details »»
Calendar Search and Download
Version: 1.10, by HCGB HCGB is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Category: Calendar Enhancements - Version: 4.0.x Rating:
Released: 03-20-2010 Last Update: 04-14-2010 Installs: 51
Uses Plugins
Re-useable Code Additional Files Translations  
No support by the author.

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

File Type: zip Calendar Search and Download_109b.zip (31.0 KB, 45 views)
File Type: zip Calendar Search and Download_110.zip (31.0 KB, 283 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
starman?

Comments
  #22  
Old 03-29-2010, 05:05 PM
Turbe Turbe is offline
 
Join Date: Apr 2008
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You have two v1.06b in your changelog
Reply With Quote
  #23  
Old 03-30-2010, 03:44 PM
gorman gorman is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #24  
Old 03-30-2010, 05:50 PM
HCGB HCGB is offline
 
Join Date: Apr 2008
Location: Scotland
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #25  
Old 03-31-2010, 03:20 PM
gorman gorman is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #26  
Old 03-31-2010, 04:56 PM
HCGB HCGB is offline
 
Join Date: Apr 2008
Location: Scotland
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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:
Code:
$data[] = array(htmlspecialchars_uni(strip_bbcode(fetch_trimmed_title(strip_quotes($event['title']), 100), false, true)) . ($recurint ? " ($period - $recurint )" : ''),
str_replace(array("\n","\r"), ' ' ,htmlspecialchars_uni(strip_bbcode(fetch_trimmed_title(strip_quotes($event['event']), 600), false, true))),
date($vbulletin->options['dateformat'],$event['dateline_from']) . ($event['dateline_to']=='' ? '' : ' - ' . date($vbulletin->options['dateformat'],$event['dateline_to'])),
(!empty($event['email'])) ? $event['email'] : ''
 );
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:
Code:
<span style="float:right;">
{vb:rawphrase save}:&nbsp;
<input type="submit" class="button" align="right" name="do" value="i{vb:rawphrase calendar}" tabindex="7" />
<input type="submit" class="button" align="right" name="do" value="PDF {vb:rawphrase calendar}" tabindex="8" />
</span>
Reply With Quote
  #27  
Old 04-02-2010, 01:31 PM
philswallow philswallow is offline
 
Join Date: Feb 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, I think this will be useful.
Reply With Quote
  #28  
Old 04-02-2010, 05:00 PM
claystation claystation is offline
 
Join Date: Jan 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #29  
Old 04-03-2010, 08:28 AM
HCGB HCGB is offline
 
Join Date: Apr 2008
Location: Scotland
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
  #30  
Old 04-14-2010, 09:26 PM
teflonchest teflonchest is offline
 
Join Date: Apr 2010
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.rec urring, 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
Reply With Quote
  #31  
Old 04-14-2010, 09:43 PM
claystation claystation is offline
 
Join Date: Jan 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


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

Forum Jump


All times are GMT. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08135 seconds
  • Memory Usage 2,350KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete