
05-06-2010, 12:02 AM
|
|
|
Join Date: Sep 2005
Posts: 1,160
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
================================================== =========
Version 4.0.6 FAVORITES AND WIDGETS
================================================== =========- NEW FEATURE: Users can now give hearts to media and mark them as favorites.
Any usergroup with permissions to rate, will have permission to mark favorites.
- NEW FEATURE: User Profile Tab for most recent media.
This uses the new "tiny" bit; which is selectable as the main bit in admincp.
- NEW FEATURE: Widget support for both the ForumHome Sidebar and the vbCMS.
This has been updated since the previous versions, so please update your codes. Sidebar Block:
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:
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;
- BUG FIX: Fixed formatting buttons on quick reply for comments.
- BUG FIX: Fixed MySQLi errors for those who happen to be using it.
- BUG FIX: Fixed service constructs for non-SEO slugged links.
- BUG FIX: Fixed RSS feeds for tags in table prefix settings.
|