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)

Aramist 07-24-2011 06:58 PM

@ another questions :P

1 - I'm getting some charset issues on caption, I use UTF-8, but some captions are coming wrong...but original posts are ok, no issues....just on slider caption.

Edit: Just preview text are getting worng, post title is charset ok.

2 - I have verified that slide images are been created with ~200 or 300k, which is causing the slider to stuck some animations (while loading the images). Is there any way to reduce images file size?

Ty

Mooff 07-24-2011 07:12 PM

first one. Won't have time to debug that until next week. However, please give more information (what characters are the issues, what they are in your original posts -quote that part- and what they are in the caption, another quote).

second one. Sure, will be included in the next version - i used parts of the sprite code Osbes wrote for our css-sprite performance addon. There we do need transparency, so the images are saved as *.png
For the nivo slider *.jpg does make more sence and jpegs are alot smaller.

This part
Code:

                            $img_filepath = $slider_img_filepath . 'slide_' . $i . '.png';
                            $success = imagepng($sprite, DIR  . ($slider_img_filepath[0] != DIRECTORY_SEPARATOR ?  DIRECTORY_SEPARATOR : '') . $img_filepath);

will be changed into this one (already implemented our version)
Code:

                            $img_filepath = $slider_img_filepath . 'slide_' . $i . '.jpg';
                            $success = imagejpeg($sprite, DIR  . ($slider_img_filepath[0] != DIRECTORY_SEPARATOR ?  DIRECTORY_SEPARATOR : '') . $img_filepath);


Brexen 07-24-2011 09:03 PM

Thanks man nice :D installed <3

Aramist 07-25-2011 02:38 PM

Quote:

Originally Posted by Mooff (Post 2224448)
first one. Won't have time to debug that until next week. However, please give more information (what characters are the issues, what they are in your original posts -quote that part- and what they are in the caption, another quote).

second one. Sure, will be included in the next version - i used parts of the sprite code Osbes wrote for our css-sprite performance addon. There we do need transparency, so the images are saved as *.png
For the nivo slider *.jpg does make more sence and jpegs are alot smaller.

This part
Code:

                            $img_filepath = $slider_img_filepath . 'slide_' . $i . '.png';
                            $success = imagepng($sprite, DIR  . ($slider_img_filepath[0] != DIRECTORY_SEPARATOR ?  DIRECTORY_SEPARATOR : '') . $img_filepath);

will be changed into this one (already implemented our version)
Code:

                            $img_filepath = $slider_img_filepath . 'slide_' . $i . '.jpg';
                            $success = imagejpeg($sprite, DIR  . ($slider_img_filepath[0] != DIRECTORY_SEPARATOR ?  DIRECTORY_SEPARATOR : '') . $img_filepath);


This change works great ! TY....down to 20k from 200k.


Explaining MY charset Issue:

In a Original text: " Redu??o " and " implica??es "

It shows: " Redução " and " implicações "

But it only occurs in the caption $article['previewtext'] variable .

$article['title'] variable is working fine with no charset issues.

One Question: What happens if I edit the original article and change the image? The script can handle it?

And no problem with the support time....u can help me when u have time...don't worry ! :D

Ty for your support ! :D

Mooff 07-25-2011 03:26 PM

Ah i see, the issue seems to be my version of equalizing the preview text length (which i changed numerous times along the way). Thought it would work for everything since it does work with the german special characters ? ? ? and so on.

Anyways, quick and dirty fix would be removing the equalizing part (preview length then might differ depending on how many special characters are in there, but everything should look fine then)

again, untested
Code:

                /*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['pagetext'] = strip_tags($article['pagetext']);

                $article['previewtext'] = str_replace('<br />', '', $article['pagetext']);

                $article['previewtext'] = html_entity_decode($article['previewtext']);
                $len = $description_length;
                if ( strlen($article['previewtext']) > $len )
                {                   
                    $article['previewtext'] = substr( $article['previewtext'] , 0 , strrpos( substr( $article['previewtext'], 0, $len), ' ' ));
                } 
                $article['previewtext'] = htmlentities($article['previewtext']);

changes into
Code:

                /*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['pagetext'] = strip_tags($article['pagetext']);

                $article['previewtext'] = str_replace('<br />', '', $article['pagetext']);

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


--
your other question.
The slider can handle that.

If you edit an article the next time the cms widget cache runs out the new version will be in. By the way i would strongly advise to use the widget cache on this one. Default setting there is 5min - the widget cache for the slider refreshes every 300 minutes on our website. Using the cache the load time is blazing fast. Letting the database query run, sort the articles and then resize and save a bunch of images is not so fast. ;)

Aramist 07-25-2011 04:47 PM

Quote:

Originally Posted by Mooff (Post 2224811)
Ah i see, the issue seems to be my version of equalizing the preview text length (which i changed numerous times along the way). Thought it would work for everything since it does work with the german special characters ? ? ? and so on.

Anyways, quick and dirty fix would be removing the equalizing part (preview length then might differ depending on how many special characters are in there, but everything should look fine then)

again, untested

changes into
Code:

                /*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['pagetext'] = strip_tags($article['pagetext']);

                $article['previewtext'] = str_replace('<br />', '', $article['pagetext']);

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


Again..... works like a charm !!! :D

Ty a lot..

Now i'll sit here and wait you bring us the next version with attach working !! :DD

A Stunning Job ! Gratz !

BTW ... Nominated !

Ty

Mooff 07-27-2011 09:31 AM

Update on Attachements:

I tried debugging it today, but unfortunately run into a huge bug our CMS has. It does not show attached images at all. Neither preview, nor inline, nor in the attachement box. Pictures which are working fine in the forum. Instead it sends our server into some kind of loop, until it ends up with a 503 minutes later...

Without working CMS attachements i can't test the slider code for it.

Doing some searching in the jira vbulletin bugtracker it does look like this might be fixed in 4.1.4 / 4.1.5 - so i'll look into it again once we have updated our forum to that version.

Meanwhile the slider is now running fine on our main cms page and i'll include the jpg/png and charakter encoding stuff soon.

Alfa1 07-27-2011 05:22 PM

Unless you are 100% sure that the same issue already exists in JIRA, please add a new JIRA report, so that we are sure that the issue is in JIRA.

Mooff 07-27-2011 06:09 PM

Seems to be that issue:
http://tracker.vbulletin.com/browse/VBIV-5661
( has been there since vb4.0.2 :/ )

Mooff 07-27-2011 10:06 PM

Osbes managed to sort that attachment bug out on our site.

-> new version added

0.9.9 (28.07.2011)
  • images are now saved as jpg instead of png -> reduced filesize by a factor 10
  • removed a bug causing weird characters to show up in the previewtext
  • added loads of debug messages and a debug mode
  • removed beta status - slider is running on our live site now


Attachments are working fine for us now. Important point: Guests need to be able to see them, if they can't neither can the slider.

Reworked the FAQ.


Next version will be uploaded once we've upgraded our board to 4.1.5 (given the upgrade calls for slider changes).


All times are GMT. The time now is 12:52 PM.

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.01411 seconds
  • Memory Usage 1,762KB
  • 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