Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Media Library CMS Sidebar Details »»
Media Library CMS Sidebar
Version: 1.00, by ngcoders ngcoders is offline
Developer Last Online: Sep 2012 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.x Rating:
Released: 06-05-2010 Last Update: Never Installs: 115
Auto-Templates
 
No support by the author.

Media Library CMS Sidebar

Released 06-06-2010
By Vikas - http://www.ngcoders.com
For Plugin - https://vborg.vbsupport.ru/showthread.php?t=240677 (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

Screenshots

File Type: jpg Clipboard01.jpg (21.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
eTiKeT?, K4GAP, RichieBoy67

Comments
  #62  
Old 02-11-2013, 10:30 PM
marccap's Avatar
marccap marccap is offline
 
Join Date: Feb 2012
Location: uk
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by alhidaya View Post
Hello,

I have the same problem and yet I have the latest version. Thank you to want to do with this topic
Try amending the widget coding measurements. I amended the padding and margin from 5px to 4px and seem to fix the problem

PHP Code:
$output 
  <style type="text/css"> 
    .thumbnail img{ 
      width: 90px; 
      height: 70px; 
      border: 1px solid #ccc; 
      padding: 5px; 
      margin: 5px; 
      float: left; 
Reply With Quote
  #63  
Old 12-04-2013, 01:41 AM
rotor rotor is offline
 
Join Date: Jul 2007
Location: Qld, Australia
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd really like to get this to work on my site and any help would be greatly appreciated...........

I am running 4.2.2 and when I try to use the code it gives me a database error ....

Anyone got any ideas??????
Reply With Quote
  #64  
Old 01-13-2014, 06:59 AM
rotor rotor is offline
 
Join Date: Jul 2007
Location: Qld, Australia
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone????????
Reply With Quote
  #65  
Old 01-13-2014, 07:43 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is the error?
Reply With Quote
  #66  
Old 07-29-2015, 08:20 PM
rotor rotor is offline
 
Join Date: Jul 2007
Location: Qld, Australia
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops just noticed your reply - heres the error that I get -

PHP Warning: require_once(..../media/media_functions_hrefs.php): failed to open stream: No such file or directory in ..../packages/vbcms/widget/execphp.php(191) : eval()'d code on line 2

Fatal error: require_once(): Failed opening required '/home/xxxxxxxxxxxx/public_html/xxxxxxxxxxxxxx/media/media_functions_hrefs.php' (include_path='.:/usr/local/php54/pear') in /home/xxxxxxxx/public_html/xxxxxxxxxxx/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 2
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:22 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06021 seconds
  • Memory Usage 2,297KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (3)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete