vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Media Library CMS Sidebar (https://vborg.vbsupport.ru/showthread.php?t=244058)

ngcoders 06-05-2010 10:00 PM

Media Library CMS Sidebar
 
1 Attachment(s)
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


Xencored 06-06-2010 11:42 AM

Hey mate i think its best if you change the title to CMS sidebar
Jaxel added a forums sidebar one in his mods page (just not a CMS one) i think it will be easyer for people to find
Good Work too :up::up:

rotor 06-06-2010 12:55 PM

Been waiting for this..... thx much appreciated :up: :D

ngcoders 06-06-2010 01:30 PM

Changed to CMS side bar.

schlottkej 06-06-2010 03:04 PM

Where is the Forums Sidebar version in his thread?

schlottkej 06-06-2010 03:47 PM

Wow.. I found it... Ill repost

# 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:

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($seconds2"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:

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($seconds2"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. 


nomoreturn 06-06-2010 11:18 PM

1 Attachment(s)
Installed but didnt got the thumbnil of videos

akxt660 06-15-2010 09:22 PM

Have a way to add the userinfo bellow off any midia?

Reef Man 06-28-2010 07:03 PM

do you know how I can configure this on a vbadvanced block?

LouisB 06-29-2010 01:15 PM

Sidebar block works great. Thanks.

WeMovie.co.uk 07-15-2010 03:31 PM

The videos arent updating on the CMS...

SunrunnerSWG 08-11-2010 01:44 AM

This widget was a fantastic addition to my website. I appreciate your hard work!

How would I go about changing the widget so that it doesn't display a date or a username? I'd like to only display a thumbnail with a description.

Veer 08-11-2010 01:24 PM

Quote:

Originally Posted by SunrunnerSWG (Post 2081974)
This widget was a fantastic addition to my website. I appreciate your hard work!

How would I go about changing the widget so that it doesn't display a date or a username? I'd like to only display a thumbnail with a description.

+1 this.

RobbieZ 08-11-2010 05:09 PM

Quote:

Originally Posted by SunrunnerSWG (Post 2081974)
This widget was a fantastic addition to my website. I appreciate your hard work!

How would I go about changing the widget so that it doesn't display a date or a username? I'd like to only display a thumbnail with a description.

Let me install it and see if I can remove it for you.


* Tried and failed :( lol

Veer 08-11-2010 07:36 PM

Quote:

Originally Posted by RobbieZ (Post 2082245)
Let me install it and see if I can remove it for you.


* Tried and failed :( lol

lol :D

kho91 08-23-2010 03:16 AM

please how can i remplace tatset video by more popular video?

capy 08-27-2010 02:58 PM

Is it possible to get only one clip from one user? That way if someone is uploading 4 clips the widget will only show the newest clip from that user and the 3 next clips will be from other users.

capy 08-27-2010 03:02 PM

Another thing. Is it possible to get the pictures side by side and having the text under the pictures?

cloferba 09-01-2010 06:30 PM

thanks!

bada_bing 09-01-2010 08:32 PM

Installed Thanks!!!

You can see it in action here http://www.teenzspot.net

ercollins 09-02-2010 09:47 PM

yes if anyone gets this working on vbadvanced please post up........

capy 01-16-2011 11:41 AM

Looks like i need a fix after upgrading from 4.0.5 to 4.1.1. Now the pictures does not display under each other. Take a look: www.fpv.no

Can anyone think of a quick fix?

capy 01-21-2011 06:55 AM

Can no one help me on this?

Mark4865 01-21-2011 09:33 AM

Hello,

this is exactly what I need but cant seem to get it to work on 4.1.1 get error message below not sure what I am doing wrong, help anyone??

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

Fatal error: require_once() [function.require]: Failed opening required '/var/www/clients/client11/web26/web/media/media_functions_hrefs.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client11/web26/web/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 2

sgbmad 01-21-2011 10:54 AM

Works great but I'm looking for the same horizontal widget.

Thanks.

Mark4865 01-25-2011 06:40 AM

Hello,

this is exactly what I need but cant seem to get it to work on 4.1.1 get error message below not sure what I am doing wrong, help anyone??

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

Fatal error: require_once() [function.require]: Failed opening required '/var/www/clients/client11/web26/web/media/media_functions_hrefs.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client11/web26/web/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 2

Mark4865 01-31-2011 01:37 PM

hello,

Any one out there who can help PLEASE, this is perfect for my needs if only I could get it to work. What am I missing here???

Warning: require_once([path]/media/media_functions_hrefs.php) [function.require-once]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required '/var/www/clients/client11/web26/web/media/media_functions_hrefs.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client11/web26/web/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 1

Mark4865 02-06-2011 07:17 AM

Some one help PLEASE?

Mark4865 02-11-2011 05:21 AM

Help anyone PLEASE, willing to pay someone to help me get this working???

Mark4865 02-17-2011 10:31 AM

do I have to offer to sell a kidney to get someone to help me with this??

Anyone please??

rafiul 02-27-2011 07:38 PM

Re upload all files and try again. Looks like some files are missing.

Mark4865 02-28-2011 04:44 AM

Quote:

Originally Posted by rafiul (Post 2167645)
Re upload all files and try again. Looks like some files are missing.

Thanks for advice but what am I missing here, what files??

I just loaded the widget code as specified. Maybe my problems is my video files, I have them loaded in a section as static pages would that be an issue???

:)

joeman 03-01-2011 08:55 PM

Quote:

Originally Posted by Mark4865 (Post 2152315)
Hello,

this is exactly what I need but cant seem to get it to work on 4.1.1 get error message below not sure what I am doing wrong, help anyone??

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

Fatal error: require_once() [function.require]: Failed opening required '/var/www/clients/client11/web26/web/media/media_functions_hrefs.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client11/web26/web/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 2


I'm having the same issue you are having with this CMS widget mod... Did everything exactly as said in directions on page one but same error message like yours keeps coming up.

Mark4865 03-02-2011 04:49 AM

Can someone please assist with this issue???

Doganay YILDIZ 03-03-2011 03:38 PM

hello
This plug-in , Can we change the subject instead of insvideo?

Bob_R 03-03-2011 08:34 PM

Up at the top of the instructions there is a link to a plug-in. I'm sorry it's been a long day. Do I need that plugin in addition to adding the code. :confused:

Also, how do the videos get inserted into the media? By the poster themselves or me as admin?

Thanks!! :)

Mark4865 03-04-2011 04:48 AM

Can someone who has this working in 4.1.1 PLEASE tell those asking how to get this mod to work

all help appreciated

Mark4865 03-06-2011 09:01 AM

going to sound really dumb but then you are working with a technical idiot here so understand before you laugh.

just noticed the plugin add on so I assume it only works with the plugin??

Need a recent video widget the works by drawing info from videos I created using embed code in static pages any ideas anyone

Bob_R 03-08-2011 06:46 PM

Quote:

Originally Posted by Mark4865 (Post 2170083)
going to sound really dumb but then you are working with a technical idiot here so understand before you laugh.

just noticed the plugin add on so I assume it only works with the plugin??

I asked the same question above (post #36) and a 2nd one. Waiting for answers.

3rd question. You know how when you embed a code on your site and youtube doesn't allow it to be viewed unless you go to youtube?

Would this not occur anymore since it's being added to a media library?

BF777 03-26-2011 02:48 AM

How does one get rid of the "php" logo to the left of "Latest Videos?"


All times are GMT. The time now is 04:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01489 seconds
  • Memory Usage 1,870KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete