Social Group Calendars
In short, this modification will allow social groups on your forum have their own calendar area and have upcoming events shown on their group page. Here is a list of features:
Follow the installation instructions available here: Spoiler (click to open)
Unfortunately, vBulletin lacks some hooks in key places for events, such as hooks to the event SQL statements. This means that there are a number of file edits needed for this modification. Sorry for that, but I hope it will be worth it! Enjoy!
Step One – Backup Your Database and vBulletin Files! This really needs to be said, especially since this version is in BETA. Loss of data/time/business is not the responsibility of the developer. Use at your own risk. Step Two – Import the Product File In the Admin CP, import rah_socialgroup_calendars_1_0_0.xml. Step Three – Edit vBulletin File: includes/functions_calendar.php Note: If you do not want to have Social Group Events show up in the upcoming events section on your forum homepage, then you only need do steps 1 through 7 in this section. 1. Find the first instance of (in function cache_events, near the beginning of the file): PHP Code:
$events = $vbulletin->db->query_read_slave("
PHP Code:
// Social Group Calendar **************************************************
PHP Code:
$eventselect
PHP Code:
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = event.userid)
PHP Code:
$eventjoin
PHP Code:
visible = 1
PHP Code:
$eventwhere
PHP Code:
$events = $vbulletin->db->query_read_slave("
PHP Code:
// Social Group Calendar **************************************************
PHP Code:
$eventselect
PHP Code:
INNER JOIN " . TABLE_PREFIX . "calendar AS calendar USING (calendarid)
PHP Code:
$eventjoin
Note: If you do not want to have Social Group Events show up in the upcoming events section on your forum homepage, you can skip this section entirely. Keep in mind though that if you do have your calendar options set to show events from the calendar that social group events will be posted to, the list will not be filtered and everyone will see them. 1. Find the following: PHP Code:
// ### TODAY'S EVENTS #################################################
PHP Code:
// Social Group Calendar **************************************************
PHP Code:
{
PHP Code:
// Social Group Calendar **********************************************
PHP Code:
if ($vbulletin->userinfo['calendarpermissions']["$eventinfo[calendarid]"] & $vbulletin->bf_ugp_calendarpermissions['canviewcalendar'] OR ($eventinfo['holidayid'] AND $vbulletin->options['showholidays']))
PHP Code:
// Edited from original for Social Group Calendar
Upload the modified files to the appropriate directory in your forum. Step Six – Edit Template: socialgroups_form 1. Find the following: HTML Code:
<legend>$vbphrase[group_options]</legend> <div class="smallfont"> HTML Code:
<div> <label for="member_entered_events"><input type="checkbox" name="member_entered_events" id="member_entered_events" value="1" $checked[member_entered_events]/> $vbphrase[member_entered_events]</label> </div> Note: If you’re trying to install this on version 3.7.x, the section you put the variable in will be different. Try putting it above <!--pictures--> for instance, and then adjust to be located where you want. 1. Find the following: HTML Code:
</div><br /> </if> <!-- Discussions --> HTML Code:
$socialgroups_events In the Admin CP, go into vBulletin Options -> Social Group Calendar. Set the options as desired. The product will not start working until a calendar ID is entered in this section. Make sure to configure the calendar selected to allow members to post events. Close
Revision Log
None at this time. Download
product-rah_socialgroup_calendars_1_0_0.xml (27.9 KB, 349 downloads) Screenshots |