![]() |
|
|
Article Options |
|
Use vBCms Widget everywhere
by
Rating:
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):
3. Now the output is saved in the $output variable, which can be placed where you want
No members have liked this post.
|
||||
|
Views: 9614
|
||||
| Comments |
|
#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 ![]() No members have liked this post.
|
|
#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 ![]()
__________________
my addons: http://ragtek.github.com No members have liked this post.
|
|
#4
|
||||
|
||||
|
I'll be looking for the 4.1 add-on, or better yet VB will implement this!
--------------- Added 21 Sep 2010 at 04:01 --------------- Can you give a full example of how you would place this on a forum page, including specifying which forum? Thanks! No members have liked this post.
Last edited by bchertov : 21 Sep 2010 at 04:01. Reason: Auto-Merged DoublePost |
|
#5
|
|||
|
|||
|
brilliant! tagged
No members have liked this post.
|
|
#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 30 Sep 2010 at 13:25 --------------- Ragtek , you've post on vbulletin.com this code to use like a plugin into vbulletin :
Using this
into the template to call the plugin . 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 No members have liked this post.
Last edited by tintin74 : 30 Sep 2010 at 13:44. Reason: Auto-Merged DoublePost |
||||||||
|
#7
|
|||
|
|||
|
I am also either getting errors, or nothing to appear. Has anyone successfully gotten this to work with Section Navigation?
__________________
www.60degreev6.com No members have liked this post.
|
|
#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:
For the template, I made a copy of the normal Section Navigation widget template so that I could edit it for the forums. I also used the "Everywhere Sidebar" mod on here to be able to place the menu on all areas of the site. 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.
__________________
www.60degreev6.com No members have liked this post.
|
||||
|
#9
|
||||
|
||||
|
You need to add the css files to
![]() I think you need
Sorry i've forgotten to add it to the tutorial.
__________________
my addons: http://ragtek.github.com No members have liked this post.
|
|
#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.
__________________
www.60degreev6.com No members have liked this post.
|
|
#11
|
|||
|
|||
|
Watching this one with great interest!
No members have liked this post.
|
|
#12
|
|||
|
|||
|
How to use it with "PHP Direct execution" type widget?
Hi,
The code looks like: bootstrap_framework(); vBCms_View_Widget::registerTemplater(vB_View::OT_XHTML, new vB_Templater_vB()); $widgetID = 32; // the id of the widget $widgettype = 'ExecPhp'; // type of the widget you want to output $widget = vBCms_Widget::create('vBCms', $widgettype, $widgetID); $output = $widget->getPageView()->render(); But it throws error for non object as: Fatal error: Call to a member function getConfig() on a non-object in \packages\vbcms\widget\execphp.php on line 160 Can some body help me in this?? No members have liked this post.
|
|
#14
|
||||||||
|
||||||||
|
Looks like a bug to me, in packages/vbcms/widget/execphp.php. In function getPageView() the first line is
but the line that loads the widget doesn't get called until later:
so you could try moving the assertWidget() line to the beginning of that function, or in your code you could add a call to $widget->getConfigView() before the call to getPageView(). No members have liked this post.
|
||||||||
|
#15
|
|||
|
|||
|
Did somebody actually get this to work? I too am looking for the section widget to display on the forums
__________________
RaceDepartment.com No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
Similar Article
|
||||
| Article | Author | Type | Replies | Last Post |
| 3x CMS widget : Widget with 3 tabs, like on Blogs page. | Vaupell | vBulletin 4.x Add-ons | 55 | 23 Oct 2012 22:06 |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Article Options | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 06:35.




