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);
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
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
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