Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Events Forum
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Events Forum
Requirement: XThreads

I know there is a thread about this:
http://mybbhacks.zingaburga.com/showthread.php?tid=405

But this is not an events system. This is only a very basic event forum. There is no Calendar integration at all. That's why I prefer to post this as a new thread rather than post a reply to that thread. Yeah, very very basic.

  1. Listbox field for Month:
    • Title: Month
    • Key: efmonth
    • Applicable Forums: select our events forum
    • Input Field Type : Listbox
    • Field Input Width : 7
    • Field Input Height : 1
    • Values List :

      Code:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      01
      02
      03
      04
      05
      06
      07
      08
      09
      10
      11
      12

    • Editable by / Required Field? : Everyone (required)
    • Hide Input Field : Yes
  2. Listbox field for Day:
    • Title: Day
    • Key: efday
    • Applicable Forums: select our events forum
    • Input Field Type : Listbox
    • Field Input Width : 7
    • Field Input Height : 1
    • Values List :

      Code:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31
      01
      02
      03
      04
      05
      06
      07
      08
      09
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20
      21
      22
      23
      24
      25
      26
      27
      28
      29
      30
      31

    • Editable by / Required Field? : Everyone (required)
    • Hide Input Field : Yes
  3. Listbox field for Year:
    • Title: Year
    • Key: efyear
    • Applicable Forums: select our events forum
    • Input Field Type : Listbox
    • Field Input Width : 9
    • Field Input Height : 1
    • Values List :

      Code:
      2010
      2011

    • Editable by / Required Field? : Everyone (required)
    • Hide Input Field : Yes
  4. Textbox field for Entry Fee:
    • Title: Entry Fee
    • Key: effee
    • Applicable Forums: select our events forum
    • Input Field Type : Textbox
    • Field Input Width : 10
    • Field Input Height : 17
    • Editable by / Required Field? : Everyone
    • Blank Replacement Value :

      HTML Code
      –

    • Display Format :

      PHP Code:
      $ <?=number_format({VALUE},2)?>

    • Text Mask Filter :

      Code:
      ^\d+(\.\d{2})?$

  5. Textbox fields for Address:
    • Title: Address
    • Key: efaddress
    • Applicable Forums : select our events forum
    • Editable by / Required Field? : Everyone
    • Blank Replacement Value :

      Code:
      Not Specified



Then, set our download forum setting like this:
  • Template Prefix: ef_
  • Show first post on every showthread page: Yes
  • Enable XThreads' Inline Forum Search : Yes
  • Hide Forum: Yes
    We need to put the forum link manually in our template (example: in header template).

Then create new templates in Global Templates:
(The templates bellow based on MyBB 1.4)
  1. ef_editpost_first

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$lang->edit_post}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$preview}
    {$post_errors}
    {$attacherror}
    <form action="editpost.php" method="post" name="editpost">
    <input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="thead" colspan="3"><strong>{$lang->delete_post}</strong></td>
    </tr>
    <tr>
    <td class="trow1" style="white-space: nowrap"><input type="checkbox" class="checkbox" name="delete" value="1" tabindex="9" /> <strong>{$lang->delete_q}</strong></td>
    <td class="trow1" width="100%">{$lang->delete_1}<br /><span class="smalltext">{$lang->delete_2}</span></td>
    <td class="trow1"><input type="submit" class="button" name="submit" value="{$lang->delete_now}" tabindex="10" /></td>
    </tr>
    </table>
    <input type="hidden" name="action" value="deletepost" />
    <input type="hidden" name="pid" value="{$pid}" />
    </form>
    <br />
    <form action="editpost.php?pid={$pid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
    <input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="thead" colspan="2"><strong>{$lang->edit_post}</strong></td>
    </tr>
    {$loginbox}
    <tr>
    <td class="trow2"><strong>{$lang->subject}</strong></td>
    <td class="trow2"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
    </tr>
    <tr>
    <td class="trow2" width="20%"><strong>Event Date</strong></td>
    <td class="trow2">Month: {$tfinput['efmonth']} &ndash Day: {$tfinput['efday']} &ndash Year: {$tfinput['efyear']}</td>
    </tr>
    {$extra_threadfields}{$posticons}
    <tr>
    <td class="trow2" valign="top"><strong>{$lang->your_message}:</strong><br /><div style="text-align: center;">{$smilieinserter}</div></td>
    <td class="trow2">
    <textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
    {$codebuttons}
    </td>
    </tr>
    <tr>
    <td class="trow1" valign="top"><strong>{$lang->post_options}</strong></td>
    <td class="trow1"><span class="smalltext">
    <label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
    {$disablesmilies}</span>
    </td>
    </tr>
    {$subscriptionmethod}
    {$pollbox}
    </table>
    {$attachbox}
    <br />
    <div align="center"><input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="4" /></div>
    <input type="hidden" name="action" value="do_editpost" />
    <input type="hidden" name="posthash" value="{$posthash}" />
    <input type="hidden" name="attachmentaid" value="" />
    <input type="hidden" name="attachmentact" value="" />
    </form>
    {$footer}
    </body>
    </html>

  2. ef_newthread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    <html>
    <head>
    <title>{$lang->newthread_in}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$preview}
    {$thread_errors}
    {$attacherror}
    <form action="newthread.php?fid={$fid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
    <input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="thead" colspan="2"><strong>New Event</strong></td>
    </tr>
    {$loginbox}
    <tr>
    <td class="trow2" width="20%"><strong>Event Subject</strong></td>
    <td class="trow2"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></td>
    </tr>
    <tr>
    <td class="trow2" width="20%"><strong>Event Date</strong></td>
    <td class="trow2">Month: {$tfinput['efmonth']} &ndash; Day: {$tfinput['efday']} &ndash; Year: {$tfinput['efyear']}</td>
    </tr>
    {$extra_threadfields}{$posticons}
    <tr>
    <td class="trow2" valign="top"><strong>{$lang->your_message}</strong>{$smilieinserter}</td>
    <td class="trow2">
    <textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
    {$codebuttons}
    {$multiquote_external}
    </td>
    </tr>
    <tr>
    <td class="trow1" valign="top"><strong>{$lang->post_options}</strong></td>
    <td class="trow1"><span class="smalltext">
    <label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="7"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
    {$disablesmilies}</span></td>
    </tr>
    {$modoptions}
    {$subscriptionmethod}
    {$pollbox}
    {$captcha}
    </table>
    {$attachbox}
    <br />
    <div style="text-align:center"><input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" />{$savedraftbutton}</div>
    <input type="hidden" name="action" value="do_newthread" />
    <input type="hidden" name="posthash" value="{$posthash}" />
    <input type="hidden" name="attachmentaid" value="" />
    <input type="hidden" name="attachmentact" value="" />
    <input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
    <input type="hidden" name="tid" value="{$tid}" />
    {$editdraftpid}
    </form>
    {$forumrules}
    {$footer}
    </body>
    </html>

  3. ef_postbit_first

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 {$unapproved_shade}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}">
    				<table width="100%" border="0">
    					<tr>
    						<td valign="top" width="111"><strong>Event Subject</strong></td>
    						<td valign="top" width="1"><strong>:</strong></td>
    						<td valign="top">{$post['subject']}</td>
    					</tr>
    					<tr>
    						<td valign="top"><strong>Event Date</strong></td>
    						<td valign="top"><strong>:</strong></td>
    						<td valign="top">{$GLOBALS['threadfields']['efmonth']}&ndash;{$GLOBALS['threadfields']['efday']}&ndash;{$GLOBALS['threadfields']['efyear']}</td>
    					</tr>
    					<tr>
    						<td valign="top"><strong>Entry Fee</strong></td>
    						<td valign="top"><strong>:</strong></td>
    						<td valign="top">{$GLOBALS['threadfields']['effee']}</td>
    					</tr>
    					<tr>
    						<td valign="top"><strong>Address</strong></td>
    						<td valign="top"><strong>:</strong></td>
    						<td valign="top">{$GLOBALS['threadfields']['efaddress']}</td>
    					</tr>
    				</table>
    				<br />
    				<div class="post_body"><strong>Event Info:</strong></div>
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  4. ef_postbit_first_classic

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;">
    			<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    			<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    			<span class="smalltext">
    				{$post['usertitle']}<br />
    				{$post['userstars']}
    				{$post['groupimage']}
    				{$post['useravatar']}<br />
    				{$post['user_details']}
    			</span>
    		</td>
    		<td class="{$altbg}" valign="top">
    			<table width="100%">
    				<tr>
    					<td>
    						{$post['posturl']}
    						<table width="100%" border="0">
    							<tr>
    								<td valign="top" width="111"><strong>Event Subject</strong></td>
    								<td valign="top" width="1"><strong>:</strong></td>
    								<td valign="top">{$post['subject']}</td>
    							</tr>
    							<tr>
    								<td valign="top"><strong>Event Date</strong></td>
    								<td valign="top"><strong>:</strong></td>
    								<td valign="top">{$GLOBALS['threadfields']['efmonth']}&ndash;{$GLOBALS['threadfields']['efday']}&ndash;{$GLOBALS['threadfields']['efyear']}</td>
    							</tr>
    							<tr>
    								<td valign="top"><strong>Entry Fee</strong></td>
    								<td valign="top"><strong>:</strong></td>
    								<td valign="top">{$GLOBALS['threadfields']['effee']}</td>
    							</tr>
    							<tr>
    								<td valign="top"><strong>Address</strong></td>
    								<td valign="top"><strong>:</strong></td>
    								<td valign="top">{$GLOBALS['threadfields']['efaddress']}</td>
    							</tr>
    						</table>
    						<br />
    						<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    							{$post['message']}
    						</div>
    						{$post['attachments']}
    						{$post['signature']}
    						<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    							<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    							{$post['iplogged']}
    						</div>
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    	<tr>
    		<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    		<td class="{$altbg}" style="vertical-align: middle;">
    			<table width="100%" border="0" cellpadding="0" cellspacing="0">
    				<tr valign="bottom">
    					<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}</span></td>
    					<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>

  5. ef_forumdisplay_thread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    <tr>
    	<td align="center" class="{$bgcolor}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
    	<td align="center" class="{$bgcolor}" width="2%">{$icon}</td>
    	<td class="{$bgcolor}">
    		{$attachment_count}
    		<div>
    			<span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
    			<table width="100%" border="0">
    				<tr class="smalltext">
    					<td valign="top" width="99"><strong>Author</strong></td>
    					<td valign="top" width="1"><strong>:</strong></td>
    					<td valign="top">{$thread['profilelink']}</td>
    				</tr>
    				<tr class="smalltext">
    					<td valign="top"><strong>Submitted</strong></td>
    					<td valign="top"><strong>:</strong></td>
    					<td valign="top">{$thread['threaddate']}, {$thread['threadtime']}</td>
    				</tr>
    				<tr class="smalltext">
    					<td valign="top"><strong>Event Date</strong></td>
    					<td valign="top"><strong>:</strong></td>
    					<td valign="top">{$GLOBALS['threadfields']['efmonth']}&ndash;{$GLOBALS['threadfields']['efday']}&ndash;{$GLOBALS['threadfields']['efyear']}</td>
    				</tr>
    				<tr class="smalltext">
    					<td valign="top"><strong>Entry Fee</strong></td>
    					<td valign="top"><strong>:</strong></td>
    					<td valign="top">{$GLOBALS['threadfields']['effee']}</td>
    				</tr>
    				<tr class="smalltext">
    					<td valign="top"><strong>Address</strong></td>
    					<td valign="top"><strong>:</strong></td>
    					<td valign="top">{$GLOBALS['threadfields']['efaddress']}</td>
    				</tr>
    			</table>
    		</div>
    	</td>
    	<td align="center" class="{$bgcolor}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
    	<td align="center" class="{$bgcolor}">{$thread['views']}</td>
    	{$rating}
    	<td class="{$bgcolor}" style="white-space: nowrap; text-align: right;">
    		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
    		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    	</td>
    {$modbit}
    </tr>



