Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Video Gallery
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Video Gallery
Requirement: XThreads
Latest Edit: 7 October 2012

Actually, this has been posted here:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=292&pid=40
But will try to make it a bit more serious, so maybe we can have our own very simple video gallery Biggrin
All video uploaded directly to our server, and played directly from our forum.

Create/Edit Forum:
Admin CP -> Forums & Posts -> Add New Forum or Edit Forum
  • Template Prefix:

    Code:
    <if $mybb->input['xtmvmost'] == 'most' then>xtmv_most_,</if>xtmv_

  • Language File Prefix: xtmv_
  • Show first post on every showthread page: Yes
  • Enable XThreads' Inline Forum Search: Yes
  • Settings Overrides:
    • Setting: Showthread Options -> Post Layout
      Value: horizontal

      Code:
      postlayout=horizontal

  • Hide Forum: Yes (Optional)
    If we set this to Yes, we need to put the link manually in our header template.
  • Custom WOL Text:
    • Forum Display: Browsing Video Gallery Section
    • New Thread: Submitting a new video
    • New Reply: Commenting on <a href="{1}">{2}</a> video
    • Show Thread: Watching <a href="{1}">{2}</a> video

Create Custom Thread Fields:
Admin CP -> Configuration -> Custom Thread Fields -> Add Thread Field
  1. Video/FLV Uploader
    • Title: Video Uploader
    • Key : xtmv_flv
    • Description: Upload your video. Video format: FLV or MP4 max video size: 20 MB.
      Modify it as our needs. Depends on file size settings in this fields setting.
    • Applicable Forums: Select our Video Gallery forum
    • Input Field Type: File
    • Valid File Extensions: flv|mp4
    • Maximum File Size: 20971520
      Modify it as our needs. File size allowed to be upload (in bytes). Related to the description.
    • Editable by / Required Field?: Everyone (required)
    • Display Order : 1
    • Display Format:

      HTML Code
      <a href="{URL}" style="display:block; width:520px; height:330px" id="player"></a> 
      <script>
      	flowplayer("player", "{$GLOBALS['mybb']->settings['bburl']}/flowplayer/flowplayer-3.2.6.swf");
      </script>

  2. Video Category
    • Title: Category
    • Key : xtmv_cat
    • Description: Select a category for this video.
      Modify it as our needs.
    • Applicable Forums: Select our Video Gallery forum
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Games
      Funny
      Music
      Other

      Modify it as our needs.

    • Editable by / Required Field?: Everyone (required)
    • Display Order : 2
    • Allow Filtering : Yes
  3. Video Thumbnail
    Because there is no thumbnail created automatically, so, we use non required image upload for this.
    • Title: Video Thumbnail
    • Key : xtmv_thumb
    • Description: If you have a screenshot for this video, you can upload it. Min image diemnsion: 120x90, max image size: 1 MB, image allowed: JPG, JPEG, GIF or PNG
      Modify it as our needs. Depends on some settings in this fields setting.
    • Applicable Forums: Select our Video Gallery forum
    • Input Field Type: File
    • Valid File Extensions: jpg|png|gif|jpeg
      Modify it as our needs. Related to the description.
    • Maximum File Size: 1048576
      Modify it as our needs. Related to the description.
    • Editable by / Required Field?: Everyone
      We don't force this fields.
    • Display Order : 3
    • Only Accept Image Files : Yes
    • Minimum Image Dimensions : 120x90
    • Image Thumbnail Generation : 120x90
    • Blank Replacement Value :
      Because this is not a required fields, so we need to create a "default" thumbnail. Modify it as our needs.

      HTML Code
      <a href="{$threadurl}"><img src="images/xthreads.jpg" alt="" title="{$thread['subject']}" /></a>

    • Display Format:

      HTML Code
      <a href="{$threadurl}"><img src="{URL}/thumb120x90" alt="" title="{$thread['subject']}" /></a>



