vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - United-Forum Nivo Slider Widget (https://vborg.vbsupport.ru/showthread.php?t=267024)

Mooff 07-20-2011 02:48 PM

Neither the fallback image nor an error? That's really strange.
Please link me to your test site - if that's not possible please include a var_dump here:

old:
Code:

    //Randomize Array
    //shuffle($featured_articles);

new:
Code:

    //Randomize Array
    //shuffle($featured_articles);
var_dump($featured_articles);

given you still have ob_start(); and ob_end_clean(); commented out you should see a lot of debug information.

HellRZR 07-20-2011 02:49 PM

Nice mod, can it be changed or modified easily to do the following. Pull the cms articles and display them on the forum home instead?

starman? 07-20-2011 03:09 PM

After adding the var_dump, I get a browser error in FF5.0 -
Content Encoding Error - The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

and a can't load page error in IE9.

Thanks for your help so far.

Mooff 07-20-2011 03:40 PM

@HellRZR, should be pretty easy.
Without testing the way it might/should work.

Plugin Hook Location: i don't know, has to be an early one for FORUMHOME.
maybe: process_templates_complete ?
Create a plugin, insert the code, at the end of the code add:
Code:

   
$templater = \vB_Template::create('nivo_slider');
$templater->register('output', $output);
$template_hook['insertAsensibleHookHere'] .= $templater->render();

as template_hook you have to use the place where it should show up (search through the forumhome template for template hooks and choose one.

Then create a template named nivo_slider and insert
Code:

{vb:raw output}
It then should show up.


@starman
Damn. I'm kinda lost now. Without debug message it is basecially guesswork. :(
Let's try this: Remove that var_dump again and send me the source code of your slider cms-page you get viewing it via firefox5.0 ( ctrl+u) starting at: "
<link rel="stylesheet" href="' .$slider_img_filepath. '/nivo-slider.css" type="text/css" media="screen" />
...

until: <script type="text/javascript">
$(window).load(function() {
$("#slider").nivoSlider();
});
</script>
</div>


Maybe i'll see something there.

Alfa1 07-20-2011 04:25 PM

Quote:

Originally Posted by Mooff (Post 2222761)
Per default the execution code in a cms-php widget is returning the date.

After you create the widget you have to click on "Configure" on the right and insert my code.


edit: let me clarify that one.
You have to delete that code, which is in there by default:
Code:

$output = date(vB::$vbulletin->options['dateformat']) . "<br />\n";
If you post additional code below that line nothing will happen. It just takes the output value - and doesn't even evaluate the rest.

That code is removed and replaced by your code. Yet the date still shows. When I refresh the page it goes away, but upon refreshing again its there again. :confused:

Sometimes when refreshing, I get this error:
Code:

Parse error:  syntax error, unexpected '&' in /packages/vbcms/widget/execphp.php(191) : eval()'d code on line 17
or
Code:

Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /packages/vbcms/widget/execphp.php(191) : eval()'d code on line 14

mitch84 07-20-2011 04:42 PM

thank you, work fine, installed in two minutes, great work!;)

Mooff 07-20-2011 04:48 PM

@mitch84
Thanks for the feedback. Allways nice to hear when it is working. :)

@Alfa1
I have no idea what's broken there. Doesn't sound like a mistake in my code. Do you have other php widgets running? Do they produce similar errors?

starman? 07-20-2011 04:50 PM

PM sent

Alfa1 07-20-2011 05:10 PM

Quote:

Originally Posted by Mooff (Post 2222938)
@mitch84
Thanks for the feedback. Allways nice to hear when it is working. :)

@Alfa1
I have no idea what's broken there. Doesn't sound like a mistake in my code. Do you have other php widgets running? Do they produce similar errors?

I have one other php widget running, but that does not produce any error.

Morpheus NS 07-20-2011 07:25 PM

Is it possible to make it work for 4.1.1? I followed your instructions, but all I get is the white background.

Edit: Nevermind, I just made it work. But, here is another problem. It shows only fallback image...


All times are GMT. The time now is 02:50 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.01514 seconds
  • Memory Usage 1,740KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete