Installation:
Upload all the files in the "upload" directory of the attached zip file to your forum root.
CHMOD the /customVID directory and all directories within it to full read/write/execute 777.
Import the product file called "product-media.xml" in the Product Manager of vBulletin.
Set your usergroup permissions and media library settings in your administration control panel.
Known Bugs:
There is a conflict with this modification and some of Valter's VSA modifications that will prevent navbar permissions from being handled correctly. I don't know exactly who's fault it is; but I'm pretty sure there are no errors in my code that would be causing this problem. There is a work around for this however.
Admin Control Panel > Plugins & Products > Plugin Manager > "media NAVTAB"
Find the code:
Mã PHP:
PHP Code:
$perms = media_permissions();
Mã PHP:
PHP Code:
$perms['rate'] = true;
$perms['submit'] = true;
if (is_member_of($vbulletin->userinfo, explode(',','5,6')))
{
$perms['modtags'] = true;
$perms['modcategory'] = true;
$perms['modservice'] = true;
}
Sidebar Block:
Mã PHP:
PHP Code:
global $vbulletin;
require_once(DIR.'/media/media_functions_hrefs.php');
$medias = $vbulletin->db->query_read("
SELECT media.*, media_service.*
FROM " . TABLE_PREFIX . "media AS media
LEFT JOIN " . TABLE_PREFIX . "media_service AS media_service ON(media_service.serviceID = media.serviceID)
ORDER BY media.dateline DESC
LIMIT 3
");
while ($media = $vbulletin->db->fetch_array($medias))
{
if ($media['length'] == 0)
{
$media['length'] = "???";
}
else
{
$duration = $media['length'];
$minutes = floor($duration / 60);
$seconds = $duration % 60;
$seconds = str_pad($seconds, 2, "0", STR_PAD_LEFT);
$media['length'] = "$minutes:$seconds";
}
$media['intrate'] = intval($media['rating']);
$media['thumbnail'] = $vbulletin->options['media_thumb_dir']."/thumbs/". $media['mediaID'] .".jpg";
$media['href'] = construct_href_details($media);
$templater = vB_Template::create('8WR_media_WIDGET');
$templater->register('media', $media);
$mediabits .= $templater->render();
}
return $mediabits;
CMS Widget:
Mã PHP:
PHP Code:
require_once(DIR.'/media/media_functions_hrefs.php');
$medias = vB::$vbulletin->db->query_read("
SELECT media.*, media_service.*
FROM " . TABLE_PREFIX . "media AS media
LEFT JOIN " . TABLE_PREFIX . "media_service AS media_service ON(media_service.serviceID = media.serviceID)
ORDER BY media.dateline DESC
LIMIT 3
");
while ($media = vB::$vbulletin->db->fetch_array($medias))
{
if ($media['length'] == 0)
{
$media['length'] = "???";
}
else
{
$duration = $media['length'];
$minutes = floor($duration / 60);
$seconds = $duration % 60;
$seconds = str_pad($seconds, 2, "0", STR_PAD_LEFT);
$media['length'] = "$minutes:$seconds";
}
$media['intrate'] = intval($media['rating']);
$media['thumbnail'] = vB::$vbulletin->options['media_thumb_dir']."/thumbs/". $media['mediaID'] .".jpg";
$media['href'] = construct_href_details($media);
$templater = vB_Template::create('8WR_media_WIDGET');
$templater->register('media', $media);
$mediabits .= $templater->render();
}
$output = $mediabits;
hoặc
Code:
global $vbulletin; require_once(DIR.'/media/media_functions_hrefs.php'); // %d $show_count = 5; $medias = $vbulletin->db->query_read(" SELECT media.*, media_service.* FROM " . TABLE_PREFIX . "media AS media LEFT JOIN " . TABLE_PREFIX . "media_service AS media_service ON(media_service.serviceID = media.serviceID) ORDER BY media.dateline DESC LIMIT ".$show_count); $output = ' <style type="text/css"> .thumbnail img{ width: 90px; height: 70px; border: 1px solid #ccc; padding: 5px; margin: 5px; float: left; } .video_bit { min-height: 90px; } </style> '; while ($media = $vbulletin->db->fetch_array($medias)) { $media['thumbnail'] = $vbulletin->options['media_thumb_dir']."/thumbs/". $media['mediaID'] .".jpg"; $media['href'] = construct_href_details($media); extract($media); $title = substr($title,0,60); $mediabits .= sprintf('<div class="cms_widget_post_bit video_bit"><div class="thumbnail"><a href="%s"><img src="%s"></a></div><div class="cms_widget_post_header"><a href="%s">%s</a></div><div class="cms_widget_post_userinfo"><a href="member.php/u=%d">%s</a> On %s</div></div>',$href,$thumbnail,$href,$title,$userid,$username,date('F j, Y, g:i a',$dateline)); } $output .= $mediabits;
Mod này hỗ trợ các link từ trang: DailyMotion, LocalAudio, LocalVideo, MegaVideo, MetaCafe, uStream, Veoh, Vimeo, YouTube
Demo: http://sinhvienthamdinh.com/forum/media.php
[DOWNLOAD][/DOWNLOAD]
link media
bản tiếng anh http://www.mediafire.com/?gzygnmjzdnm
bản việt hoá http://www.mediafire.com/?zmdizmoyrzw
Upload all the files in the "upload" directory of the attached zip file to your forum root.
CHMOD the /customVID directory and all directories within it to full read/write/execute 777.
Import the product file called "product-media.xml" in the Product Manager of vBulletin.
Set your usergroup permissions and media library settings in your administration control panel.
Known Bugs:
There is a conflict with this modification and some of Valter's VSA modifications that will prevent navbar permissions from being handled correctly. I don't know exactly who's fault it is; but I'm pretty sure there are no errors in my code that would be causing this problem. There is a work around for this however.
Admin Control Panel > Plugins & Products > Plugin Manager > "media NAVTAB"
Find the code:
Mã PHP:
PHP Code:
$perms = media_permissions();
Mã PHP:
PHP Code:
$perms['rate'] = true;
$perms['submit'] = true;
if (is_member_of($vbulletin->userinfo, explode(',','5,6')))
{
$perms['modtags'] = true;
$perms['modcategory'] = true;
$perms['modservice'] = true;
}
Sidebar Block:
Mã PHP:
PHP Code:
global $vbulletin;
require_once(DIR.'/media/media_functions_hrefs.php');
$medias = $vbulletin->db->query_read("
SELECT media.*, media_service.*
FROM " . TABLE_PREFIX . "media AS media
LEFT JOIN " . TABLE_PREFIX . "media_service AS media_service ON(media_service.serviceID = media.serviceID)
ORDER BY media.dateline DESC
LIMIT 3
");
while ($media = $vbulletin->db->fetch_array($medias))
{
if ($media['length'] == 0)
{
$media['length'] = "???";
}
else
{
$duration = $media['length'];
$minutes = floor($duration / 60);
$seconds = $duration % 60;
$seconds = str_pad($seconds, 2, "0", STR_PAD_LEFT);
$media['length'] = "$minutes:$seconds";
}
$media['intrate'] = intval($media['rating']);
$media['thumbnail'] = $vbulletin->options['media_thumb_dir']."/thumbs/". $media['mediaID'] .".jpg";
$media['href'] = construct_href_details($media);
$templater = vB_Template::create('8WR_media_WIDGET');
$templater->register('media', $media);
$mediabits .= $templater->render();
}
return $mediabits;
CMS Widget:
Mã PHP:
PHP Code:
require_once(DIR.'/media/media_functions_hrefs.php');
$medias = vB::$vbulletin->db->query_read("
SELECT media.*, media_service.*
FROM " . TABLE_PREFIX . "media AS media
LEFT JOIN " . TABLE_PREFIX . "media_service AS media_service ON(media_service.serviceID = media.serviceID)
ORDER BY media.dateline DESC
LIMIT 3
");
while ($media = vB::$vbulletin->db->fetch_array($medias))
{
if ($media['length'] == 0)
{
$media['length'] = "???";
}
else
{
$duration = $media['length'];
$minutes = floor($duration / 60);
$seconds = $duration % 60;
$seconds = str_pad($seconds, 2, "0", STR_PAD_LEFT);
$media['length'] = "$minutes:$seconds";
}
$media['intrate'] = intval($media['rating']);
$media['thumbnail'] = vB::$vbulletin->options['media_thumb_dir']."/thumbs/". $media['mediaID'] .".jpg";
$media['href'] = construct_href_details($media);
$templater = vB_Template::create('8WR_media_WIDGET');
$templater->register('media', $media);
$mediabits .= $templater->render();
}
$output = $mediabits;
hoặc
Code:
global $vbulletin; require_once(DIR.'/media/media_functions_hrefs.php'); // %d $show_count = 5; $medias = $vbulletin->db->query_read(" SELECT media.*, media_service.* FROM " . TABLE_PREFIX . "media AS media LEFT JOIN " . TABLE_PREFIX . "media_service AS media_service ON(media_service.serviceID = media.serviceID) ORDER BY media.dateline DESC LIMIT ".$show_count); $output = ' <style type="text/css"> .thumbnail img{ width: 90px; height: 70px; border: 1px solid #ccc; padding: 5px; margin: 5px; float: left; } .video_bit { min-height: 90px; } </style> '; while ($media = $vbulletin->db->fetch_array($medias)) { $media['thumbnail'] = $vbulletin->options['media_thumb_dir']."/thumbs/". $media['mediaID'] .".jpg"; $media['href'] = construct_href_details($media); extract($media); $title = substr($title,0,60); $mediabits .= sprintf('<div class="cms_widget_post_bit video_bit"><div class="thumbnail"><a href="%s"><img src="%s"></a></div><div class="cms_widget_post_header"><a href="%s">%s</a></div><div class="cms_widget_post_userinfo"><a href="member.php/u=%d">%s</a> On %s</div></div>',$href,$thumbnail,$href,$title,$userid,$username,date('F j, Y, g:i a',$dateline)); } $output .= $mediabits;
Mod này hỗ trợ các link từ trang: DailyMotion, LocalAudio, LocalVideo, MegaVideo, MetaCafe, uStream, Veoh, Vimeo, YouTube
Demo: http://sinhvienthamdinh.com/forum/media.php
[DOWNLOAD][/DOWNLOAD]
link media
bản tiếng anh http://www.mediafire.com/?gzygnmjzdnm
bản việt hoá http://www.mediafire.com/?zmdizmoyrzw
Bài tương tự bạn quan tâm
Mod hiển thị 2 cột chủ đề mới cùng chuyên mục và...
- Thread starter Mr LNA
- Ngày bắt đầu
vt.Lai VBB Ads Management 4.1 for vBB 4 - Mod quản...
- Thread starter Mr LNA
- Ngày bắt đầu
Share mod nạp tiền bằng thẻ cào điện thoại , thẻ...
- Thread starter trongsau96
- Ngày bắt đầu
Share mod thông điệp yêu thương mà...
- Thread starter Mr LNA
- Ngày bắt đầu
Xin mod thông điệp yêu thương
- Thread starter subangbang
- Ngày bắt đầu
[vb4] Mod level cho Vb4
- Thread starter Mr LNA
- Ngày bắt đầu