Create New Templates
Admin CP -> Templates & Style -> Templates -> Global Templates -> Add Templates

  1. xtmv_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
    72
    73
    74
    75
    76
    77
    78
    79
    80
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$lang->xtmv_edit_post}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    <script type="text/javascript" src="flowplayer/flowplayer-3.2.6.min.js"></script>
    </head>
    <body>
    {$header}
    {$preview}
    {$post_errors}
    {$attacherror}
    <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->xtmv_edit_post}</strong></td>
    	</tr>
    	<tr>
    		<td valign="top" class="trow2">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    				<tr>
    					<td class="trow2">
    						<strong>{$lang->xtmv_subject}</strong><br />
    						<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    					</td>
    				</tr>
    				{$extra_threadfields}
    				<tr>
    					<td class="trow2">
    						<br />
    						<div style="text-align: center;">
    							<span class="largetext">{$lang->xtmv_logo_preview}</span><br />
    							<span class="smalltext">{$lang->xtmv_logo_preview_desc}</span><br />
    							{$GLOBALS['threadfields']['xtmv_thumb']['value']}
    						</div>
    					</td>
    				</tr>
    			</table>
    		</td>
    		<td valign="top" width="60%" class="trow2">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    				<tr>
    					<td class="trow2" valign="top">
    						<strong>{$lang->xtmv_your_message}</strong>
    						<textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
    						{$codebuttons}
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>
    {$attachbox}
    <br />
    <div align="center"><input type="submit" class="button" name="submit" value="{$lang->xtmv_update_post}" tabindex="3" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->xtmv_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>
    <br />
    <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->xtmv_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->xtmv_delete_1}<br /><span class="smalltext">{$lang->xtmv_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>
    {$footer}
    </body>
    </html>

  2. xtmv_forumdisplay_searchforum_inline

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    <br />
    <table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" class="tborder">
    	<tr>
    		<td class="thead"><strong>{$lang->search_forum}</strong></td>
    	</tr>
    	<tr>
    		<td class="trow1" style="text-align: center;">
    			<form action="forumdisplay.php" method="get">
    				<input type="text" class="textbox" name="search" value="{$searchval}" /> {$gobutton}
    				<input type="hidden" name="fid" value="{$fid}" />
    				<input type="hidden" name="sortby" value="{$sortby}" />
    				<input type="hidden" name="order" value="{$sortordernow}" />
    				<input type="hidden" name="datecut" value="{$datecut}" />
    				{$xthreads_forum_filter_form}
    			</form>
    		</td>
    	</tr>
    </table>

  3. xtmv_forumdisplay_thread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <tr>
    	<td align="center" class="{$bgcolor}" width="1">
    		{$GLOBALS['threadfields']['xtmv_thumb']['value']}
    	</td>
    	<td class="{$bgcolor}" width="100%">
    		<strong>
    			<a href="{$thread['threadlink']}" class="{$inline_edit_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>
    		</strong>
    		<div class="smalltext"><strong>{$lang->author} {$thread['profilelink']}</strong> - <em>{$thread['threaddate']} {$lang->at} {$thread['threadtime']}</em></div>
    		<div class="smalltext">{$thread['postpreview']}</div>
    		<div class="smalltext">{$thread['views']} {$lang->views} | {$thread['replies']} {$lang->replies} | {$thread['numratings']} {$lang->rating}</div>
    	</td>
    	{$modbit}
    </tr>

  4. xtmv_forumdisplay_threadlist

    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
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="clear: both; width: 100%;">
    	<tr>
    		<td valign="top" width="300">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    				<tr>
    					<td class="thead"><strong>{$lang->xtmv_category}</strong></td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$forumurl_q}filtertf_xtmv_cat=Games">Games</a></strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$forumurl_q}filtertf_xtmv_cat=Funny">Funny</a></strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$forumurl_q}filtertf_xtmv_cat=Music">Music</a></strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$forumurl_q}filtertf_xtmv_cat=Other">Other</a></strong>
    					</td>
    				</tr>
    			</table>
    			<br />
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    				<tr>
    					<td class="thead">
    						<div><strong>{$lang->xtmv_misc}</strong></div>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc&amp;xtmvmost=most">{$lang->xtmv_most_viewed}</a></strong>
    						<div class="smalltext">{$lang->xtmv_displaying} {$mybb->settings['threadsperpage']} {$lang->xtmv_most_viewed}</div>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc&amp;xtmvmost=most">{$lang->xtmv_most_commented}</a></strong>
    						<div class="smalltext">{$lang->xtmv_displaying} {$mybb->settings['threadsperpage']} {$lang->xtmv_most_commented}</div>
    					</td>
    				</tr>
    				{$ratingcol}
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=started&amp;order=desc&amp;xtmvmost=most">{$lang->xtmv_last_added}</a></strong>
    						<div class="smalltext">{$lang->xtmv_displaying} {$mybb->settings['threadsperpage']} {$lang->xtmv_last_added}</div>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc&amp;xtmvmost=most">{$lang->xtmv_last_commented}</a></strong>
    						<div class="smalltext">{$lang->xtmv_displaying} {$mybb->settings['threadsperpage']} {$lang->xtmv_last_commented}</div>
    					</td>
    				</tr>
    			</table>
    			{$searchforum}
    		</td>
    		<td valign="top">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<tr>
    					<td class="thead" colspan="2">
    						<div>
    							<strong><a href="{$forumurl}">{$foruminfo['name']}</a></strong>
    						</div>
    					</td>
    					{$inlinemodcol}
    				</tr>
    				{$threads}{$nullthreads}
    			</table>
    			<div class="float_left">
    				{$multipage}
    			</div>
    			<div class="float_right" style="margin-top: 4px;">
    				{$newthread}
    			</div>
    		</td>
    	</tr>
    </table>
    <br style="clear: both;" />
    <br />
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    	{$forumjump}
    </div>
    <br style="clear: both" />
    <div class="smalltext" align="center">
    	{$foruminfo['name']}<br />
    	Powered By <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$inline_edit_js}

  5. xtmv_forumdisplay_threadlist_rating

    HTML Code
    1
    2
    3
    4
    5
    6
    <tr>
    	<td class="trow1">
    		<strong><a href="{$sorturl}&amp;sortby=numratings&amp;order=desc&amp;xtldirmost=most">{$lang->xtmv_most_rated}</a></strong>
    		<div class="smalltext">{$lang->xtmv_displaying} {$mybb->settings['threadsperpage']} {$lang->xtmv_most_rated}</div>
    	</td>
    </tr>

  6. xtmv_most_multipage

    HTML Code
    <div class="pagination" style="display: none;"><span class="pages">{$lang->multipage_pages}</span>{$prevpage}{$start}{$mppage}{$end}{$nextpage}</div>

  7. xtmv_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
    62
    63
    64
    65
    66
    67
    68
    69
    <html>
    <head>
    <title>{$lang->newthread_in}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    <script type="text/javascript" src="flowplayer/flowplayer-3.2.6.min.js"></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>{$lang->post_new_thread}</strong></td>
    	</tr>
    	<tr>
    		<td valign="top" class="trow2">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    				<tr>
    					<td class="trow2">
    						<strong>{$lang->thread_subject}</strong><br />
    						<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    					</td>
    				</tr>
    				{$extra_threadfields}
    				<tr>
    					<td class="trow2">
    						<br />
    						<div style="text-align: center;">
    							<span class="largetext">{$lang->xtmv_thumb_preview}</span><br />
    							<span class="smalltext">{$lang->xtmv_thumb_preview_desc}</span><br />
    							{$GLOBALS['threadfields']['xtmv_thumb']['value']}
    						</div>
    					</td>
    				</tr>
    			</table>
    		</td>
    		<td valign="top" width="60%" class="trow2">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    				<tr>
    					<td class="trow2" valign="top">
    						<strong>{$lang->your_message}</strong>
    						<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
    						{$codebuttons}
    						{$multiquote_external}
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    	{$captcha}
    </table>
    <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" /></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>

  8. xtmv_postbit

    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
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}" class="tborder">
    	<tbody>
    		<tr>
    			<td class="trow1 {$unapproved_shade}">
    				<div class="float_left smalltext">
    					{$lang->author} <a href="{$post['profilelink_plain']}" id="profile_{$post['pid']}">{$post['username_formatted']}</a>
    					<br />{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    				<div class="post_body clear" id="pid_{$post['pid']}">{$post['message']}</div>
    				<div class="post_meta" id="post_meta_{$post['pid']}">{$post['iplogged']}</div>
    				<div id="profile_{$post['pid']}_popup" class="popup_menu" style="display: none;">
    					<div class="popup_item_container">
    						<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    							<tr>
    								<td class="trow1" valign="top" align="center">
    									<div><strong>{$post['profilelink']}</strong></div>
    									<div class="smalltext">{$post['useravatar']}</div>
    									<div class="smalltext">{$post['usertitle']}</div>
    									<div class="smalltext">{$post['userstars']}</div>
    									<div class="smalltext">{$post['groupimage']}</div>
    									<div class="smalltext">{$post['user_details']}</div>
    								</td>
    							</tr>
    							<tr>
    								<td class="tcat" align="center">
    									{$post['button_email']}
    									{$post['button_pm']}
    									{$post['button_www']}
    									{$post['button_find']}
    									{$post['button_rep']}
    								</td>
    							</tr>
    						</table>
    					</div>
    				</div>
    				<div class="post_management_buttons float_right clear">
    					{$post['button_edit']}
    					{$post['button_quickdelete']}
    					{$post['button_quote']}
    					{$post['button_multiquote']}
    					{$post['button_report']}
    					{$post['button_warn']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>
    <script type="text/javascript">
    // <!--
    	if(use_xmlhttprequest == "1")
    	{
    		new PopupMenu("profile_{$post['pid']}");
    	}
    // -->
    </script>

  9. xtmv_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
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    {$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="thead">
    				{$post['posturl']}
    				<div style="text-align: center;"><strong>{$post['subject']}</strong></div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 {$unapproved_shade}">
    				<div class="float_left" style="width:530px;">
    					{$GLOBALS['threadfields']['xtmv_flv']['value']}
    					<div style="margin-top: 3px;">
    						<div class="float_right" style="margin-right: 9px;">
    							<a title="Twitter" href="http://twitter.com/home?status={$thread['subject']} - {$mybb->settings['bburl']}/{$threadurl}" target="_blank"><img src="images/twitter.png" alt="Twitter" /></a>
    							<a title="Facebook" href="http://www.facebook.com/share.php?u={$mybb->settings['bburl']}/{$threadurl}" target="_blank"><img src="images/facebook.png" alt="Facebook" /></a>
    							<a title="Digg" href="http://digg.com/submit?url={$mybb->settings['bburl']}/{$threadurl}" target="_blank"><img src="images/digg.png" alt="Digg" /></a>
    							<a title="Reddit" href="http://reddit.com/submit?url={$mybb->settings['bburl']}/{$threadurl}&amp;title={$thread['subject']}" target="_blank"><img src="images/reddit.png" alt="Reddit" /></a>
    							<a title="Delicious" href="http://del.icio.us/post?url={$mybb->settings['bburl']}/{$threadurl}&amp;title={$thread['subject']}" target="_blank"><img src="images/delicious.png" alt="Delicious" /></a>
    							<a title="StumbleUpon" href="http://www.stumbleupon.com/submit?url={$mybb->settings['bburl']}/{$threadurl}" target="_blank"><img src="images/stumbleupon.png" alt="StumbleUpon" /></a>
    						</div>
    						{$GLOBALS['ratethread']}
    					</div>
    				</div>
    				<table border="0">
    					<tr>
    						<td>
    							{$GLOBALS['threadfields']['xtmv_thumb']['value']}
    						</td>
    						<td>
    							<div>
    								<strong>{$post['subject']}</strong>
    								<div class="smalltext">
    									{$lang->author} <a href="{$post['profilelink_plain']}" id="profile_{$post['pid']}">{$post['username_formatted']}</a>
    								</div>
    								<em class="smalltext">{$post['postdate']}, {$post['posttime']}</em>
    								<div class="smalltext">
    									{$GLOBALS['thread']['views']} {$lang->views}, {$thread['replies']} {$lang->replies}
    								</div>
    							</div>
    						</td>
    					</tr>
    				</table>
    				<br />
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				<div class="post_meta" id="post_meta_{$post['pid']}">{$post['iplogged']}</div>
    				<div id="edited_by_{$post['pid']}" class="float_right clear">{$post['editedmsg']}</div>
    				<br class="clear" />
    				<div>{$post['attachments']}{$post['signature']}</div>
    				<br class="clear" />
    				<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>
    				<div id="profile_{$post['pid']}_popup" class="popup_menu" style="display: none;">
    					<div class="popup_item_container">
    						<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    							<tr>
    								<td class="trow1" valign="top" align="center">
    									<div><strong>{$post['profilelink']}</strong></div>
    									<div class="smalltext">{$post['useravatar']}</div>
    									<div class="smalltext">{$post['usertitle']}</div>
    									<div class="smalltext">{$post['userstars']}</div>
    									<div class="smalltext">{$post['groupimage']}</div>
    									<div class="smalltext">{$post['user_details']}</div>
    								</td>
    							</tr>
    							<tr>
    								<td class="tcat" align="center">
    									{$post['button_email']}
    									{$post['button_pm']}
    									{$post['button_www']}
    									{$post['button_find']}
    									{$post['button_rep']}
    								</td>
    							</tr>
    						</table>
    					</div>
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>
    <script type="text/javascript">
    // <!--
    	if(use_xmlhttprequest == "1")
    	{
    		new PopupMenu("profile_{$post['pid']}");
    	}
    // -->
    </script>

  10. xtmv_postbit_first_inlinecheck

    HTML Code
    <input type="checkbox" class="checkbox" name="inlinemod_{$post['pid']}" id="inlinemod_{$post['pid']}" value="1" style="vertical-align: middle;" {$inlinecheck}  />

  11. xtmv_postbit_first_posturl

    HTML Code
    <div style="float: right; width: auto; vertical-align: top">{$post['inlinecheck']}</div>

  12. xtmv_postbit_posturl

    HTML Code
    <div style="float: right; width: auto; vertical-align: top"><span class="smalltext"><strong><a href="{$post['postlink']}#pid{$post['pid']}">#{$postcounter}</a></strong>{$post['inlinecheck']}</span></div>

  13. xtmv_showthread

    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
    <html>
    <head>
    <title>{$thread['subject']}</title>
    {$headerinclude}
    <script type="text/javascript">
    <!--
    	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
    // -->
    </script>
    <script type="text/javascript" src="jscripts/thread.js?ver=1600"></script>
    <script type="text/javascript" src="flowplayer/flowplayer-3.2.6.min.js"></script>
    </head>
    <body>
    {$header}
    {$pollbox}
    <div id="posts">
    	{$first_post}
    	<br />
    	<div style="text-align: center;">
    		<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
    	</div>
    	<br class="clear" />
    	<div class="float_right largetext">{$lang->replies}</div>
    	<br class="clear" />
    	{$posts}
    </div>
    <br class="clear" />
    <div class="float_left">
    	{$multipage}
    </div>
    <div style="padding-top: 4px;" class="float_right">
    	{$newreply}
    </div>
    <br style="clear: both;" />
    {$quickreply}
    {$threadexbox}
    {$similarthreads}
    <br />
    <div class="float_right" style="text-align: right;">
    	{$moderationoptions}
    	{$forumjump}
    </div>
    <br style="clear: both;" />
    {$usersbrowsing}
    <div class="smalltext" style="text-align: center;">
    	{$forum['name']}<br />
    	Powered by <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> &ndash; <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$footer}
    </body>
    </html>

  14. xtmv_showthread_noreplies

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    <table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" id="xthreads_noreplies" class="tborder">
    	<tr>
    		<td class="trow1">
    			<div style="text-align: center;" class="post_body">{$GLOBALS['lang']->xtmv_no_comment}</div>
    		</td>
    	</tr>
    </table>

  15. xtmv_showthread_ratethread

    HTML Code
    1
    2
    3
    4
    5
    6
    <div class="float_left smalltext">
    	<a href="./ratethread.php?tid={$thread['tid']}&amp;rating=5&amp;my_post_key={$mybb->post_code}"><img src="images/like.jpg" alt="{$lang->rate_thread}" title="{$lang->rate_thread}" /></a>
    </div>
    <div class="float_left smalltext" style="margin-left: 5px; margin-top: 5px;">
    	{$ratingvotesav}
    </div>

  16. xtmv_threadfields_inputrow

    HTML Code
    <tr>
    <td class="trow2">
    <strong>{$tf['title']}</strong><br />
    {$inputfield}<small style="display: block;">{$tf['desc']}</small></td>
    </tr>



Additional Info:
  1. We are using Flow Player for our flv player. So, we need to download it. It is a free flv player. Upload the files into our MyBB_ROOT/flowplayer folder.
  2. In this example, we use flowplayer v 3.2.6. If we use other version of the flowplayer, please modify this area:
    • Display Format of the Video Upload custom thread fields:

      HTML Code
      flowplayer("player", "{$GLOBALS['mybb']->settings['bburl']}/flowplayer/flowplayer-3.2.6.swf");

    • xtmv_newthread, xtmv_editpost_first and xtmv_showthread templates:

      HTML Code
      <script type="text/javascript" src="flowplayer/flowplayer-3.2.6.min.js"></script>

  3. We use language prefix for this (attached).
  4. There is a possibility to create our own BBCODE to embed the video from our video gallery, so user can post the video in their post in our forum.
  5. The templates above based on MyBB 1.6.


Change Logs: 23 Feb 2011

Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=14


Attached File(s) Thumbnail(s)
           

.7z  xtmv.7z (Size: 1.46 KB / Downloads: 677)

(This post was last modified: 10-08-2012 02:49 AM by RateU.)
02-17-2011 08:36 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Video Gallery - RateU - 02-17-2011 08:36 AM
RE: Video Gallery - ZiNgA BuRgA - 02-17-2011, 10:04 AM
RE: Video Gallery - leefish - 02-17-2011, 09:10 PM
RE: Video Gallery - RocketFoot - 02-17-2011, 11:20 PM
RE: Video Gallery - RateU - 02-18-2011, 06:05 AM
RE: Video Gallery - RocketFoot - 02-18-2011, 06:57 AM
RE: Video Gallery - ZiNgA BuRgA - 02-18-2011, 08:15 AM
RE: Video Gallery - RateU - 02-18-2011, 09:44 AM
RE: Video Gallery - ZiNgA BuRgA - 02-18-2011, 09:52 AM
RE: Video Gallery - RateU - 02-18-2011, 09:59 AM
RE: Video Gallery - RateU - 02-23-2011, 06:15 AM
RE: Video Gallery - hamed.ramzi - 06-01-2011, 07:53 PM
RE: Video Gallery - RateU - 06-02-2011, 01:49 AM
RE: Video Gallery - hamed.ramzi - 06-02-2011, 01:57 AM
RE: Video Gallery - RateU - 06-02-2011, 02:03 AM
RE: Video Gallery - hamed.ramzi - 06-02-2011, 03:22 AM
RE: Video Gallery - RateU - 06-02-2011, 04:26 AM
RE: Video Gallery - hamed.ramzi - 06-02-2011, 05:18 AM
RE: Video Gallery - RateU - 06-02-2011, 05:36 AM
RE: Video Gallery - hamed.ramzi - 06-02-2011, 05:54 AM
RE: Video Gallery - RateU - 06-02-2011, 06:03 AM
RE: Video Gallery - ZiNgA BuRgA - 06-02-2011, 08:44 AM
RE: Video Gallery - hamed.ramzi - 06-03-2011, 01:10 PM
RE: Video Gallery - ZiNgA BuRgA - 06-03-2011, 03:39 PM
RE: Video Gallery - hamed.ramzi - 06-03-2011, 05:25 PM
RE: Video Gallery - hamed.ramzi - 06-03-2011, 08:28 PM
RE: Video Gallery - ZiNgA BuRgA - 06-03-2011, 11:28 PM
RE: Video Gallery - av8r_bra - 06-05-2011, 01:49 PM
RE: Video Gallery - RateU - 06-06-2011, 02:17 AM
RE: Video Gallery - ZiNgA BuRgA - 06-06-2011, 06:28 PM
RE: Video Gallery - av8r_bra - 06-07-2011, 07:17 PM
RE: Video Gallery - RateU - 06-09-2011, 02:19 AM
RE: Video Gallery - ZiNgA BuRgA - 06-09-2011, 09:06 AM
RE: Video Gallery - av8r_bra - 06-09-2011, 04:57 PM
RE: Video Gallery - ZiNgA BuRgA - 06-09-2011, 09:33 PM
RE: Video Gallery - awww - 06-15-2011, 10:43 AM
RE: Video Gallery - RateU - 06-16-2011, 01:15 AM
RE: Video Gallery - awww - 06-16-2011, 01:40 AM
RE: Video Gallery - RateU - 06-16-2011, 02:33 AM
RE: Video Gallery - av8r_bra - 06-18-2011, 11:43 PM
RE: Video Gallery - RateU - 06-19-2011, 03:16 AM
RE: Video Gallery - kyuubie - 01-26-2012, 08:09 AM
RE: Video Gallery - RateU - 01-27-2012, 06:45 AM
RE: Video Gallery - Glas - 03-23-2012, 02:16 AM
RE: Video Gallery - leefish - 03-23-2012, 03:07 AM
RE: Video Gallery - Sama34 - 03-23-2012, 01:50 PM
RE: Video Gallery - Glas - 03-23-2012, 02:29 PM
RE: Video Gallery - RateU - 03-24-2012, 05:01 AM
RE: Video Gallery - LiBeRtY - 05-18-2012, 10:44 PM
RE: Video Gallery - RateU - 05-19-2012, 02:38 AM
RE: Video Gallery - LiBeRtY - 05-19-2012, 04:31 AM
RE: Video Gallery - MrBrechreiz - 05-19-2012, 06:26 AM
RE: Video Gallery - ZiNgA BuRgA - 05-19-2012, 12:10 PM
RE: Video Gallery - MrBrechreiz - 05-20-2012, 01:17 AM
RE: Video Gallery - RateU - 05-20-2012, 03:31 AM
RE: Video Gallery - MrBrechreiz - 05-20-2012, 04:12 AM
RE: Video Gallery - LiBeRtY - 05-20-2012, 05:58 AM
RE: Video Gallery - RateU - 05-20-2012, 06:17 AM
RE: Video Gallery - LiBeRtY - 05-21-2012, 01:47 AM
RE: Video Gallery - ZiNgA BuRgA - 05-20-2012, 08:32 AM
RE: Video Gallery - RateU - 05-21-2012, 07:15 AM
RE: Video Gallery - lenkbreak - 09-02-2012, 03:35 PM
RE: Video Gallery - RateU - 09-02-2012, 11:41 PM
RE: Video Gallery - lenkbreak - 09-02-2012, 11:55 PM
RE: Video Gallery - RateU - 09-03-2012, 12:19 AM
RE: Video Gallery - lenkbreak - 09-03-2012, 12:49 AM
RE: Video Gallery - lenkbreak - 09-03-2012, 01:15 PM
RE: Video Gallery - RateU - 09-04-2012, 02:04 AM
RE: Video Gallery - lenkbreak - 09-04-2012, 12:58 PM
RE: Video Gallery - RateU - 10-08-2012, 02:48 AM
RE: Video Gallery - HumanError - 06-19-2015, 10:45 PM
RE: Video Gallery - leefish - 06-20-2015, 01:46 PM
RE: Video Gallery - HumanError - 07-21-2015, 03:24 AM
RE: Video Gallery - terzier - 03-18-2016, 08:38 PM
RE: Video Gallery - ZiNgA BuRgA - 03-19-2016, 10:39 AM
RE: Video Gallery - terzier - 03-19-2016, 10:28 PM
RE: Video Gallery - terzier - 05-23-2016, 05:53 PM
RE: Video Gallery - ZiNgA BuRgA - 06-22-2016, 05:49 PM
RE: Video Gallery - crusher - 08-03-2016, 01:39 AM
RE: Video Gallery - esforum78 - 07-14-2017, 09:17 AM

 Standard Tools
Forum Jump: