Back to vBulletin 4.x Add-ons

Media Library CMS Sidebar
Mod Version: 1.00, by ngcoders

vB Version: 4.0.x Rating: (13 votes - 4.77 average) Installs: 115
Released: 06 Jun 2010 Last Update: Never Downloads: 0
Not Supported Auto-Template  

Media Library CMS Sidebar

Released 06-06-2010
By Vikas - http://www.ngcoders.com
For Plugin - 8WayRun.Com - Media Library (8WayRun.Com - Media Library)
For Demo - http://www.roboticsindia.com/ ( Left Sidebar )

Installation
  • Goto Admincp->vBullietin CMS->Widgets->Create New Widget
  • Choose PHP Direct Execution as Widget's Type
  • Place a Title. eg Latest Videos. Keep it short as this is what will appear as title on your pages.
  • Click Save
  • Click Configure on the right of the new created widget.
  • Remove the default code that appears. Be sure to not leave behind even a single letter.
  • Copy and Paste the code that you can find below.
  • Leave the template name as is (vbcms_widget_execphp_page)
  • Click Save
  • Goto Admincp->vBullietin CMS->Layout Manager
  • Click Go on the Default Layout
  • Add the Widget to your Layout
  • Click Save
  • That's all !!

PHP Code

PHP 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

Download

No files for download.

Screenshots

Click image for larger version
Name:	Clipboard01.jpg
Views:	3167
Size:	21.9 KB
ID:	118108  

Similar Mods

Add-On Releases Digital Sith's AMEs - ADULT Media Definitions vBulletin 3.6 Add-ons
Major Additions 8WayRun.Com - Media Library Modification Graveyard
Add-On Releases Media Block for DnP Instant! Musicbox - Display the fun media list anywhere ! vBulletin 3.8 Add-ons

vblts.ru supports vBulletin®, 2022-2024