In order to add attachments to your forum events (once the event is posted):
Create new plugin.
Product:
Lv vB Event Forums
Title:
Attachment Permissions
Hookname:
showthread_post_start
Phpcode:
PHP Code:
$show['caneditattach'] = ($threadinfo['lv_vb_eventforums_eventid'] AND $forumperms & $vbulletin->bf_ugp_forumpermissions['canpostattachment'] AND $vbulletin->userinfo['userid'] AND !empty($vbulletin->userinfo['attachmentextensions'])) ? true : false;
FILE EDIT:
calendar.php
Find:
PHP Code:
case 'edit':
{
$_POST['do'] = 'edit';
}
break;
Add underneath:
PHP Code:
case 'attach':
{
$eventpostid = $db->query_first("
SELECT firstpostid
FROM " . TABLE_PREFIX . "thread
WHERE lv_vb_eventforums_eventid = $eventinfo[eventid]
");
exec_header_redirect($vbulletin->options['bburl'] . '/editpost.php?p=' . $eventpostid[firstpostid]);
}
break;
TEMPLATE EDITS:
editpost
Find:
Code:
<if condition="$show['deletepostoption']">
Add above:
Code:
<if condition="$attachments_only"><div style="visibility: hidden; position: absolute"></if>
Find:
Add underneath:
Code:
<if condition="$attachments_only"></div></if>
Find:
Code:
<form name="vbform" action="editpost.php?do=updatepost&p=$postid" method="post"<if condition="!is_browser('webtv')"> onsubmit="return vB_Editor['$editorid'].prepare_submit(0, $vboptions[postminchars])"</if>>
Add underneath:
Code:
<if condition="$attachments_only"><div style="visibility: hidden; position: absolute"></if>
Find:
Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('newpost_options')"><img id="collapseimg_newpost_options" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_newpost_options].gif" alt="" border="0" /></a>
Add above:
Code:
<if condition="$attachments_only"></div></if>
Find:
Code:
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
Add underneath:
Code:
<if condition="$attachments_only"><div style="visibility: hidden; position: absolute"></if>
Find:
Replace with:
Code:
<if condition="$attachments_only"></div></if>
$attachmentoption
<if condition="$attachments_only"><div style="visibility: hidden; position: absolute"></if>
Find:
Code:
</div>
</div>
<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" name="sbutton" value="$vbphrase[save_changes]" accesskey="s" tabindex="1" />
<input type="submit" class="button" name="preview" value="$vbphrase[preview_changes]" accesskey="r" tabindex="1" />
<if condition="$attachments_only">
Replace with:
Code:
<if condition="$attachments_only"></div></if>
</div>
</div>
<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" name="sbutton" value="$vbphrase[save_changes]" accesskey="s" tabindex="1" />
<if condition="$attachments_only"><div style="visibility: hidden; position: absolute"></if>
<input type="submit" class="button" name="preview" value="$vbphrase[preview_changes]" accesskey="r" tabindex="1" />
<if condition="$attachments_only"></div></if>
TEMPLATE EDITS:
calendar_showeventsbit
Find:
Code:
<div>$eventinfo[event]</div>
Add underneath:
Code:
<if condition="$show['attachments']">
<br />
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">
<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$eventinfo[thumbnailattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$eventinfo[imageattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$eventinfo[imageattachmentlinks]
</table>
</fieldset>
</if>
<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$eventinfo[otherattachments]
</table>
</fieldset>
</if>
<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$eventinfo[moderatedattachments]
</table>
</fieldset>
</if>
</div>
<!-- / attachments -->
</if>
Find:
Code:
<if condition="$show['caneditevent']">
<option value="edit">:: $vbphrase[edit_event]</option>
</if>
Add underneath:
Code:
<if condition="$show['caneditattach']">
<option value="attach">:: Edit Attachments</option>
</if>
I think that's everything I did. In order to add attachments at the same time you create the event a LOT more edits were necessary and I didn't have the patience for it. Adding them after creation was good enough for me.