PDA

View Full Version : Show Thread Enhancements - Add Videos & Photos to Calendar Events Linked to Threads


schlottkej
07-31-2010, 10:00 PM
I couldn't come up with a short, descriptive name for this that was catchy but here is what this does:

The end user can link events from the calendar to an active thread or auto-generate a new thread and then add videos from Youtube and photos from your albums.

The plugin also provides a sponsor box that can be edited to include adsense or other advertisements.

Notes:

I am unable to get screen shots because I no longer use this product, but I thought someone would be able to help with that.
This code can be reused and I hope it is.


Important vBulletin 4.0 Notice
I am giving this code to the community and would like someone to convert it to 4.0.x

Installation:
1) File Edits:
-----------

In file admincp/admincalendar.php
Find:
print_yes_no_row($vbphrase['allow_smilies'], 'options[allowsmilies]', $calendar['allowsmilies']);
Add after:
print_forum_chooser($vbphrase['autothreadforumid'], 'calendar[autothreadforumid]', $calendar['autothreadforumid'], $vbphrase['none']);




2) Template edits:
---------------

calendar_showeventsbit
Find:
<div>$eventinfo[event]</div>
Replace with:
<table style="width:100%;" cellpadding="$stylevar[cellpadding]" border="0">
<tr>
<td valign="top" colspan="2" style="width:50%;">$eventinfo[event]</td>
<td valign="top" colspan="2" style="width:50%;">$results</td>
<td valign="top" colspan="2"><if condition="$results || $videos || $photos"><div style="width:200px;height:120px;border:1px solid #000000;">Sponsor Box...</div></if></td>
</tr>
<tr>
<td valign="top" colspan="3" style="width:50%;">$videos</td>
<td valign="top" colspan="3" style="width:50%;">$photos</td>
</tr>
</table>
Find:
</form>
Add after:
$discussion
Find:
<td class="tcat">$eventinfo[title]</td>
Replace with:
<td class="tcat"><if condition="THIS_SCRIPT=='showthread'">$vbphrase[linked_event]: </if><a href="calendar.php?do=getinfo&e=$eventinfo[eventid]">$eventinfo[title]</a></td>


calendar_edit
Find:
$disablesmiliesoption
Add after:
<label for="cb_makethread"><input type="checkbox" name="makethread" value="1" id="cb_makethread" tabindex="1" checked="checked" />$vbphrase[auto_generate_discussion_thread]</label>

album_picture_upload and album_edit
Find the last occurrence of:
<input type="hidden" name="s" value="$session[sessionhash]" />
Add after:
<input type="hidden" name="eventid" value="$eventid" />

SHOWTHREAD
Find:
$poll
Add after:
$event

newthread
Find:
<input type="hidden" name="posthash" value="$posthash" />
Add after:
<input type="hidden" name="eventid" value="$eventid" />


3) Upload kce-newthread.php to forums/includes/cron

BigJohnny
10-04-2010, 12:14 AM
no one has used this? I'm kind of interested but I still don't fully understand what it does.

nitl300
10-04-2010, 07:01 AM
Ty :)

realwx
10-22-2010, 03:12 AM
I think you're missing a file:

Warning: require_once([path]/includes/functions_kce.php) [function.require-once]: failed to open stream: No such file or directory in [path]/calendar.php(1020) : eval()'d code on line 4

Fatal error: require_once() [function.require]: Failed opening required '/forum/includes/functions_kce.php' (include_path='.:/lsphp5/lib/php') in /forum/calendar.php(1020) : eval()'d code on line 4

Uberguilds
11-29-2010, 10:21 PM
wru

/forum/includes/functions_kce.php

Antidepresiv
02-18-2011, 10:01 PM
schlottkej , this mod would practicly be awesome, if it would be available for 4.x, so i will post a req to get this mode recoded for 4.x, and this way, i'm askind any1 who can do this, please do it, because this mod recoded would serve so many communities, that i cant even imagine a community, that wouldn't use it. Thanks again.