Live Demo:
I have another version in the live demo. There is a filtering events there (set Allow Filtering setting for the Month, Day and Year to Yes). And there is a filter field as a settings for additional plugin to load the next 10, 20 or 30 days events. The reason why I didn't put it here is, because I'm not quite sure about it.
http://www.14.mynie.co.cc/forumdisplay.php?fid=3


Attached File(s) Thumbnail(s)
       

(This post was last modified: 02-13-2011 03:15 AM by RateU.)
10-10-2010 06:41 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Events Forum - RateU - 10-10-2010 06:41 AM
RE: Events Forum - ZiNgA BuRgA - 10-10-2010, 10:11 AM
RE: Events Forum - Imran - 10-10-2010, 10:36 PM
RE: Events Forum - leefish - 10-11-2010, 12:07 AM
RE: Events Forum - Glas - 12-02-2010, 02:29 PM
RE: Events Forum - ZiNgA BuRgA - 12-02-2010, 03:02 PM
RE: Events Forum - Glas - 12-02-2010, 05:06 PM
RE: Events Forum - leefish - 12-02-2010, 05:13 PM
RE: Events Forum - kaixer - 12-25-2010, 09:55 PM
RE: Events Forum - RateU - 12-26-2010, 01:59 AM
RE: Events Forum - kaixer - 12-26-2010, 09:22 AM
RE: Events Forum - RateU - 12-26-2010, 10:04 AM
RE: Events Forum - kaixer - 12-26-2010, 10:07 AM
RE: Events Forum - RateU - 12-26-2010, 10:25 AM
RE: Events Forum - kaixer - 12-26-2010, 10:34 AM
RE: Events Forum - RateU - 12-26-2010, 10:45 AM
RE: Events Forum - kaixer - 12-26-2010, 10:46 AM
RE: Events Forum - Shemo - 01-02-2011, 09:50 AM
RE: Events Forum - Tridion - 02-16-2011, 11:00 PM
RE: Events Forum - RateU - 02-17-2011, 01:56 AM
RE: Events Forum - Glas - 08-25-2011, 11:43 AM
RE: Events Forum - nier3 - 08-09-2012, 09:54 PM
RE: Events Forum - RateU - 08-10-2012, 05:38 AM
RE: Events Forum - Destro - 05-16-2013, 09:13 PM
RE: Events Forum - xensor - 04-19-2015, 07:36 AM
RE: Events Forum - adsol93 - 05-07-2015, 07:49 AM
RE: Events Forum - RateU - 10-16-2015, 06:48 AM
RE: Events Forum - Wally - 04-02-2017, 10:46 PM
RE: Events Forum - ZiNgA BuRgA - 04-03-2017, 04:08 PM
RE: Events Forum - Wally - 04-03-2017, 07:42 PM
RE: Events Forum - RateU - 04-05-2017, 01:20 AM

 Standard Tools
Forum Jump: