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: 712)

(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
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Video Gallery
Looks pretty cool there!

I noticed that the max filesize seems to be 2MB rather than 20MB.
Does Flowplayer support MP4 files?

My Blog
02-17-2011 10:04 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: Video Gallery
Thats a very slick looking layout - especially on the new thread.


[Image: leelink.gif]
MYBB1.6 & XThreads
02-17-2011 09:10 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #4
RE: Video Gallery
This is sweet!  Wonder if there is anyway to mesh it with the youtube gallery?  I don't really want to run to video galleries.Biggrin

[Image: gallery_2_628_39582.jpg]
02-17-2011 11:20 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #5
RE: Video Gallery
Thanks Biggrin

(02-17-2011 10:04 AM)ZiNgA BuRgA Wrote:  I noticed that the max filesize seems to be 2MB rather than 20MB.
Krrk... I missed the 0 Biggrin
Thanks, Yumi. I will update it, and update some templates, because some text still typed manually Smile

(02-17-2011 10:04 AM)ZiNgA BuRgA Wrote:  Does Flowplayer support MP4 files?
I just tested it, Yumi:
http://www.14.mynie.co.cc/showthread.php?tid=391
It seems works. Need to wait before the video played.
MP4 file: Video Codec H.264/AVC, 25fps, 384x288px, 4:3 aspect ratio, Bitrate 1248 kbps, 1 MB file size.

But what I don't like about this player is, it is autoplay Biggrin
I didn't try any plugin provided in their site yet.

Other fee player maybe JW Player.
Reading the description in their website, it seems that this player supports more various files than Flow Player.
And they have many plugins too.

But I don't know which is better, Yumi. I don't know much about "online video" Biggrin

(02-17-2011 09:10 PM)leefish Wrote:  especially on the new thread.
I "steal" the Job Portal newthread template Biggrin

(02-17-2011 11:20 PM)RocketFoot Wrote:  Wonder if there is anyway to mesh it with the youtube gallery?
Which part?

02-18-2011 06:05 AM
Find all posts by this user Quote this message in a reply
RocketFoot Offline
Senior Member
****
Posts: 338
Joined: Jul 2010
Post: #6
RE: Video Gallery
I'm thinking about 1 video gallery that members could either upload to my server or post/link to a youtube video...all in one post editor?  Just an idea...I'm not sure if I want to host tons of videos anyway?

[Image: gallery_2_628_39582.jpg]
02-18-2011 06:57 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #7
RE: Video Gallery
(02-18-2011 06:05 AM)RateU Wrote:  I just tested it, Yumi:
http://www.14.mynie.co.cc/showthread.php?tid=391
It seems works. Need to wait before the video played.
MP4 file: Video Codec H.264/AVC, 25fps, 384x288px, 4:3 aspect ratio, Bitrate 1248 kbps, 1 MB file size.

But what I don't like about this player is, it is autoplay Biggrin
I didn't try any plugin provided in their site yet.

Other fee player maybe JW Player.
Reading the description in their website, it seems that this player supports more various files than Flow Player.
And they have many plugins too.

But I don't know which is better, Yumi. I don't know much about "online video" Biggrin
File format support is usually supplied via Flash - the "player" is really just an interface for the Flash backend.  So support will most likely be the same.
From memory, Flash supports:
- FLV container (all supported video/audio codecs)
- MP3
- MP4 (H.264 video (all profiles/levels supported) with AAC audio (all profiles supported)) - I'm not sure if it supports MP3 in MP4, but I suspect it would

Most MP4s will have a H.264 video stream with either MP3 or AAC audio, so it'll probably work with most of the MP4s out there.  Only those that run an MPEG-4 ASP video stream might be problematic, but those don't seem to be terribly common.

IDK about FlowPlayer, but I know JWPlayer is licensed under Creative Commons, which means that if your site has ads on it, you need to pay for a license (funnily enough, there's a number of MyBB themes licensed under CC, but they don't seem to have any commercial licenses available for them).

(02-18-2011 06:57 AM)RocketFoot Wrote:  I'm thinking about 1 video gallery that members could either upload to my server or post/link to a youtube video...all in one post editor?  Just an idea...I'm not sure if I want to host tons of videos anyway?
Yes, you could do it, just have both inputs and use an if conditional to hide one of the players depending on what has been submitted.

My Blog
(This post was last modified: 02-18-2011 08:17 AM by ZiNgA BuRgA.)
02-18-2011 08:15 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Video Gallery
Updated:
Video Uploader field has been updated.
Many templates updated Biggrin, because we use language variable in showthread page too.
The language variable has been updated, and xtmv_showthread.lang included.
Screenshot has been updated to reflect this changes.

(02-18-2011 08:15 AM)ZiNgA BuRgA Wrote:  File format support is usually supplied via Flash - the "player" is really just an interface for the Flash backend.  So support will most likely be the same.
From memory, Flash supports:
- FLV container (all supported video/audio codecs)
- MP3
- MP4 (H.264 video (all profiles/levels supported) with AAC audio (all profiles supported)) - I'm not sure if it supports MP3 in MP4, but I suspect it would

Most MP4s will have a H.264 video stream with either MP3 or AAC audio, so it'll probably work with most of the MP4s out there.  Only those that run an MPEG-4 ASP video stream might be problematic, but those don't seem to be terribly common.
I've added MP4 in the Valid File Extensions setting in Video Uploader field, Yumi (I've just updated it).

(02-18-2011 08:15 AM)ZiNgA BuRgA Wrote:  IDK about FlowPlayer, but I know JWPlayer is licensed under Creative Commons, which means that if your site has ads on it, you need to pay for a license (funnily enough, there's a number of MyBB themes licensed under CC, but they don't seem to have any commercial licenses available for them).
It seems that Flow Player has "multi license". For free version (must include the Flowplayer trademark), the license is GPL 3.0:
http://flowplayer.org/download/index.html
And the FAQ for this Free Version:
http://flowplayer.org/download/free-license-faq.html

Is it OK to use it, Yumi?

02-18-2011 09:44 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #9
RE: Video Gallery
Yes, it's okay to use for most people of course.

My Blog
02-18-2011 09:52 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: Video Gallery
Yuhu! I will add this in our XThreads Example List Biggrin
Thanks, Yumi Smile

02-18-2011 09:59 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: