Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Use vBCms Widget everywhere
ragtek
Join Date: Mar 2006
Posts: 1,630

austria, croatia
by ragtek ragtek is offline 22 Jun 2010

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

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

3. Now the output is saved in the $output variable, which can be placed where you want
Views: 12563
Reply With Quote
Comments
  #2  
Old 29 Aug 2010, 14:03
ThorstenA's Avatar
ThorstenA ThorstenA is offline
 
Join Date: Nov 2004
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
Reply With Quote
  #3  
Old 29 Aug 2010, 15:37
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
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
Reply With Quote
  #4  
Old 21 Sep 2010, 05:00
bchertov's Avatar
bchertov bchertov is offline
 
Join Date: Dec 2004
Location: Sonoma County, CA
Real name: Barry
I'll be looking for the 4.1 add-on, or better yet VB will implement this!

--------------- Added 21 Sep 2010 at 05:01 ---------------

Can you give a full example of how you would place this on a forum page, including specifying which forum?

Thanks!

Last edited by bchertov; 21 Sep 2010 at 05:01. Reason: Auto-Merged DoublePost
Reply With Quote
  #5  
Old 21 Sep 2010, 18:49
cad2go cad2go is offline
 
Join Date: Feb 2009
brilliant! tagged
Reply With Quote
  #6  
Old 30 Sep 2010, 13:33
tintin74 tintin74 is offline
 
Join Date: Jul 2007
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 14:25 ---------------

Ragtek , you've post on vbulletin.com this code to use like a plugin into vbulletin :

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Using this


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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

Last edited by tintin74; 30 Sep 2010 at 14:44. Reason: Auto-Merged DoublePost
Reply With Quote
  #7  
Old 09 Nov 2010, 04:03
wottech wottech is offline
 
Join Date: May 2006
I am also either getting errors, or nothing to appear. Has anyone successfully gotten this to work with Section Navigation?
__________________
www.60degreev6.com
Reply With Quote
  #8  
Old 07 Jan 2011, 12:33
wottech wottech is offline
 
Join Date: May 2006
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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
Reply With Quote
  #9  
Old 07 Jan 2011, 14:40
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
You need to add the css files to

I think you need
  • widgets.css
  • vbcms.css


Sorry i've forgotten to add it to the tutorial.
__________________
my addons: http://ragtek.github.com
Reply With Quote
  #10  
Old 07 Jan 2011, 16:09
wottech wottech is offline
 
Join Date: May 2006
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
Reply With Quote
  #11  
Old 14 Jan 2011, 23:51
john h john h is offline
 
Join Date: Dec 2008
Watching this one with great interest!
Reply With Quote
  #12  
Old 08 Jun 2011, 06:23
ttuser ttuser is offline
 
Join Date: Nov 2010
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??
Reply With Quote
  #13  
Old 11 Aug 2011, 11:45
tintin74 tintin74 is offline
 
Join Date: Jul 2007
same for me.
Reply With Quote
  #14  
Old 11 Aug 2011, 13:54
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Looks like a bug to me, in packages/vbcms/widget/execphp.php. In function getPageView() the first line is


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


but the line that loads the widget doesn't get called until later:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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().
Reply With Quote
  #15  
Old 03 Sep 2011, 21:24
Bram H Bram H is offline
 
Join Date: Jul 2007
Did somebody actually get this to work? I too am looking for the section widget to display on the forums
__________________
RaceDepartment.com
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
vBulletin CMS Widgets 3x CMS widget : Widget with 3 tabs, like on Blogs page. Vaupell vBulletin 4.x Add-ons 55 23 Oct 2012 23:06



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 19:30.

Layout Options | Width: Wide Color: