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)
-   -   New Posting Features - Cel Photo Popup - Insert pictures from vB Albums, Attachs, Photopost, vBGallery (https://vborg.vbsupport.ru/showthread.php?t=243865)

hotrod122 11-21-2011 02:00 AM

4.1.7 here.. and same as above...greyed out in standard editor...
which for the most part is what my users use...
need to get this to work in the standard editor please...

Talk-Pets 12-12-2011 02:54 PM

Has anyone made this work in 4.1.8? Any help appriciated....

foxystoat 12-13-2011 10:08 AM

Also would like for 4.18, had this before the upgrade - was ace.

dwwright 12-13-2011 03:25 PM

I'm running 4.1.8 now, but still have the greyed out icon.

Also, be sure to fix the syntax of the plugin.js noted earlier or it will break the editor for IE7 or anyone running compatibility view on IE 8 or 9. Seems to break the uploader on Chrome as well.

Autotraker 12-15-2011 02:01 PM

Installed, broken in 4.1.8, uninstalled.
Guess you haven't worked all the bugs out yet.
No button at all in standard editor.

AusPhotography 12-17-2011 03:38 AM

1 Attachment(s)
4.1.8 works ok with Enhanced Editor

I've extended it to support our Photo competitions system - very easy!

One minor issue is that on a dark skin the pop-up select text is dark.

Eg. from an instruction post on our site...

Moncha 12-31-2011 07:21 AM

I have it partially figured out for vB 4.1.9 ...
During the install, the script doesn't install a phrase that generates the "My Photos" link. Found on line 202 in the "product-cel_photo_popup_4-1-002.xml" file.
I added the phrase manually.

Then on line 326, The code for the link needs to be added to the editor_smiliebox template. The script doesn't replace the template like it is supposed to either.

That takes care of the link that is supposed to be under the "More" link for the smilies.

I can only get the editor button when as said before, placing the editor in the enhanced configuration by way of the usercp. But the text link works no matter.

Hope this helps for someone to re-write the install script for the plugin

Delfi_r 01-16-2012 10:13 PM

installed, but not working on 4.18, i suppose it's a missing link in the icon. I'll wrk on it and waiting for an updated install.

rbc1225 01-29-2012 02:35 PM

Dang, just what I was looking for but I am running VB 4.1.10 and afraid to load it due to no updates on this since 6-12-11 so I assume since it has not been fixed for 4.1.8 it won't work for 4.1.10?

bluebare 01-31-2012 03:08 PM

Installed on 4.1.10, it fubared my custom skins, removed the video posting button from Forum editing menu.... Then when I tried to deinstall it, it messed up the templates. I really enjoyed this mod in the past but this just turned me away from it.

cellarius 02-15-2012 11:50 AM

For your information: I'm currently working on a new version, that will fix the button issue in standard editor mode an will also add an optional button at the bottom next to the autosave restore button.

Some issues remain, and I'll go back through the posts for bugs to look at, but if you have unreported issues, now would be a good time to tell me ;)

Moncha 02-15-2012 01:59 PM

Be glad to beta it for you.. I for one like it

ehpoole 02-15-2012 07:34 PM

I've found several issues with Cel_PhotoPopup version 4.1.002 on vBulletin v4.1.10. Basically class methods/variables are being called without first attaching them to the $this-> instance.

In cel_pp_class_photopost.php, On or about Line 192 (very near end of file):
Was: $img['med'] = $img['orig'];
Fixed: $this->img['med'] = $this->img['orig'];
In cel_pp_class.php, On or about Line 109 (part of function set_choice_by_get()):
Was: $get_album = FALSE;
Fixed: $this->get_album = FALSE;
While I could locate the cause of the above issues and correct them, there is another issue that I have had to make a real hack of a fix for because I can not identify what is causing the page to generate an Error 500 (Server Error) unless at least a single byte is printed by a certain point in photo_popup.php. Around line 204 I had to add the following line of code: echo chr(0); in order to prevent the Server Error 500. With that single null byte printed to the browser HTTP headers are sent and everything works as it should (save for the preceding code fixes), but without nothing is *ever* sent to the browser and the server throws a 500 Server Error and PHP logs the error as "premature end of script headers".

I can not locate anything site specific (like Apache or PHP configurations) that would cause a timeout to occur if headers were not sent in under 1-2 seconds (about the longest possible wait) but it nonetheless behaves a lot like a timeout condition and it is 100% repeatable with absolute certainty -- if at least one byte is not sent to the browser (to trigger PHP sending the headers) by a certain point in the PHP code a 500 Server Error will occur each and every time.

Despite my best efforts, I have not been able to figure out why this hack is necessary to make things work.

If these issues have already been reported and fixed, please accept my apologies. I wanted to report my findings so as to ensure that you were aware of the issues I found so that the fixes could be incorporated into the next official release.

Thank you for your time and efforts in this regard.

cellarius 02-15-2012 08:11 PM

Thanks for your reports; I have corrected the two code bugs you reported. Regarding the server error, however, I have never witnessed this myself or had any reports on it. I really don't have an idea either what could cause this or what I could to to try to reproduce it...

cellarius 02-17-2012 05:40 AM

Damn, have that @!$?& button under the editor working in IE and FF, but Chrome won't show it. Boy, do I hate Javascript... ;)

cellarius 02-17-2012 09:07 AM

1 Attachment(s)
New Version: 4.1.004

Highlights:
  • This version fixes several bugs, among them the greyed out button in code mode)
  • the much requested, better visible text-button is back. It can be turned on and off via a new AdminCP setting, same for the old toolbar icons. See:
  • if you are on vB 4.1.10, remove your setting for the seperator - this is obsolete. CKE no longer trims the whitespace Photo Popup inserts by default.
Full list of changes (the leading number refers to posts in this thread):
  • #225 [added] suggestion for button under the editor (tested with FF 10, IE 9, Chrome 17)
  • #--- [added] AdminCP settings for toolbar and new bottom-button
  • #--- [added] code of major plugins moved to file system for better overall performance
  • #211 [fixed] Added getBaseUrl() to window.open in plugin.js in order to provide for multi-directory installations (provided in #214)
  • #215 [fixed] bug when using MySQLi in photo_popup.php, line 322 (fix provided by snoopytas in #215)
  • #224 [fixed] editor button no longer greyed out/inactive in code mode
  • #253 [fixed] code bugs
  • #229 [can't reproduce] dropdown to choose albums not working (tested in 4.1.10)
  • #205 [not a bug] inserting image leads to black font color go white, caused by the placeholder between images (see ##207, 208, 209, also functionality obsolete)
  • #246 [not a bug] dark text in dropdowns, bad for black bg (the background and text colors in the dropdowns do follow the "input_"-style variables correctly in 4.1.10)
  • #212 [ok] Check compatibility with PhotoPost 8 (tested with vB 4.1.10 and PP 8.0 Gold)
  • #--- [obsolete] Add seperator between images feature obsolete, may be removed in future versions

Hostboard 02-18-2012 02:23 AM

New install VB 4.1.10 & 4.1.004 Using IE9 I am not getting a button image but rather just a grey block as reported in prior posts. The grey is clickable and the modification works. Would just like to see a button :)

Thanx!!!

cellarius 02-18-2012 07:54 AM

Huh, that shouldn't be the case, of course ;)
I'll look into it over the weekend.

cellarius 02-18-2012 08:32 AM

1 Attachment(s)
Had a quick look: I see the icon on IE9, just as in any other browser:

Attachment 136537

Please make sure you have uploaded the icon file correctly. If you use a custom style that uses a custom folder for images, make sure to upload the icon image file to a subfolder named cel in the directory the style uses for buttons. Probably [customstyleimages]/buttons/cel/cel_photo_popup.png.

Hostboard 02-18-2012 01:22 PM

You right, I'm wrong... Completely forgot about custom style... Still did not get it to show but it is just a matter of figuring out the proper directory structure, the one given did not work.

Also, do you have a mouse over tool tip for the camera image? I can mouse over all the buttons and get a small note but not on yours.

Hostboard 02-18-2012 02:33 PM

I am getting a TMS error:

Code:

There are 1 Template-Modifications that were not desinged for the currently installed vBulletin version. To make sure that vBulletin and your installed Products are working correctly, you must check and maybe modify those Template-Modifications.
It is stemming from editor_smiliebox

Also I can get the image in the editor with the default skin, custom skins that use custom images but the skin I am trying to use (PixlePremium) is using the default images and location. Weird... Any ideas?

cellarius 02-19-2012 09:41 AM

