Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 06 May 2015, 13:39
rcull rcull is offline
 
Join Date: Feb 2005
Widget Code Fails

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.

__________________
<a href=http://www.teambuick.com target=_blank>http://www.teambuick.com</a>

Last edited by kh99; 06 May 2015 at 16:53. Reason: code tags, removed login info
Reply With Quote
  #2  
Old 06 May 2015, 16:52
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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.
Reply With Quote
Reply



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

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 20:37.

Layout Options | Width: Wide Color: