vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Can you use CMS Widgets as sidebar blocks?? (https://vborg.vbsupport.ru/showthread.php?t=283864)

addamroy 06-02-2012 08:21 PM

Can you use CMS Widgets as sidebar blocks??
 
I'm just wondering if we can use the code provided for the various CMS widgets available in the mods section, within sidebar blocks for the standard forum sidebar.

There's pretty much no sidebar specific widgets I can find here, they're all CMS widgets according to their category, not sure if these will work in the sidebar, I figured I'd ask first so I don't start executing bad PHP on the board.

Thanks!

kh99 06-02-2012 08:34 PM

If you can find the code for a "php direct execution" cms widget, I believe in many cases you can use that code directly in a "custom html/php" forum block. One minor difference is that php code for a widget assigns it's html to a $output variable while a forum block needs to return the html as a string, but you should be able to take cms widget code and add "return $output;" as the last line and achieve the same thing.

There may be other problems with accessing variables like $vbulletin, but they should be easy to fix.

addamroy 06-02-2012 09:33 PM

Awesome thanks, I'm going to give that a shot that helps alot.


All times are GMT. The time now is 01:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00912 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete