vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=318565

Widget Code Fails
by rcull
06 May 2015 13:39

I have a bit of code which works well in most places, but I would like it to work in my vb cms widgets. It seems beyond me to get it to work, but maybe someone would like to tell me what is wrong.

I have managed to get it work with an iframe in the widget, but the presentation is poor.




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


kh99 06 May 2015 16:52

You want to use a PHP Direct Execution type of widget (if you haven't already), then use the "configure" link on the right to enter your php code. The output html needs to be returned in a string called $output instead of using echo or print. The easiest way to do that would be to surround the existing code with ob_start() and ob_end_clean(), like this:


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


and as the comment says, put your code there but don't include the first and last lines with the tags.

Also, I edited your post to put the code in code tags, and also to remove your database username and password, just in case.


All times are GMT. The time now is 01:25.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.