2 mojolazarus Mar 22, 2012 16:58

I received this error notice on installation. Is this fatal?
Notice: Undefined variable: baseurl in /public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php on line 594
Warning: Cannot modify header information - headers already sent by (output started at /public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php:594) in /public_html/blogs/inc/_core/_template.funcs.php on line 216
mojolazarus wrote:
I received this error notice on installation. Is this fatal?
Notice: Undefined variable: baseurl in /public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php on line 594
Warning: Cannot modify header information - headers already sent by (output started at /public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php:594) in /public_html/blogs/inc/_core/_template.funcs.php on line 216
Nope, that's a minor bug due to a forgotten "global" in the after installation message.You can just ignore it.You've only seen it once after the install and it disapperaed later on right ?
Looks nice :)
Yes that's right it did just disappear, thanks. I'll leave up the slider (with default images) for a while today if you want to see the behaviour (in the footer).
Thanks
mojolazarus wrote:
Yes that's right it did just disappear, thanks. I'll leave up the slider (with default images) for a while today if you want to see the behaviour (in the footer).
Thanks
The problem was surely in mystique.js and i had tracked it down inside thousands of lines : D
Comment out the lines between 1399 - 1424 inside mystique.js and you should be fine.
It's not anything vital as far as i see.
/*
// fixes for IE-7/8 cleartype bug on fade in/out
jQuery.fn.fadeIn = function (speed, callback) {
return this.animate({
opacity: 'show'
}, speed, function () {
if (jQuery.browser.msie) this.style.removeAttribute('filter');
if (jQuery.isFunction(callback)) callback();
});
};
jQuery.fn.fadeOut = function (speed, callback) {
return this.animate({
opacity: 'hide'
}, speed, function () {
if (jQuery.browser.msie) this.style.removeAttribute('filter');
if (jQuery.isFunction(callback)) callback();
});
};
jQuery.fn.fadeTo = function (speed, to, callback) {
return this.animate({
opacity: to
}, speed, function () {
if (to == 1 && jQuery.browser.msie) this.style.removeAttribute('filter');
if (jQuery.isFunction(callback)) callback();
});
};
*/
sam2kb wrote:
Looks nice :)
thanks.. nothing fancy unlike your plugins :D.. just saves a few steps for the regular users. (:
The problem was surely in mystique.js and i had tracked it down inside thousands of lines : D
It looks like the code above overrides default jQuery functions. I will probably upgrade the skin to upstream version.
Check this http://wp.digitalnature.eu/mystique/
sam2kb wrote:
The problem was surely in mystique.js and i had tracked it down inside thousands of lines : D
It looks like the code above overrides default jQuery functions. I will probably upgrade the skin to upstream version.
Check this http://wp.digitalnature.eu/mystique/
yeah, seems lighter and more agile.frankly i didnt like the 2.x version of the skin, as it was a heavy javascript monster, but it seems they have reduced the load on 3.x and got additional graceful degradation measures for non-js visitors.
Thanks a lot for putting in the effort to find the problem, I'll try commenting out that section. I had started to implement the camera slider from Diapo. On checking the link you gave Sam I see Mystique has a slider! So this is version 3.2 Does that mean that I can or can't use it in b2evolution?
Thanks again
Quick question about the positioning of the slider. I see you can place it in any of the standard places. Is there a way of placing it in a custom div? Otherwise it looks a bit awkward in the skin I'm using? Cheers
mojolazarus wrote:
Quick question about the positioning of the slider. I see you can place it in any of the standard places. Is there a way of placing it in a custom div? Otherwise it looks a bit awkward in the skin I'm using? Cheers
Sure, you can add it virtually anywhere via widget containers.Read below on how to add one.
http://forums.b2evolution.net/viewtopic.php?t=14515
oh great, thanks for that. I will go and read more about containers then :)
Hi,
I've created an appropriate div and set up a container within that:
<!-- nivo_slider -->
<div id="nivo_slider">
<?php
// "Nivo Slider" CONTAINER EMBEDDED HERE
skin_container( NT_('nivo_slider'), array(
// Contain each widget in a block:
'block_start' => '<li class="block $wi_class$"><div class="clearfix">',
'block_end' => '</div></li>',
) );
?>
</div>
<!-- nivo_slider -->
I 'see' the container in blog settings and can add the nivo slider widget. However, it is not displayed on the blog. Do you know what I'm doing wrong? Thanks tilqicom
http://www.chileno.co.uk/blogs/blog1.php
(I've highlighted it in pink)
Ok, I've got it with:
<!-- nivo_slider -->
<div id="nivo_slider">
<ul class="blocks">
<?php
// "Nivo Slider" CONTAINER EMBEDDED HERE
skin_container( NT_('Nivo Slider'), array(
'block_start' => '<div class="">',
'block_end' => '</div>',
) );
?>
</ul>
</div>
<!-- end of nivo_slider -->
I'll see if I can configure it now :)
<?php //nivo slider container
skin_container( NT_('Nivo Slider'), array(
'block_start' => '<div id="$wi_ID$" class="nivo_slider $wi_class$">',
'block_end' => '</div>',
'block_title_start' => '<h3>',
'block_title_end' => '</h3>',
'list_start' => '<ul>',
'list_end' => '</ul>',
'item_start' => '<li>',
'item_end' => '</li>',
'group_start' => '<ul>',
'group_end' => '</ul>',
) ); ?>
Hi, Iam a newbie in b2evolution and I want to know how can I embed Nivo Slider in a post? With what code? Exactly how please!!!
Thank You
spyrou wrote:
Hi, Iam a newbie in b2evolution and I want to know how can I embed Nivo Slider in a post? With what code? Exactly how please!!!
Thank You
You cant "embed the slider in a post" currently, you can insert the slider widget into one of your "widget containers" on your blog.
It should be easy to add rendering functionality to embed slider into post/pages, but i have to look into it.
I thought that I can embed it with a shortcode like Wordpress. For example [b2nivo]. So my request is to put nivoslider above the first post in the content area.
Can I do it?
P.S. Is the content are another widget container or not? Because I can not put the slider in the content area from the Widget Menu...
Thanks for your support!!!
spyrou wrote:
I thought that I can embed it with a shortcode like Wordpress. For example [b2nivo]. So my request is to put nivoslider above the first post in the content area.
Can I do it?P.S. Is the content are another widget container or not? Because I can not put the slider in the content area from the Widget Menu...
Thanks for your support!!!
no, currently you can Not use it inside your "content".i could implement "[short_code]" ability.I noted this as a request, may add it in a few days, at around the weekend.
Thank you very much!!!
Just for my knowledge the content area is another widget container or not?
spyrou wrote:
Thank you very much!!!
Just for my knowledge the content area is another widget container or not?
no it's not but you can add a "widget container" before/after your content
How?
See the FAQ: http://forums.b2evolution.net/viewtopic.php?t=14515
[b2]"Widget Containers" = Dynamic Sidebar [wp] = Module Position [joomla]
Needless to say:
[b2] widget = widget [wp] = module [joomla]
Ok. Thanks a lot. I understood. The tutorial that you have linked me is more complicated than a module in Joomla. So to add a "widget container" before/after my content I have to follow the tutorial instructions or it is mote simple?
spyrou wrote:
Ok. Thanks a lot. I understood. The tutorial that you have linked me is more complicated than a module in Joomla. So to add a "widget container" before/after my content I have to follow the tutorial instructions or it is mote simple?
its the same as adding a "module position" in Joomla not module.
Get the code here : http://forums.b2evolution.net/viewtopic.php?p=113301#113301
and paste it where you want it to appear (before content section, header, footer, sidebar, wherever)
Go to your blog settings > widgets
You'll See a container named "Nivo Slider" there. (reload containers if necessary) Insert your widget there.
Thanks Tilki!!!
In which place I must paste the php code that you suggest me?
Hi I've got my slider running now (http://www.chileno.co.uk/blogs/blog1.php), is there a way to only show on homepage. I tried some php before, along the lines of:
$homepage = "/index.main.php";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage==$currentpage)
but couldn't get it to work. Thanks
mojo
mojolazarus wrote:
Hi I've got my slider running now (http://www.chileno.co.uk/blogs/blog1.php), is there a way to only show on homepage. I tried some php before, along the lines of:
$homepage = "/index.main.php";
$currentpage = $_SERVER['REQUEST_URI'];
if($homepage==$currentpage)but couldn't get it to work. Thanks
mojo
if( is_default_page() )
{
//do sth on homepage
}
Thanks for porting this over!
Are all the settings currently working however? Setting a few different slider effects or animations always seem to result in the default options of random and 8/4 working. Other options such as height however seem fine.
daSmirnov wrote:
Thanks for porting this over!
Are all the settings currently working however? Setting a few different slider effects or animations always seem to result in the default options of random and 8/4 working. Other options such as height however seem fine.
You're welcome.Thank you too for finding that huge bug (:
You were right the effects were not taking place, neither were other options.Please redownload the latest version or simply download the one changed plugin file from SVN.
great, thanks for the help, I'll try that.
Can you help me to provide Nivo Slider to the page that I preferred and not to all the pages. Please!!! because I dont understand how can I do it...
spyrou wrote:
Can you help me to provide Nivo Slider to the page that I preferred and not to all the pages. Please!!! because I dont understand how can I do it...
Well that's sth i want for all widgets, but b2 does not support this feature.
You could use hacks like if ($Post->ID = X)
I can not understand what is "sth" also I dont know were "hacks" can be include. I think that a "shortcode" in a post or a page is the better way like wordpress!!! I'd like to use B2 than WP because of all of these "multi's". :)
spyrou wrote:
I can not understand what is "sth" also I dont know were "hacks" can be include. I think that a "shortcode" in a post or a page is the better way like wordpress!!! I'd like to use B2 than WP because of all of these "multi's". :)
Sth stands for "something", by which i mean i would like that feature as well.
I have actually made a "shortcode" (renderer) plugin to add-on it, however there are a few problems with it, i will post it if i can fix the issue
I think I remember a to do list with allow more than 4 slides. Is this possible? That's going to be a fatal flaw for some people I imagine. Cheers
mojolazarus wrote:
I think I remember a to do list with allow more than 4 slides. Is this possible? That's going to be a fatal flaw for some people I imagine. Cheers
That one is pretty easy..The next update will include infinite images, and hopefully a [short_code] to embed it in post/pages
awesome, thanks
Hi there, just wondering how your update is going and specifically if infinite images will be available. We need more than four now on the blog :)
Thanks a lot
Hi,
I realise that you must be busy with work/life but could you possibly give an indication of when/whether the slider will be expanded to incorporate more images? Depending on the eta I can then look into a temp alternative.
Thanks a lot
mojo
Plugin updated.See first post.
Frankly, it was a breeze, if i knew it would be this easy, i would do it earlier, sorry for taking this long.
The jquery (nivo) plugin inside has also been updated, it seems a lot better, responsive, faster, more themes.
mojolazarus wrote:
Hi,
I realise that you must be busy with work/life but could you possibly give an indication of when/whether the slider will be expanded to incorporate more images? Depending on the eta I can then look into a temp alternative.
Thanks a lot
mojo
Oh great, thanks for doing this - glad it wasn't too much of a headache for you. I'll try and implement it :)
mojo
mojolazarus wrote:
Oh great, thanks for doing this - glad it wasn't too much of a headache for you. I'll try and implement it :)
mojo
not at all.. just remove the old plugin and install brand new
Hi, I've installed the slider it looks good but I can't seem to see how to add more than 4 slides. That is, there are still only 4 sections for image name, url and caption in the settings. Am I missing something?
Thanks
mojolazarus wrote:
Hi, I've installed the slider it looks good but I can't seem to see how to add more than 4 slides. That is, there are still only 4 sections for image name, url and caption in the settings. Am I missing something?
Thanks
No you are right... "Manual mode" is buggy.Just set it to automatic for now.. you just wont be able to link the images.
I will fix it shortly
plugin updated.. it should work fine now.
I also made a renderer add-on plugin to insert slider into post/pages, it was ready but all of a sudden it broke, will upload it too when i fix that.
Thanks for this, I can see what you're trying to do and it makes sense. I'm getting an error though which displays in place of where the images should be. Have you any idea why that might be. Thanks a lot:
Notice: Undefined offset: 1 in public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php on line 764
Notice: Undefined offset: 2 public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php on line 764
Notice: Undefined offset: 3 in public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php on line 764
Notice: Undefined offset: 4 in public_html/blogs/plugins/b2nivo_plugin/_b2nivo.plugin.php on line 764
The offending line is this one I think (764):
<a href="'. trim($image_links[$i]).'">
mojolazarus wrote:
The offending line is this one I think (764):
<a href="'. trim($image_links[$i]).'">
Well i cant replicate that offset error, so i dont know why you are getting it..
I removed the trim bit, it's unnecessary as it is for url's, see if that fixes it.
Also titles were not appearing in manual mode, fixed that and added debug information.
ok, that's a shame, thanks anyway. I cannot remove that section of the code as the slider then gives a further offset which is the following:
line 792 echo $manual_c;
in the latest version (1.1.2). I can't remove that because then the slider breaks completely. Maybe it's a conflict with the skin (Mystique).
Okay, it was caused because you either had titles or links empty.Took failsafe measures to prevent that.Please download latest v and you should be fine
mojolazarus wrote:
ok, that's a shame, thanks anyway. I cannot remove that section of the code as the slider then gives a further offset which is the following:
line 792 echo $manual_c;
in the latest version (1.1.2). I can't remove that because then the slider breaks completely. Maybe it's a conflict with the skin (Mystique).
That's great thanks a lot. I'm testing it now but it seems to work like a charm!
I'm using this plugin on a new site, but am having problems with it: there doesn't seem to be a way to add alt text to the images. Is there a way to do this?
Thanks!
Bump!
As it is, this plugin is creating invalid code because there's no way to add alt text to the images. I'd add fields to the plugin myself, but have no idea how to go about adding the resulting info to the jquery files.
Right, alt attr was not defined if titles were empty. add one line after 777
if(!empty($image_titles[$i])) {
$manual_c .= 'alt="'.$image_titles[$i].'" title="' . htmlspecialchars( $image_titles[$i] ).'"';
}
So that it looks like
if(!empty($image_titles[$i])) {
$manual_c .= 'alt="'.$image_titles[$i].'" title="' . htmlspecialchars( $image_titles[$i] ).'"';
}
else { $manual_c .= 'alt="image"'; }
Great, that fixed it. So in order to have different alt texts for each image, I would need to further add fields to the plugin?
PS. Am using the manual mode, not automatic.
You mean captions? I don't have fields for titles, just captions.
On another issue: I find the slider stops working on 404 error pages. See
http://puppetsinmelbourne.com.au/pelican/aboutus.php/g
The odd thing is that it works if I'm logged in, but once logged out the slider doesn't show up (the code is there, it just doesn't display). The slider works on all other pages perfectly.
This bug fix should be added to the css files for the Nivo themes. Any links on the images won't work in IE without the fix.
http://web.archive.org/web/20120909053059/http://support.dev7studios.com/discussions/nivo-slider/1578-links-doesnt-work-only-on-ie9/page/1?to=%2Fdiscussions%2Fnivo-slider%2F1578-links-doesnt-work-only-on-ie9
Re: the problem of the slider not showing on 404 error pages. The plugin needs to be changed so that the jquery file is called before the slider jquery file. See changed code below:
// $slider_theme = $this->Settings->get( 'slider_theme' );
require_js( '#jquery#' );
require_js( $plug_url . 'res/jquery.nivo.slider.pack.js', TRUE );
/* $slider_css = '<style type="text/css">
<!-- ';
if(!empty($slider_id)) $slider_css .= '#'.$slider_id.'';
$slider_css .= '.nivoSlider {
width:'.$slider_width.';
height:'.$slider_height.';
}
-->
</style>';
add_headline( $slider_css );*/
// Removed line, moved to second line of quoted code
require_css( $plugins_url . 'b2nivo_plugin/themes/default/default.css' );
// if ( $slider_theme == 'pascal' )
Really nice plugin, thank you. Did you by any chance finish the shortcode plugin you mentioned? And I got a slight problem when viewing in Internet Explorer, the navigation points are not visible but I'm not sure if this is my fault.
Just wanted to mention some things I changed/added so far, maybe helpful for somebody:
In the p2nivo_plugin.php added
$dot = strrpos($file, '.');
$caption = substr($file, 0, dot - 4);
plus a view lines further down I changed
echo 'title="'.$file.'"';
to
echo 'title="'.$caption.'"';
to remove the file extensions in the captions. Seems to work so far, have to check that again, I was just guessing.
Also I'm using it on a static page so I added
.hidden
{
display: none;
}
to the nivo-slider.css and im calling it with
<div id="nivo_slider" class="hidden">
<script type="text/javascript">
$("#nivo_slider").removeClass("hidden");
</script>
just in case someone disabled java script.
yea it makes sense to hide it first, and show if js is enabled only if your slideshow content is not that important, but accesbility-wise it's not ideal for everyone, i still might need to see what's there even if i dont have js. The plugin needs to be updated that's for sure, but i dont know when.
I've recently upgraded to 5.2.0 and the slider plugin is no longer working. On some pages the first image in the slideshow appears, on other pages no images are appearing at all. On some pages the navigation has stopped appearing, on others it's there but clicking on the buttons doesn't do anything. I'm thinking there must be a javascript conflict somewhere (there are lots of scripts on the site) but I don't know how to debug this. Any help - especially fast help - would be appreciated as this is on a live site for a client.
Thanks!
I have seen that it's also failing in b2evo 5.1.2, maybe due to a jQuery conflict. What I did was to update the Nivo Slider library from version 3.1 ( included in the plugin ) to version 3.2, and it worked again. This is the project's page: https://github.com/gilbitron/Nivo-Slider, so you can download it from there.
If you preffer, use the file attached to this comment and replace the files plugins/b2nivo_plugin/res/jquery.nivo.slider.js
and plugins/b2nivo_plugin/res/jquery.nivo.slider.pack.js
in your site ( make a backup copy of them first ).
Regards!
It's just that packed nivo slider javascript is too old. You can simply replace the jquery.nivo.slider.pack.js file with the latest or grab the updated plugin here:
http://sourceforge.net/projects/evocms-plugins/files/b2nivo_plugin/b2nivo_plugin.zip/download
Tested with 4.x -> 5.2.0
Thanks guys, that did it!
Hi, this is great, just what I've been looking for. Unfortunately I can't quite get it to run smoothly with the skin I'm using, which is mystique. The transition stalls heavily and I can't seem to change the transition from the default. Any ideas what's causing this conflict?
Thanks a lot