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)

The Rocketeer 02-19-2012 12:59 AM

So what is this mod Unsupported now? :(

Mooff 02-20-2012 01:06 AM

@UK CHI3F
I need the debug the slider puts out in debug mode. See FAQ.

@The Rocketeer
You are using an old version, the widget code has changed and produces more debug. Try the new one that will produce nicer error messages so i can see what is wrong.

As for support, i currently do not have that much time, but i think the FAQ should cover almost everything. ;)

iyama 02-22-2012 10:44 AM

I upload the pack again and set the correct path.
I see the text buth no images.
Only the uf_fallback_slider.png is showing.

Mooff 02-22-2012 06:32 PM

And i still need the debug. See FAQ in post 2.

Zervesa 02-25-2012 09:52 AM

Same Problem here:

HTML Code:

DEBUG MODE is ON!
slider_img_filepath: http://www.xxx.de/forum/slider/
width: 600 height: 350
Strech or Crop? 1
show_articles_without_image: bool(false)
fallback_img: http://www.xxx.de/forum/slider/uf_fallback_slider.png
#img: 10
description_length: 95
directory /var/www/vhosts/xxx.de/httpdocs/forum

Warnung: imagejpeg() [function.imagejpeg]: Unable to open '[path]/http://www.xxx.de/forum/slider/slide_107.jpg' for writing: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code (Zeile 200)
Error occurred: imagejpeg failed. http://www.xxx.de/forum/attachment.php?attachmentid=312&cid=24
directory: /var/www/vhosts/xxx.de/httpdocs/forum/http://www.xxx.de/forum/slider/slide_107.jpg#articles - featured and databasepull int(1) int(1)
Warnung: Cannot modify header information - headers already sent by (output started at [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code:39) in [path]/includes/functions.php (Zeile 5302)


Mooff 02-25-2012 01:21 PM

silder_img_filepath should not be a http location. We need that to write the images to.

In your case
$slider_img_filepath = 'slider/';
should be the right choice.

Zervesa 02-25-2012 01:43 PM

Thank you!

virtualcash 03-01-2012 06:56 AM

Thanks for the great plugin, Mooff. After upgrading vb to 4.1.11 I'm getting the following debug output for http://e-mpire.com/ :

Code:

DEBUG MODE is ON!
slider_img_filepath: slider/
width: 780 height: 400
Strech or Crop?
show_articles_without_image: bool(false)
fallback_img: slider/uf_fallback_slider.png
#img: 10
description_length: 95
directory /home/e-mpire/public_html

Warning: getimagesize(attachment.php?attachmentid=14092&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14092&cid=18

Warning: getimagesize(attachment.php?attachmentid=14083&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14083&cid=18

Warning: getimagesize(attachment.php?attachmentid=14096&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14096&cid=18

Warning: getimagesize(attachment.php?attachmentid=14091&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14091&cid=18

Warning: getimagesize(attachment.php?attachmentid=14095&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14095&cid=18

Warning: getimagesize(attachment.php?attachmentid=14084&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14084&cid=18

Warning: getimagesize(attachment.php?attachmentid=14090&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14090&cid=18

Warning: getimagesize(attachment.php?attachmentid=14088&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14088&cid=18

Warning: getimagesize(attachment.php?attachmentid=14081&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14081&cid=18

Warning: getimagesize(attachment.php?attachmentid=14082&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14082&cid=18
#articles - featured and databasepull int(10) int(20)


Griphus 03-03-2012 01:48 PM

Quote:

Originally Posted by virtualcash (Post 2304963)
Thanks for the great plugin, Mooff. After upgrading vb to 4.1.11 I'm getting the following debug output for http://e-mpire.com/ :

Code:

DEBUG MODE is ON!
slider_img_filepath: slider/
width: 780 height: 400
Strech or Crop?
show_articles_without_image: bool(false)
fallback_img: slider/uf_fallback_slider.png
#img: 10
description_length: 95
directory /home/e-mpire/public_html

Warning: getimagesize(attachment.php?attachmentid=14092&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14092&cid=18

Warning: getimagesize(attachment.php?attachmentid=14083&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14083&cid=18

Warning: getimagesize(attachment.php?attachmentid=14096&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14096&cid=18

Warning: getimagesize(attachment.php?attachmentid=14091&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14091&cid=18

Warning: getimagesize(attachment.php?attachmentid=14095&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14095&cid=18

Warning: getimagesize(attachment.php?attachmentid=14084&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14084&cid=18

Warning: getimagesize(attachment.php?attachmentid=14090&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14090&cid=18

Warning: getimagesize(attachment.php?attachmentid=14088&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14088&cid=18

Warning: getimagesize(attachment.php?attachmentid=14081&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14081&cid=18

Warning: getimagesize(attachment.php?attachmentid=14082&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.attachment.php?attachmentid=14082&cid=18
#articles - featured and databasepull int(10) int(20)


I am also getting this error at www.tribegaming.com since updating Vbulletin this morning:

Code:

DEBUG MODE is ON!
slider_img_filepath: /slideshow/
width: 650 height: 250
Strech or Crop?
show_articles_without_image: bool(false)
fallback_img: /slideshow/uf_fallback_slider.png
#img: 10
description_length: 95
directory /home/content/08/8830708/html

Warning: getimagesize(attachment.php?attachmentid=3628&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3628&cid=18

Warning: getimagesize(attachment.php?attachmentid=3541&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3541&cid=18

Warning: getimagesize(attachment.php?attachmentid=3545&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3545&cid=18

Warning: getimagesize(attachment.php?attachmentid=3527&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3527&cid=18

Warning: getimagesize(attachment.php?attachmentid=3509&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3509&cid=18

Warning: getimagesize(attachment.php?attachmentid=3502&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3502&cid=18

Warning: getimagesize(attachment.php?attachmentid=3497&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3497&cid=18

Warning: getimagesize(attachment.php?attachmentid=3474&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3474&cid=18

Warning: getimagesize(attachment.php?attachmentid=3490&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3490&cid=18

Warning: getimagesize(attachment.php?attachmentid=3462&cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 133
Error occurred: picture is not readable.attachment.php?attachmentid=3462&cid=18
#articles - featured and databasepull int(10) int(20)


Mooff 03-03-2012 11:59 PM

At first glance it seems like they change how the picture url for attachments are saved in the database (we are not on 4.1.11 yet, so i can't check).

untested:

change
Code:

                                        if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                {

to
Code:

                                        if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                if(substr($article['previewimage'],0,10) == 'attachment')
                                                {
                                                      $article['previewimage'] = 'http://www.your_site/' . $article['previewimage'];
                                                };
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                {

with 'your_site' beeing your site. ;)

Griphus 03-04-2012 02:53 AM

Quote:

Originally Posted by Mooff (Post 2305905)
At first glance it seems like they change how the picture url for attachments are saved in the database (we are not on 4.1.11 yet, so i can't check).

untested:

change
Code:

                                        if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                {

to
Code:

                                        if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                if(substr($article['previewimage'],0,10) == 'attachment')
                                                {
                                                      $article['previewimage'] = 'http://www.your_site/' . $article['previewimage'];
                                                };
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                {

with 'your_site' beeing your site. ;)


This worked for me. You are my hero.

sweetpotato 03-04-2012 09:16 AM

Quote:

Originally Posted by Mooff (Post 2305905)
At first glance it seems like they change how the picture url for attachments are saved in the database (we are not on 4.1.11 yet, so i can't check).

untested:

change
Code:

                                        if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                {

to
Code:

                                        if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                if(substr($article['previewimage'],0,10) == 'attachment')
                                                {
                                                      $article['previewimage'] = 'http://www.your_site/' . $article['previewimage'];
                                                };
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                {

with 'your_site' beeing your site. ;)

Thank for the nice code. It works for me with VB 4.1.11

sweetpotato 03-04-2012 02:32 PM

For my vb 4.1.11 I still face this database error always:
Quote:

Database error in vBulletin 4.1.11:

Invalid SQL:

REPLACE INTO cache
SET cacheid = 'widget_53.9ac7ba1932b4e2e872730e6f5459772e',
expires = 1330870172,
created = 1330869872,
locktime = 0,
data = "\n <link rel=\"stylesheet\" href=\"cms_slider/nivo-slider.css\" type=\"text/css\" media=\"screen\" />\n <link rel=\"stylesheet\" href=\"cms_slider/nivo-slider_uf_theme.css\" type=\"text/css\" media=\"screen\" />\n <div style=\"height:250px;\">\n <div id=\"wrapper\">\n <div class=\"slider-wrapper theme-uf\">\n <div class=\"ribbon\"></div>\n <div id=\"slider\" class=\"nivoSlider\"><a href=\"/content.php?r=246-

ferruzo 03-04-2012 04:52 PM

It just works for cms?

Zervesa 03-05-2012 04:10 PM

Gives a way, that the Slider automatically resize a picture in an artikel to show in the slide?

i mean some pictures in articels are bigger then the slider size. and the slider dont show this pictures and use so, the fallback image.

w3rk3d 03-05-2012 05:11 PM

Quote:

Originally Posted by Mooff (Post 2305905)
At first glance it seems like they change how the picture url for attachments are saved in the database (we are not on 4.1.11 yet, so i can't check).

untested:

change
Code:

                    if(is_resource($sprite) AND $article['previewimage'] )
                    {                                 
                        $imageinfo = getimagesize($article['previewimage']);
                        if(is_array($imageinfo))
                        {

to
Code:

                    if(is_resource($sprite) AND $article['previewimage'] )
                    {                                 
                                                if(substr($article['previewimage'],0,10) == 'attachment')
                                                {
                                                      $article['previewimage'] = 'http://www.your_site/' . $article['previewimage'];
                                                };
                        $imageinfo = getimagesize($article['previewimage']);
                        if(is_array($imageinfo))
                        {

with 'your_site' beeing your site. ;)

I can confirm this worked for me on a 4.1.11 installation. Thanks!

romaszek 03-08-2012 07:54 AM

Mooff, I Made all, then it {he, she} does not work for me - vB 4.1.11

HTML Code:

DEBUG MODE is ON!
slider_img_filepath: external/unitedforum/slider/
width: 470 height: 272
Strech or Crop?
show_articles_without_image: bool(false)
fallback_img: external/unitedforum/slider/uf_fallback_slider.png
#img: 5
description_length: 95
directory /home/utwory/public_html/r

Warning: getimagesize() [function.getimagesize]: php_network_getaddresses: getaddrinfo failed: Name or service not known in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137

Warning: getimagesize(http://www.your_site/attachment.php?attachmentid=34&amp;cid=24) [function.getimagesize]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.http://www.your_site/attachment.php?attachmentid=34&cid=24


romaszek 03-09-2012 07:14 PM

Sorry,
it already works :)

Thanks

clubvr4 03-19-2012 12:37 PM

Quote:

Originally Posted by Mooff (Post 2232204)
I received a question via private message about slider timings. Since that might interest other site owners aswell.

How do I slow down the image timings, at the moment its a bit fast?

Answer:
That is a setting for the nivo slider: http://nivo.dev7studios.com/#usage
There you can see what you can change. I'll give an example for the timings.

Search:
Code:

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

Replace with:
Code:

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

This changes the pause Time between slides from 3 seconds to 6 seconds.


@croft
please go through the faq and post the debug you get (last question) if the other questions do not help.
It does look like a combination of a jquery (either to many jquery files or old jquery version or no jquery at all) issue and some problems with saving the resized image to file. Debug will help with the last one. If you can't find the jquery problem a link to the site where the slider is implemented would help.

Cheers

It took me a little while to find all the options, so thought i'd share.

effect: 'random', // Specify sets like: 'fold,fade,sliceDown'
slices: 15, // For slice animations
boxCols: 8, // For box animations
boxRows: 4, // For box animations
animSpeed: 500, // Slide transition speed
pauseTime: 3000, // How long each slide will show
startSlide: 0, // Set starting Slide (0 index)
directionNav: true, // Next & Prev navigation
directionNavHide: true, // Only show on hover
controlNav: true, // 1,2,3... navigation
controlNavThumbs: false, // Use thumbnails for Control Nav
controlNavThumbsFromRel: false, // Use image rel for thumbs
controlNavThumbsSearch: '.jpg', // Replace this with...
controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
keyboardNav: true, // Use left & right arrows
pauseOnHover: true, // Stop animation while hovering
manualAdvance: false, // Force manual transitions
captionOpacity: 0.8, // Universal caption opacity
prevText: 'Prev', // Prev directionNav text
nextText: 'Next', // Next directionNav text
randomStart: false, // Start on a random slide
beforeChange: function(){}, // Triggers before a slide transition
afterChange: function(){}, // Triggers after a slide transition
slideshowEnd: function(){}, // Triggers after all slides have been shown
lastSlide: function(){}, // Triggers when last slide is shown
afterLoad: function(){} // Triggers when slider has loaded

initiald 03-28-2012 07:42 AM

Can anyone confirm this work with Vbulletin 4.1.11?

kenp 03-28-2012 01:44 PM

Yes it does

HellRZR 03-28-2012 09:31 PM

Good day,

I have a strange problem that reading all the post and the FAQ I couldn't find n answer. I couldn't get the images to display, my articles where using attachments, I changed the image from attachment to a fixed image via an IMG tag and the image finally showed up. But not, when I select the READ MORE, it points to the wrong link?

The article resides at http://www.mywebsite.com/forums//con...hp?articlename
however the read more link points to :
www.mywebsite.com/content.php?articlename?

Also I would want to change "value/relevance function" to pick up the last 10 articles posted regardless of comments.

Great mod and thank-you for all the support you have been providing.

initiald 03-30-2012 08:15 AM

Is there anyway to make it auto resize to fit when I shrink the browser? Thanks!

Noli 04-05-2012 01:57 PM

Hi,

i get this error in the debug info: Warnung: getimagesize(attachment.php?attachmentid=5073&amp; cid=18) [function.getimagesize]: failed to open stream: No such file or directory in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code (Zeile 133)
Error occurred: picture is not readable.attachment.php?attachmentid=5073&cid=18

if i try to open the attatchment here monkeydesk.at/attachment.php?attachmentid=5073&cid=18 the link gets redirected by vbseo. i think thats the problem. do you have a idea how i can fix this? thx :)

AaronMiller 04-06-2012 03:05 PM

First, I would like to say thank you for such a fantastic mod.

Second, I was wondering if it is possible to select a specific article (a welcome article) to display first in the rotation and then allow the rest of the articles to be pulled dynamically?

I looked at the FAQs but I didn't see anything quite like this. Thank you for your assistance.

basilrath 04-06-2012 03:12 PM

Just worth mentioning the codeline
PHP Code:
$article_neu['picture'] = '<a href="/content.php?r=' . $article['nodeid'] . '-' . $article['url'] . '"><img src="'.$article['previewimage'].'" alt="" title="#htmlcaption'. $article['nodeid'] . '" /></a>';
youl probably have to drop the r= out for direct links to be achieved correctly

avitor 04-09-2012 03:43 PM

installed all as the guide and i can't make the images to show up
just the image not show
any help to fix this please ?
this steps i dan
1 downloaded and upload the folders and files to the defoult direction as your guide in top of this thread
created widget php direct ->copy and paste the widget cod >edited the bsckground image direction(the background image shows fine.)
my site can find here
www.horadot.co.za

i see in this thread few people have same problem like my one.and the stop to ask after time that the problem not be resolved.
thanks loot for this mod what i m sure that is works fine.just need to know litle more about php
or beter den me
maybe i can ask for professional to help me .i can pay
thanks

Reycer 04-09-2012 04:57 PM

The only thing I can get is the fallback image. I have set the folder to 777 read/write, but nothing no matter what I do I get no image from the articles.

Here's my Debug Message:
Code:

DEBUG MODE is ON!
slider_img_filepath: slider/
width: 950 height: 250
Strech or Crop?
show_articles_without_image: bool(false)
fallback_img: slider/uf_fallback_slider.png
#img: 10
description_length: 95
directory /home/content/87/9173587/html

Warning: getimagesize(http://www.xxxx.com/sliderattachment.php?attachmentid=45&amp;cid=24) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.http://www.xxxx.com/sliderattachment.php?attachmentid=45&cid=24

Warning: getimagesize(http://www.xxxx.com/sliderattachment.php?attachmentid=44&amp;cid=24) [function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 137
Error occurred: picture is not readable.http://www.xxxx.com/sliderattachment.php?attachmentid=44&cid=24
#articles - featured and databasepull int(2) int(2)


tintin74 04-10-2012 07:30 AM

Try with this code:

Code:


//nivo slider - uf - vb.org version
//set these values as you need them:

//your slider folder - has to be read and writeable
//folder where all slider files are saved
$slider_img_filepath = 'external/unitedforum/slider/'; 

//picture width and height !same as in the CSS FILE!
$maxwidth = 650;                                 
$maxheight = 250;   

//do you want images without previewimage to be shown? slider is using the fallback then
$show_articles_without_image = false;         

//picture shown if your articles has no previewpicture
$fallback_img = $slider_img_filepath . 'uf_fallback_slider.png'; 

//hardcoded maximum is 20 - if you want more just ask
$number_of_articles_shown = 10;                               
           
//lengh in characters of the article descriptions
$description_length = 95;

//stretch picture or crop them? false = strechting (default) true = cropping (beta)
$crop = false;


//Debug Messages
if($debug_modus)
{
        echo "<span style='color:red;'>DEBUG MODE is ON! </span><br />";
        echo "slider_img_filepath: $slider_img_filepath <br />";
        echo "width: $maxwidth  height: $maxheight <br />";
        echo "Strech or Crop? $crop <br />";
        echo "show_articles_without_image: ";
        var_dump($show_articles_without_image);
        echo " <br />";
        echo "fallback_img: $fallback_img <br />";
        echo "#img: $number_of_articles_shown <br />";
        echo "description_length: $description_length <br />";
        echo 'directory ' . DIR . '<br />';

}

$article_type = vb_Types::instance()->getContentTypeID("vBCms_Article");
$time = TIMENOW;
 
if(!extension_loaded('gd'))
{
        echo '<span style="color:red">Error occurred:</span> Your System does not support the GD-Libary. Please install the GD-Libary.<br />';
}
     
        $article_get = vB::$db->query_read('
        SELECT
            article.pagetext,
            article.previewimage,
            node.url,
            node.publishdate,
            node.parentnode,
            parentnode.url AS parenturl,
            thread.replycount,
            info.title,
            node.nodeid,           
            GROUP_CONCAT( category.category )
        FROM
            '.TABLE_PREFIX.'cms_article AS article INNER JOIN
            '.TABLE_PREFIX.'cms_node AS node
                ON (node.contentid = article.contentid AND node.contenttypeid = ' . vb::$db->sql_prepare($article_type) .') INNER JOIN
            '.TABLE_PREFIX.'cms_nodeinfo AS info
                ON info.nodeid = node.nodeid INNER JOIN
            '.TABLE_PREFIX.'cms_node AS parentnode
                ON parentnode.nodeid = node.parentnode LEFT JOIN
            '.TABLE_PREFIX.'thread AS thread ON thread.threadid = info.associatedthreadid LEFT JOIN
            '.TABLE_PREFIX.'cms_nodecategory AS nodecategory ON nodecategory.nodeid = node.nodeid LEFT JOIN
            '.TABLE_PREFIX.'cms_category AS category ON nodecategory.categoryid = category.categoryid
        WHERE
            node.setpublish = 1 AND
            node.publishdate > '. vb::$db->sql_prepare($time) .' -34560000 AND
                        node.publishdate < '. vb::$db->sql_prepare($time) .'
        GROUP BY node.nodeid
        ORDER BY node.publishdate
        DESC LIMIT 20');
               
    $database_articles = array();
   
    /* my version of sorting the articles via relevance - i'll keep it in case someone is interested*/
    while($article = vB::$db->fetch_array($article_get))
    {
        $article['value'] = ( 5 - ($time - $article['publishdate'] ) / 86400 ) * ( 5 - ($time - $article['publishdate'] ) / 86400 ) * ( 5 - ($time - $article['publishdate'] ) / 86400 ) + (10 * $article['replycount']);
        $database_articles[] = $article;       
    }
   
    foreach($database_articles as $c => $key)
    {
        $sort_value[] = $key['value'];
    }
   
    array_multisort($sort_value, SORT_DESC, $database_articles);   
   
    //
    $i = 0;
    $section_array = array();
    $featured_articles = array();
       
    foreach($database_articles AS $article)
    {

        $section_array[$article['parentnode']]++;

        $categories = explode(',' , $article['GROUP_CONCAT( category.category )']);
   
        if($show_articles_without_image == true OR $article['previewimage'])
        {
            if($section_array[$article['parentnode']] < 50 AND $i < $number_of_articles_shown)
            {
           
                //rebuild image to the height and width we want in the slider
                //called sprite since i got the code from our sprite addon :P
                $sprite = imagecreatetruecolor($maxwidth, $maxheight);
                if(is_resource($sprite) AND $article['previewimage'] )
                                        {                                                 
                                                if(substr($article['previewimage'],0,10) == 'attachment')
                                                {
                                                      $article['previewimage'] = 'http://www.ilgiramondo.net/forum/' . $article['previewimage'];
                                                };
                                                $imageinfo = getimagesize($article['previewimage']);
                                                if(is_array($imageinfo))
                                                { 
                        $image = null;
                        switch($imageinfo[2])
                        {
                            case IMAGETYPE_PNG:
                            $image = imagecreatefrompng($article['previewimage']);
                            break;
                            case IMAGETYPE_GIF:
                            $image = imagecreatefromgif($article['previewimage']);
                            break;
                            case IMAGETYPE_JPEG:
                            $image = imagecreatefromjpeg($article['previewimage']);
                            break;
                            default:
                            echo '<span style="color:red">Error occurred:</span> Unknown image format. ' . $article['previewimage']. '<br />';
                            break;                       
                        }
                       
                        if(!is_resource($image))
                        {
                            //resiziing did not work - we are using the fallback image.
                            $article['previewimage'] = $fallback_img;
                            echo '<span style="color:red">Error occurred:</span> imagecreation failed. ' . $article['previewimage']. '<br />';
                        }
                        else
                        {
                            $img_width = $imageinfo[0];
                            $img_height = $imageinfo[1];
                           
                            imagecopyresampled($sprite, $image, 0, 0, 0, 0, $maxwidth, $maxheight, $img_width, $img_height );
                            imagedestroy($image);

                            $img_filepath = $slider_img_filepath . 'slide_' . $i . '.jpg';
                            $success = imagejpeg($sprite, DIR  . ($img_filepath[0] != DIRECTORY_SEPARATOR ?  DIRECTORY_SEPARATOR : '') . $img_filepath);
                            imagedestroy($sprite);
                                                        if($success)
                                                        {
                                                                $article['previewimage'] = $img_filepath;
                                                        }
                                                        else
                                                        {
                                                                $img_filepath = DIR  . ($img_filepath[0] != DIRECTORY_SEPARATOR ?  DIRECTORY_SEPARATOR : '') . $img_filepath;
                                                                echo '<span style="color:red">Error occurred:</span> imagejpeg failed. ' . $article['previewimage']. '<br />
                                                                directory: '. $img_filepath ;
                                                               
                                                                $article['previewimage'] = $fallback_img;
                                                        }
                        }
                       
                    }
                    else
                    {
                        //resiziing did not work - we are using the fallback image.
                        $article['previewimage'] = $fallback_img;
                        echo '<span style="color:red">Error occurred:</span> picture is not readable.' . $article['previewimage']. '<br /> ';
                    }                 
                }
                else
                {
                    //resiziing did not work - we are using the fallback image.
                    $article['previewimage'] = $fallback_img;
                    echo '<span style="color:red">Warning:</span> article has no previewimage or sprite is no ressource. ' . $article['previewimage']. '<br />';
                }
       

                /*remove everything from the previewtext - html and bb. I do not want bold or colored text there. Cut to a decent length.*/       
                $article['pagetext'] = strip_bbcode($article['pagetext'], true, true, false, true, false);

                $article['previewtext'] = strip_tags($article['pagetext'], '<a>');
                   
                $len = $description_length;
                if ( strlen($article['previewtext']) > $len )
                {                   
                    $article['previewtext'] = substr( $article['previewtext'] , 0 , strrpos( substr( $article['previewtext'], 0, $len), ' ' ));
                } 

                $i++;
                //Build Array
                $article_neu = array();
                $article_neu['description'] = '<h2 style="font-weight:bold; font-size: 14px">'. $article['title'].'</h2><span>'. $article['previewtext'] .'</span> <a rel="nofollow" href="/forum/content.php?r=' . $article['nodeid'] . '-' . $article['url'] . '">Leggi Tutto...</a>';
                $article_neu['htmlcaptionname'] = 'htmlcaption' . $i ;
                $article_neu['picture'] = '<a rel="nofollow" href="/forum/content.php?r=' . $article['nodeid'] . '-' . $article['url'] . '"><img src="'.$article['previewimage'].'" alt="" title="#htmlcaption'. $i . '" /></a>';
               
                $featured_articles[] = $article_neu;
            }
        }
    }
   
    //Randomize Array
    //shuffle($featured_articles);

        //Debug Messages
        if($debug_modus)
        {
                echo '#articles - featured and databasepull ';
                var_dump(count($featured_articles));
                var_dump(count($database_articles));
        }

   
$output_bits = '
    <link rel="stylesheet" href="' .$slider_img_filepath. 'slider.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="' .$slider_img_filepath. 'slider_uf_theme.css" type="text/css" media="screen" />
    <div style="height:' . $maxheight . 'px;">
    <div id="wrapper">
        <div class="slider-wrapper theme-uf">
            <div class="ribbon"></div>
            <div id="slider" class="nivoSlider">';
           
                foreach($featured_articles AS $article)
                {
                    $output_bits .= $article['picture'];
                }
            $output_bits .= '
            </div>';
           
            foreach($featured_articles AS $article)
            {
                $output_bits .= '<div id="' . $article['htmlcaptionname'] . '" class="nivo-html-caption">' . $article['description'] .'</div>';
            }
           
            $output_bits .= '       
        </div>

    </div>
    <script type="text/javascript" src="' .$slider_img_filepath. 'jquery-1.6.1.min.js"></script>
   
    <script type="text/javascript" src="' .$slider_img_filepath. 'jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $("#slider").nivoSlider();
    });
    </script>
    </div>
    ';
        $output = $output_bits;
 
if($debug_modus === false)
{
        ob_end_clean();       
}


Reycer 04-10-2012 04:14 PM

Figured out that it is my hosting company. I had to rewrite my php.ini file and make a php5.ini. Allowing URL_fopen. So far still hasn't worked though. I'm about to give up on this hosting company and go with another. argh.

avitor 04-13-2012 08:38 AM

Quote:

Figured out that it is my hosting company. I had to rewrite my php.ini file and make a php5.ini. Allowing URL_fopen. So far still hasn't worked though. I'm about to give up on this hosting company and go with another. argh.
how you make this ini change ? can you give me more details please ?
possible i have same problem

i tray to install this mod on my forum cms and can't find how to show the images.
i ask for help from decoder and is not responds no p.m not mail an visit in site registered and ask for help
no respond
then i ask for PAY work
offer money for install this mod
few cool professional vbulletin supporters and programmers take the job bat after two weeks of try to make this mod to show images
in the end some of this programers tel me that the is possible the problem is not in configuration.the problem is in the php files conf
i think i give up from try install it my self
this mod not works with vb 4.1.11 . 12
or anyone think different ?
really need this mod
thanks

Reycer 04-15-2012 10:35 PM

I got it working. Had to add a file called php5.ini and add

Code:

allow_url_fopen on

basilrath 04-23-2012 10:03 AM

The mod does not work with 4.1.12

jack-d 04-24-2012 12:07 AM

Quote:

Originally Posted by basilrath (Post 2322684)
The mod does not work with 4.1.12

Well it is working fine for me on 4.1.12 and now 4.1.12 PL1

basilrath 04-24-2012 04:29 PM

As soon as i went to 4.1.12 the fall back image is all that renders on slider where as before there was no issues

Im not lying

Just a simple observation

antonrangel 04-28-2012 11:42 PM

Quote:

Originally Posted by jack-d (Post 2322957)
Well it is working fine for me on 4.1.12 and now 4.1.12 PL1

Quote:

Originally Posted by basilrath (Post 2323123)
As soon as i went to 4.1.12 the fall back image is all that renders on slider where as before there was no issues

Im not lying

Just a simple observation

So how do I make it work on 4.1.12 PL1? I made everything correct (i think).
Here, it only appears the arrays. The widget box is appearing with the arrays, but the images and the written texts aren't. Here's my debug message:

Code:

DEBUG MODE is ON!
slider_img_filepath: slider/
width: 650 height: 250
Strech or Crop?
show_articles_without_image: bool(false)
fallback_img: slider/uf_fallback_slider.png
#img: 10
description_length: 95
directory /home/(xxxxx)/public_html/forum

Warning: array_multisort() [function.array-multisort]: Argument #1 is expected to be an array or a sort flag in [path]/packages/vbcms/widget/execphp.php(191) : eval()'d code on line 109
#articles - featured and databasepull int(0) int(0)

OBS: The "(xxxxx)" I changed for security.

Thanks ;]

The Rocketeer 04-30-2012 04:55 AM

Quote:

Originally Posted by basilrath (Post 2323123)
As soon as i went to 4.1.12 the fall back image is all that renders on slider where as before there was no issues

Im not lying

Just a simple observation

Yes you are lying!
This is a lye! This is not True? :confused:


:p I haven't been able to make the slider work properly since vB 417 :(

Ramsesx 04-30-2012 10:57 AM

Quote:

Originally Posted by basilrath (Post 2323123)
As soon as i went to 4.1.12 the fall back image is all that renders on slider where as before there was no issues

Im not lying

Just a simple observation

https://vborg.vbsupport.ru/showpost....&postcount=429

antonrangel 05-01-2012 09:51 PM

I made some changes, now my slider only renders fall back image.
I've tryed the code posted above, but start to bug more.
What can I do now?

basilrath 05-02-2012 06:44 AM

Same here..................


All times are GMT. The time now is 09:57 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.01960 seconds
  • Memory Usage 2,018KB
  • 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
  • (17)bbcode_code_printable
  • (2)bbcode_html_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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