![]() |
United-Forum Nivo Slider Widget
1 Attachment(s)
Based on the Nivo Slider - all credit for slider awesomeness goes to them. ;)
vB4 implementation goes to me. :D What it is: A slider for cms articles, it gets the articles via database, uses (if possible) the previewimage there and resizes it to slider size *update 1.1.0 cropping function included. Livedemo on a Big Board (>2.000.000 posts) the nivo slider on our site is customized to fit our heavily customized cms. Default look of this addon is shown in the picture below https://vborg.vbsupport.ru/attachmen...hmentid=131394 facts about the nivo slider Quote:
Custom settings: Support:
Slider not working. No idea why?
The widget here is completely free. No charge, no branding. But, we do not mind donations either. If you want to give us something. Since we are advertising free and fan based we are happy about every small donation. :) ( On Forumhome bottom right paypal button: http://www.united-forum.de/forum.php ) That's all Hope it works for you. :) Regards Mooff |
Changelog
1.1.0 (8.11.2011)
1.0.0 (4.08.2011)
0.9.9 (28.07.2011)
0.9.2 (23.07.2011)
0.9.1 (21.07.2011)
FAQ Q: I want a static version. Can you give me some code? A: Code can be found here: https://vborg.vbsupport.ru/showthrea...49#post2222449 Q: I want the slider on FORUMHOME A: Code that should work can be found here (untested): https://vborg.vbsupport.ru/showthrea...07#post2222907 Q: I see only a white Box - no images A: Probably a jquery issue: https://vborg.vbsupport.ru/showthrea...63#post2224063 Q: Captions appear and the slider works, but i can't see images A: - See Answer above, it might be a jquery problem. - Do the images show up in the folder you specified? - Does the fallback image show up if you set the switch to yes? Q: Slider isn't working (f.e. I can see text, but no images and no slider functunality) A: Make sure the slider_img_filepath variable is set correctly $slider_img_filepath = 'external/unitedforum/slider/'; If you open such a link in your browser: http://www.mysite.com/$slider_img_filepath/nivo-slider.css you should see the css file! Q: I want articles from exclusive cms categories or sections A: Modified database query can be found here: https://vborg.vbsupport.ru/showpost....&postcount=144 Q: Attachments aren't working for me A: If your guests do not have the rights to see attachments - neither does the slider. Q: I want to show specific articles and nothing else A: Code can be found here: https://vborg.vbsupport.ru/showpost....8&postcount=91 Q: I want to change some nivo slider settings (effects, timings..) A: An example for timings can be found here: https://vborg.vbsupport.ru/showpost....&postcount=132 For other settings please check the nivo slider homepage: http://nivo.dev7studios.com/#usage Q: I want the slider without widget title - how to do that? A: Explanation can be found here: https://vborg.vbsupport.ru/showthrea...48#post2233348 A2: No Background at all: Check this post (including pictures) by The Rocketeer https://vborg.vbsupport.ru/showpost....&postcount=205 Q: How to order the articles shown by date descending - without value sorting function? A: Take a look at this post: https://vborg.vbsupport.ru/showpost....&postcount=120 Q: I updated one of my articles but the slider shows the old picture? A: Thats the new cache function. Either delete all slide images in the slider folder or run the slider one time in debug mode. Q: Can i have different pictures in the slider and as a preview? A: That's now possible via the cache system. Just upload the picture you want to have in the slider into your slider folder, nameing convention is: slide_articleID.jpg. Be aware that those images will be overwritten in debug mode. Q: I have more and more slider pictures in my slider folder? A: Again cache system. Each article which was in the slider one time creates an unique picture. The slider does not delete those pictures, in order to be able to use the cache functionality. Please delete them manually from time to time if you do not want them there. [b]Q: Slider is not working and Firebug is giving me an "#slider is empty" error? A: Solution can be found here: https://vborg.vbsupport.ru/showpost....&postcount=331 Q: My question wasn't answered in this FAQ :( A: Please set the slider into debug mode via $debug_modus = true; You then should see debug messages, which might point you in the right direction. If that doesn't help. Post in the thread and please provide above debug and very detailed information what doesn't work and what you want. |
I have the original slider installed on my website and was thinking to myself "if only someone could integrate this into my forums" and here it is..
Well done, I am a little confused about the instructions at the moment, but if that could be made more clear I think I could 5 Starr this plugin! |
Great job, I have yet to actually test it, but so far it looks good. Thank you.
One question we have to manually add the images? And if we only want certain effects what should we do? |
I updated the installation information and custom settings on top a bit.
Please give feedback if i'm unclear in the description, so i can change it. The slider does use the pictures which vb4 stores in the databasefield "previewpicture" and resizes them. You do not need to manually add images except 1. You need a fallback image if your article does not have a previewimage (or something goes wrong during resizing), then the fallback is shown. If you want certain effects you have to edit the nivo slider options: http://nivo.dev7studios.com/ Usage tab - options, there is an explanation given. |
Does this perfect script works with vb advanced ?
|
I do not own vb_advanced. Therefore i have no idea.
Since the db_query is build upon the vb4-cms article database/table structure i have to go with "probably not". Maybe an experienced coder who does have vb advanced can clearify on that one. |
Awesome :).
I have a couple questions... 1 - Is it possible to have the posts pulled from a forum instead of CMS (seems like it would need some rewrite)? 2 - Is it possible to have, say, 5 articles that are static and nothing else? I'd like to show users 5 "must read" pages instead of shuffling through new ones. 3 - Is this certified 4.1.3 because you got it running on this VB version? Is it not working with 4.1.4? Edit: http://nivo.dev7studios.com/#usage shows how to customize the slides manually. |
If you want static articles then you don't need 90% of the code:
Without testing! - Include into a static html widget: (height setting on div style="heigth needs your number in it) Code:
<link rel="stylesheet" href="/nivo-slider.css" type="text/css" media="screen" /> That would show 1 static article - you have to insert the link to your article, the previewimage and the description. (additional examples are in the demo folder, when you download the nivo slider from their homepage) Version is 4.1.3 since we will jump 4.1.4 and install 4.1.5 next. I'm pretty sure it will work with 4.1.4 (the static version will work like 100% with 4.1.4) - but i can't verify it - so i won't say it does. Regards |
Very nice work. Thanks a lot :)
|
I'm having trouble getting the slider to work (static version posted above). Here's the code I used;
Code:
<link rel="stylesheet" href="/nivo/nivo-slider.css" type="text/css" media="screen" /> Here's the test page where I've tried to load the widget: http://consortium.stormspire.net/con...The-Consortium |
Img tag is not closed.
Code:
<link rel="stylesheet" href="/nivo/nivo-slider.css" type="text/css" media="screen" /> Ah i see, was my blunder in the code above - sorry Edit: If you have jquery 1.4 or higher allready running on your site you can delete that line: <script type="text/javascript" src="/clientscript/jquery/jquery-1.4.4.min.js"></script> |
Quote:
Next step is to add additional slides. I tried duplicating some code but failed miserably. Also, it seems that the arrows are somewhat pixelated. Do the "overlay" graphics look normal to you? Link again for convenience: http://consortium.stormspire.net/con...The-Consortium Edit: Hang tight, I'll first go through the nivo site and see if I can fix my own problem. |
Quote:
ah well, since i'm typing anyway :p Code:
<div class="slider-wrapper theme-uf"> |
For anyone looking to add slides to static pages, add the following bold code;
Code:
<link rel="stylesheet" href="/nivo/nivo-slider.css" type="text/css" media="screen" /> |
Im only getting the date, but no slider. Im using the code in the 1st post.
|
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"; |
This would be awesome if I could get it to work. I get the title and text from the article but no images. I've followed your instructions precisely and have tried different sized images and still only the title and text shows. Any ideas?
|
Some ideas:
|
GD already installed. I've done all the other changes you have suggested and still the same. Title and text - no image. No error messages or warnings.
|
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 Code:
//Randomize Array |
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?
|
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. |
@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:
Then create a template named nivo_slider and insert Code:
{vb:raw output} @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. |
Quote:
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 Code:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /packages/vbcms/widget/execphp.php(191) : eval()'d code on line 14 |
thank you, work fine, installed in two minutes, great work!;)
|
@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? |
PM sent
|
Quote:
|
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... |
0.9.1 (21.07.2011)
@Morpheus NS Your issue could be the slashes. Meaning the path ending up at /http/slider//picture.jpg which could break it. Please try 0.9.1. If that isn't the problem check whether the pictures are saved in the folder you chose and if you can look them up manually in your browser. |
The new version work much better for me. No more errors and I now see titles and text. No images yet though. If I outcomment the 1st and last line, then I get these errors:
Code:
Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 110 |
We are using the fopen() function to check whether the file does still exist on the external server before we start our image manipulation.
Seems like url file access is blocked on your server. I don't know whether this is done via your provider or if you can switch it on in your php.ini http://www.php.net/manual/en/filesys...figuration.php That would be your first option. Second option ist to replace this code: Code:
$filehandle = fopen($article['previewimage'], 'r'); Code:
$can_open_file = false; So the third option would be: Replace Code:
$filehandle = fopen($article['previewimage'], 'r'); Code:
If that doesn't work i'm out of options. P.S.: On my testsite i have the curl option running right now. |
Yes, fopen is blocked on purpose due to the major security risks involved. Curl is active though, so that should work. But for some reason it doesn't. Would you mind checking it out?
|
Please check if the folder you specified here:
$slider_img_filepath = 'external/unitedforum/slider/'; is writeable and whether the addon does save slides in there. |
Its 777 writable, but the addon does not save anything.
|
Oh geez i'm so stupid. It doesn't work with attachments right now - i'll fix that bug and post a new version later today.
|
Thanks!
|
0.9.2 (23.07.2011)
There you go - code in first post updated. That should do the trick. =) |
Add-on works insofar as it resizes the images and writes them into the folder. It also displays the little background image. But it won't display anything else.
Any ideas? When I comment out the first and last lines, same thing. No errors. Thanks |
All times are GMT. The time now is 05:15 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|