The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Use vBCms Widget everywhere
Here is a method, how to use the widgets on own pages. 1. fix this bug: http://tracker.vbulletin.com/browse/VBIV-7640 2. Now you can use the following code where you want (plugin, own php page): PHP Code:
|
#2
|
||||
|
||||
Wow, amazing! So with that you could actually use cms widgets (the "real ones") also on the forum home page? Then that would be the solution for integrating the "read widgets" also on the forum sidebar.
And the proprietary sidebar can rest in peace, finally |
#3
|
|||
|
|||
Yea, it's possible and i wanted to create a add-on for this, but i had some styling problems, so i gave it up.
I'll try it again after the 4.1 release, because the styling will hopefully be easier |
#4
|
||||
|
||||
I'll be looking for the 4.1 add-on, or better yet VB will implement this!
--------------- Added [DATE]1285041706[/DATE] at [TIME]1285041706[/TIME] --------------- Can you give a full example of how you would place this on a forum page, including specifying which forum? Thanks! |
#5
|
|||
|
|||
brilliant! tagged
|
#6
|
|||
|
|||
Hello ragtek, I want to call this widget using a template. I've already create a plugin with the code you've suggested. Could you tell me how to include the $output variable into a template? I'm using vb4.0.6
Thank you --------------- Added [DATE]1285853151[/DATE] at [TIME]1285853151[/TIME] --------------- Ragtek , you've post on vbulletin.com this code to use like a plugin into vbulletin : Code:
bootstrap_framework(); vBCms_View_Widget::registerTemplater(vB_View::OT_XHTML, new vB_Templater_vB()); $widgetID = 20; // the id of the widget $widgettype = 'RecentContent'; $widget = vBCms_Widget::create('vBCms', $widgettype, $widgetID); $output = $widget->getPageView()->render(); $templater ->register('widget', $output); Code:
{vb:raw widget} But If I do it, I get this error : Fatal error: Call to a member function register() on a non-object in /var/www/vhosts/mydomain.com/httpdocs/new/forum/global.php(29) : eval()'d code on line 8 Do you know how to solve this, please? Thank you o |
#7
|
|||
|
|||
I am also either getting errors, or nothing to appear. Has anyone successfully gotten this to work with Section Navigation?
|
#8
|
|||
|
|||
Since someone asked about it over on vb.com, I was able to finally get this to work with some success. I used ragtek's code and placed it in a new Forum Block using a PHP content type. My goal was to use the Section Navigator in the forums, so my code looked like this:
Code:
bootstrap_framework(); vBCms_View_Widget::registerTemplater(vB_View::OT_XHTML, new vB_Templater_vB()); $widgetID = 16; // the id of the widget $widgettype = 'SectionNavExt'; // type of the widget you want to output $widget = vBCms_Widget::create('vBCms', $widgettype, $widgetID); $output = $widget->getPageView()->render(); Now the bad part... I could never get the CSS to work properly to display the menu the same in the forums as it was displayed in the CMS. It basically was just a bulleted list that wasn't collapsible. If someone figures out that part, then I would definitely use it again. |
#9
|
|||
|
|||
You need to add the css files to
I think you need
Sorry i've forgotten to add it to the tutorial. |
#10
|
|||
|
|||
I tried several different ways to add it, but since the Section Navigation uses script from Yahoo, I couldn't figure out how to get it to call properly. I messed with it for several days and never had any success. Any further input would be great, as I would love to get it up and running properly.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|