MyBB Hacks

Full Version: YouTube Video Gallery
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 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
You need at least three files in your MYBB_ROOT_DIR/flowplayer folder:
flowplayer-3.2.4.min.js
flowplayer.controls-3.2.3.swf
flowplayer-3.2.5.swf

Set the template prefix for that forum id: vupload_

Assuming you already created the uploader:
Create a new template in global templates:
vupload_showthread  template:
Copy paste the entire code from your showthread template into this template.
Then, put this code at the header tag, before the </head>

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


Put this code after the {$header} variable:

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


Try to upload a small flv video first.
Wait the video loaded.
If it works for you, you should get something like this:
[attachment=250]

EDIT:
Here is a live demo for it:
http://www.14.mynie.co.cc/showthread.php?tid=146

(10-19-2010 08:26 AM)awww Wrote: [ -> ]maybe i need set the permissions for the upload folder is it an upload folder
Yes, the upload folder needs to be writeable, as per MyBB requirements.
thax it worked great Smile
spoke too soon now im gettin Error attaching file for "Video Uploader"; The type of file that you attached is not allowed. Please remove the attachment or choose a different type.
The only validation this does is the extension.
Maybe delete the extension required, and set the max filesize to 0 and try again.
Hi,

how to add vimeo video?

I found Viemo MyCode thread here. Biggrin


http://community.mybb.com/thread-42685.html
Try playing around with the text mask filter (= regular expression) and display format (= replacement)

Note that the text mask filter should probably begin with a ^ character and end with a $ character.
I saw a strange post in my new threads view today...the title of the video was followed by pagination numbers (1 2 1 2 3) but there is only 3 pages of comments?  What could be causing this?

See screen cap below...

This is the video thread in question:
http://www.7173mustangs.com/thread-test-run
^ Hmm, can you try this code modification?
In inc/xt_mischooks.php, find:

PHP Code:
if($pagesstop != $thread['pages']) { // small optimisation

Add after:

PHP Code:
$threadpages = $morelink = '';


See if that fixes it.  Thanks!

It looks like that fixed it, Zinga!  Thanks!
Are there any CSS guru's out there that can help me dress up the Video Gallery a little?  I'd like to maybe add some boxes or something to match my Garage layout...

Video Gallery

Garage

I am learning a little about CSS but I can't seem to make any changes that don't result in major breakage! LOL  I did manage to add borders but I can't figure out how to get the shadow effect (mozilla) like the garage has??



Also, how can I change all the links in my ytvgal_forumdisplay_thread to a seperate inline CSS so they overide the main page CSS for links?  

This is my template:

Code:
<td width="25%" valign="top">
	<table border="0" width="100%">
		<tr>
			{$modbit}
			<td valign="top" align="center">
				<a href="{$thread['threadlink']}">
					<img src="http://img.youtube.com/vi/{$GLOBALS['threadfields']['ytvgalid']}/default.jpg" alt="" title="{$thread['subject']}" />
				</a>
				<div style="width: 150px; overflow: hidden; white-space: nowrap">
					<a href="{$thread['threadlink']}" class="{$inline_edit_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>
				</div>
				<div>
					{$rating}
					<span class="smalltext">
						By: {$thread['profilelink']}<br />{$GLOBALS['threadfields']['ytvgalcat']}
						{$thread['threaddate']}, {$thread['threadtime']}<br />
						{$thread['views']} {$lang->views}, {$thread['replies']}{$unapproved_posts} Comments
					</span>
				</div>
			</td>
		</tr>
		<tr>
			<td valign="top" colspan="2">
				{$thread['multipage']}
			</td>
		</tr>
	</table>
</td>


And this is the inline CSS that I need:

Code:
<STYLE type=text/css>

A:link {
 COLOR: blue /*The color of the link*/
}
A:visited {
 COLOR: blue /*The color of the visited link*/
}
A:hover {
 COLOR: red /*The color of the mouseover or 'hover' link*/
}
</STYLE>

Nothing I try seems to work!  (Unless I just add this to the template but then the links in the Member Welcome header bar changes also!)  Halp! Tongue

Pages: 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
Reference URL's