Regarding the TMS error: That may be because I may still be using an older version of TMS on my dev board. You should be able to ignore that.

Regarding the button path problem - the addon looks for the image in the folder cel inside the folder that is defined in the buttons image path in stylevars of that style. You should be able to use a tool like firebug to check where the editor is looking for the file.

Mark.B 02-19-2012 03:57 PM

My problem is the opposite way round, I can see the button image in IE9 but not Chrome or Firefox.

Checked and double checked the image locations, it's definitely there but does not show up. Got me baffled.

Firebug doesn't seem to work on editor elements so I can't test that way.

I even tried hardcoding the full URL into plugin.js, but despite this numerous cache clearing and refreshing just won't make it show up.

cellarius 02-19-2012 04:08 PM

Hi Mark,
sorry to hear that. If hardcoding it into plugin.js does not work, I'm out of ideas... it does work for me on all listed browsers. If IE shows it, I can't imagine it to be a path issue anyway.

BTW: Firebug does indeed not work on the buttons that come out of the box, but it does work on the added button. Since it shows up in IE, try the Dev Tools that come with it; I can see the path just fine there.

Anyone care to PN me with test access data so I can have a look at an editor?

cellarius 02-19-2012 04:10 PM

Quote:

Originally Posted by Hostboard (Post 2300861)
Also, do you have a mouse over tool tip for the camera image? I can mouse over all the buttons and get a small note but not on yours.

It's supposed to be there, but there's a bug :(
Will be fixed in the next release.

If you want to have it fixed right now, add the following line at the end of /includes/cel/cel_pp_plugin_editor_construct.php:
Code:

$this->config['vbulletin']['phrase']['cel_pp_my_photos'] = $this->vbphrase['cel_pp_my_photos'];
The tooltip will be the same text as the button below the editor.

Mark.B 02-19-2012 04:44 PM

Quote:

Originally Posted by cellarius (Post 2301226)
Hi Mark,
sorry to hear that. If hardcoding it into plugin.js does not work, I'm out of ideas... it does work for me on all listed browsers. If IE shows it, I can't imagine it to be a path issue anyway.

BTW: Firebug does indeed not work on the buttons that come out of the box, but it does work on the added button. Since it shows up in IE, try the Dev Tools that come with it; I can see the path just fine there.

Anyone care to PN me with test access data so I can have a look at an editor?

I can't make the right click context menu appear at all on any editor buttons, not even the added one, so I am unable to get Firefug to do its work.

As you say, can't be the path anyhow.

It's a weird one. I'm sure I'll get to the bottom of it eventually.

Mark.B 02-19-2012 04:48 PM

In IE8 the button is also missing, along with the following JS error....


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.3)
Timestamp: Sun, 19 Feb 2012 17:45:50 UTC


Message: 'CKEDITOR.currentInstance.name' is null or not an object
Line: 23
Char: 5
Code: 0
URI: http://www.bowlandcentral.com/forum/...n.js?t=B8DJ5M3

AusPhotography 02-20-2012 09:01 AM

We upgraded to latest version and integrated images from our Photo competition system.
We are NOT getting the IE8 issue, we use Competitions, Albums, Attachments, vBgallery

We also run Marco's editor enhancement and have multiple skins.

We really like the button at the bottom of the editor window!! Thanks!

Kym

marcellhernande 02-21-2012 12:28 AM

Awesome! I loved it! It makes posting easier! Thank you!

lachgas 03-03-2012 07:55 AM

1 Attachment(s)
Small Problem.

PHP Code:

Debug information

Version
4.1.001

Photo Popup Settings 
(from AdminCP)
num_of_cols[3]
num_of_rows[3]
num_total9
widht
600
heigth
680
products
albums attachments
insert_options_allowed
link_thumb_2_orig link_thumb_2_gallery link_med_2_orig link_med_2_gallery thumb med orig thumb_2_gallery_link_below med_2_gallery_link_below orig_2_gallery_link_below
allow_albums
0
code_usergroups
0

Code 
(this is what is inside the table cells)
<
a href="#" onclick="thumbpaste('<img src=\'http://www.saab-cars.de/attachment.php?attachmentid=74702&thumb=1\' style=\'border: 0\' />','[img]https://vborg.vbsupport.ru/external/2012/03/35.jpg[/img]');event.returnValue=false;return false;"><img src="http://www.saab-cars.de/attachment.php?attachmentid=74702&thumb=1" style="border: 0" title=""/></a>

Images query:
SELECT att.attachmentidatt.contentid FROM attachment as att WHERE (att.userid 10872 ) AND att.contenttypeid '8' ORDER BY att.attachmentid DESC LIMIT 09

Albums query 
(only if not coming from cache):

Pagination query:
SELECT COUNT('attachmentid') AS fotos FROM attachment as att WHERE (att.userid 10872 ) AND att.contenttypeid '8'

Link to Original
http
://www.saab-cars.de/attachment.php?attachmentid=74702

Link to Thumb
http
://www.saab-cars.de/attachment.php?attachmentid=74702&thumb=1

Used productalbums

Albums possible
1

Cookie
Read Cookie
albums,,thumb,0
Set Cookie
albums,,thumb,0
Cache Cookie
:

Table building (rows and columns)
[
td ][td][td][td][tr][td][td][td][tr][td][td][td

Preview is Ok, when we save, we have only the code no pictures.

cellarius 03-03-2012 06:58 PM

This is most likely caused by the imageresizer Addon you are obviously using.

BWJ 03-04-2012 12:04 AM

Thanks for a nice mod. I have noticed a little problem:

Vbulletin version 4.1.11
Chrome and Firefox: seems to work perfectly
IE8: editor doesn't show up

lachgas 03-04-2012 08:28 AM

Thank `s Cellarius

ehpoole 03-09-2012 09:19 AM

Quote:

Originally Posted by cellarius (Post 2300047)
Thanks for your reports; I have corrected the two code bugs you reported. Regarding the server error, however, I have never witnessed this myself or had any reports on it. I really don't have an idea either what could cause this or what I could to to try to reproduce it...

I apologize for the delay in getting back to you, I've been meaning to find the time to write this up for the past several weeks and you know how that goes once you start putting something off!

Anyhow, a few days after my original post I was able to find some time to continue debugging the photo_popup.php code and was able to determine that the cause of our "500 Internal Server Error" was caused by -- and please forgive me for my bluntness -- very inappropriate use of Cookies to spare a simple SQL Query. Basically, photo_popup.php was attempting to define a nearly 12KB cookie (approx 100 albums or 4KB unserialized), which grossly exceeds the standard HTTP Header buffer in Apache (8KB) and is a major violation of both the Cookie Specifications as well as the spirit of what cookies were intended for.

Per the Cookie Specifications (RFC2965) a site is only guaranteed support for a maximum of 20 cookies. The absolute maximum size for any cookie is 4KB (including data, expiration, and cookie name). Most importantly the absolute maximum storage available for ALL cookies for a given site is 4KB (i.e. one could do a single cookie of 4KB or 20 cookies of 204 bytes, or some combination that remains within these limits). As you are no doubt aware, vBulletin and its various Addons define a number of cookies, the exact number of which will vary from site to site, so in designing Addon components we must play nice and be respectful of the other cookies. Just as importantly from a design standpoint should be the recognition that ALL COOKIES must be transmitted by the browser to the web server with EACH and every request (even in Keep-Alive sessions). Given that the act of retrieving a single vBulletin page can easily entail many dozens of hits (HTML, CSS, images, buttons, etc), that quickly adds up to a lot of wasted bandwidth if we push our cookies to anywhere near 4KB (50 hits multiplied by 4KB is 200KB of bandwidth consumed just in cookies alone!). This is why cookies were never meant to exceed a few dozen to a couple hundred bytes at the absolute maximum.

Add to this issue that Web Servers have absolute maximums set on their HTTP Header buffers (8KB in Apache and 16KB in IIS), more than adequate for acceptable headers, we must be all the more respectful of the Cookie Specifications. Web Browsers also have their own limits (and only promise to abide by the Cookie Specifications) and have very undefined behaviors once the total cookies exceeds 20 or the total bytes exceeds 4KB -- some browsers will stop sending cookies altogether, some will begin deleting cookies to free up space, and others still will only transmit the portion below 4KB whenever the threshold exceeds 20 cookies or 4KB!

Any how, the simplest interim fix is to change line 220 (in Cel_PP 4.1.004) from:
vbsetcookie('photo_popup_albums', $cache_cookie, FALSE);
to
vbsetcookie('photo_popup_albums', '', FALSE);
you can also comment out line 218 since serializing $cache_cookie becomes irrelevant if we are not sending the cookie (well, we are but we're clearing it). This interim fix will prevent the web server from choking on an out-of-spec cookie and allow otherwise normal and expected behavior on the site. It will also reduce wasted bandwidth since the cookie will no longer be retransmitted to the web server for each and every hit requested by the user's browser.

In fairness, if you are concerned with regard to the cost of the SQL Query (much of which I would expect to be Indexed any how) the more appropriate strategy would be to create your own caching table (e.g. cellpp_cache) on the SQL server to store the aggregated information for the user(s). The cost of not only setting a large cookie (and possibly blowing up the web server) and the constant retransmission of such large cookies by the browser (to the server) on each and every request is, IMHO, far more costly than any SQL query the cookie may have been intended to spare the server.

For what it's worth, as a developer you are in good company in making this oversight. Before my retirement I spent quite a few years as a freelancer fixing web applications and by far one of the most common issues was developer failure to consider the upper and lower limits of their variable/storage types -- especially with regard to languages, such as C and SQL, where variables are rigidly typecast. Your issue with the out-of-spec cookie is very much the same sort of issue.

I really hope I have not been too harsh, but I feel strongly that if you make the changes I have suggested and keep storage limits in mind with future implementations you will have a much more superior product.

Lest I forget, our recent issues aside, we are very grateful for your work in developing Cel_PhotoPopup as our users very much appreciate the ease with which it allows them to insert photos from their albums.

If you have any questions or concerns with regard to any of my comments, please feel free to ask.

PS - I would also mention the missing "My Photo" toolbar text in plugin.js due to an unregistered variable, but I believe you mentioned already addressing that issue in an earlier post.

Noerenberg 03-11-2012 09:28 PM

reading before posting.

everthing is fine.

thanks for th great mod

ChimeraRS 03-19-2012 05:22 PM

Quote:

Originally Posted by BWJ (Post 2305906)
Thanks for a nice mod. I have noticed a little problem:

Vbulletin version 4.1.11
Chrome and Firefox: seems to work perfectly
IE8: editor doesn't show up

Same problem here - any idea what might be causing it?

Front Range 4x4 05-16-2012 12:45 AM

Installed in 4.1.12 Patch Level 1, my members love it, thanks Cellarius!

Nominated

I have some attachments not showing up but can live with that for now. Benefits far outweigh this small issue.

trackpads 05-27-2012 11:54 PM

Again, thanks for the hard work on this!

Hostboard 06-02-2012 09:17 PM

Quote:

Originally Posted by Hostboard (Post 2300875)
I am getting a TMS error:

Code:

There are 1 Template-Modifications that were not designed for the currently installed vBulletin version. To make sure that vBulletin and your installed Products are working correctly, you must check and maybe modify those Template-Modifications.
It is stemming from editor_smiliebox

Quote:

Originally Posted by cellarius (Post 2301112)
Regarding the TMS error: That may be because I may still be using an older version of TMS on my dev board. You should be able to ignore that.

I actually took some time to look at this and it seems it is the text within the template editor_smiliebox that your searching for is incorrect.

The search for text should be:
Code:

<vb:if condition="$show['moresmilieslink']">
    <div class="moresmilies">[<a href="javascript://" onclick="vB_Editor['{vb:raw editorid}'].open_smilie_window(); return false" title="{vb:rawphrase showing_x_smilies_of_y_total, {vb:raw vboptions.smtotal}, {vb:raw totalsmilies}}">{vb:rawphrase more}</a>]</div>
</vb:if>

Once I corrected this, the text in the simile box appeared and is working as it was designed.

Front Range 4x4 06-28-2012 03:07 PM

Quote:

Originally Posted by Front Range 4x4 (Post 2329733)
Installed in 4.1.12 Patch Level 1, my members love it, thanks Cellarius!

Nominated

I have some attachments not showing up but can live with that for now. Benefits far outweigh this small issue.

Okay, the thumbnails not showing is a forum wide issue so it does bother me. Obviously it's not caused by this great mod but figured I'd ask if anyone knows a solution. Yes, rebuilding thumbnails works but requires rebuilding them all which starts at the beginning and it's the latest thumbnails that don't show up.

Does anyone have a better way to fix this?


All times are GMT. The time now is 11:12 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.01789 seconds
  • Memory Usage 1,894KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (7)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