Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Cel Photo Popup - Insert pictures from vB Albums, Attachs, Photopost, vBGallery Details »»
Cel Photo Popup - Insert pictures from vB Albums, Attachs, Photopost, vBGallery
Version: 4.1.004, by cellarius cellarius is offline
Developer Last Online: Apr 2022 Show Printable Version Email this Page

Category: New Posting Features - Version: 4.x.x Rating:
Released: 06-02-2010 Last Update: 02-17-2012 Installs: 198
Uses Plugins Template Edits Auto-Templates
Additional Files Translations  
No support by the author.

Important!
Old editor (vB 4.1.3 and below): use 4.0.008!
New editor (vB 4.1.4 and above): use 4.1.00x!


What does it do?

When creating or editing a post, your users can open a popup window that will show them their pictures in the chosen gallery, albums or attachment system.


Detailed features listUpgrade from vB3 version
Please uninstall the old version at AdminCP->Plugins & Products->Manage Addons. Also remove all files you uploaded for the vB 3 version apart from the editor icon, which will be reused. This will be /photo_popup.php and all /includes/photo_popup_config_[product].php files, relative to your forum root. Then follow the installation instructions below.


Installation
  1. Extract the archive.
  2. Choose the products you want to use and rename the configuration files in _UPLOAD/includes/cel/cel_pp_config from .php_new to .php
  3. If you're using Photopost Pro, you need to fill in some crucial information into the config file. Please see the config file for more information.
  4. Upload the contents of folder "_UPLOAD" to your forum root. Note how the folder structure mirrors the folder structure in your forum root, so every file will be in the right place.
  5. Now the Photo Popup and your chosen product configuration files will be present with default settings on your server. Later on, you may want to make adjustments there.
  6. Install the product file at AdminCP->Plugins & Products->Manage Addons.
  7. Template edits?
    • If you are using new editor, you're done.
    • If you are using old Editor and Template Modification System (TMS), you're done.
    • If none of the above two conditions apply to you, do the template modifications explained in _DOCS/OLD_EDITOR_ONLY-template_edits.txt manually for the editors you want the popup accessible from.
Basic ConfigurationUpgrade
  • If upgrading within the vB4 series, just reimport the product-xml-file, overwriting the old version, and reupload all files (skip the icon if you're using a custom one).
  • Most times you will be done, but please check in _DOCS/config_file_versions.txt whether the config file for one of the products you use has been changed since you last updated.
  • If the config file for one of your products has been updated, rename _UPLOAD/includes/cel/cel_pp_config from .php_new to .php and transfer your custom settings from your current config file to the new one. Then upload it to your server.
Support and debugging

Please note the information in this post of this thread.


Version history
For older versions see the vB3 version of this Mod.
### 4.1.004 ###
fixed several bugs, text-button re-added (full list)
### 4.1.002 ###
button not showing issue resolved
### 4.1.001 ###
adapted to new vB editor, added workaround for image spacing
### 4.0.004-008 ###
bugfix releases
### 4.0.003 ###
initial release
new (core): completely rewritten code
new: categories/user albums/folders listed hierachically in albums dropdown
new: Photopost Pro and vBGallery permissions for categories
new: global permissions check
new: cache system for albums dropdown
new: override all product related AdminCP-Settings in the product config file.



** Please note that the config files for Photoplog and CND Garage have not been converted. I do not have access to vB4 versions of those two softwares for testing and developing. Whether this will change in future, I don't know - at the moment, apart from having no software access, I'm very much out of time. Anyway, the config files are not too hard to figure out and there is a short introduction to adapting them. Please feel free to convert or develop for other software, if you like, and submit to this thread or to me personally by PM.


### Don't forget to click install! ###

(No support if you don't)

Download Now

File Type: zip cel_pp_4-0-008.zip (30.5 KB, 377 views)
File Type: zip cel_pp_4-1-004.zip (34.5 KB, 414 views)

Screenshots

File Type: jpg popup_albums.jpg (41.7 KB, 0 views)
File Type: jpg workflow.jpg (58.9 KB, 0 views)
File Type: jpg admincp.jpg (84.7 KB, 0 views)
File Type: jpg editor.jpg (40.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
tbworld

Comments
  #272  
Old 03-03-2012, 06:58 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is most likely caused by the imageresizer Addon you are obviously using.
Reply With Quote
  #273  
Old 03-04-2012, 12:04 AM
BWJ BWJ is offline
 
Join Date: Aug 2005
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #274  
Old 03-04-2012, 08:28 AM
lachgas lachgas is offline
 
Join Date: Apr 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank `s Cellarius
Reply With Quote
  #275  
Old 03-09-2012, 09:19 AM
ehpoole's Avatar
ehpoole ehpoole is offline
 
Join Date: Feb 2012
Location: Anderson, SC
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cellarius View Post
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.
Reply With Quote
2 благодарности(ей) от:
Manoel J?nior, tpearl5
  #276  
Old 03-11-2012, 09:28 PM
Noerenberg Noerenberg is offline
 
Join Date: Mar 2009
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reading before posting.

everthing is fine.

thanks for th great mod
Reply With Quote
  #277  
Old 03-19-2012, 05:22 PM
ChimeraRS ChimeraRS is offline
 
Join Date: Jun 2011
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BWJ View Post
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?
Reply With Quote
  #278  
Old 05-16-2012, 12:45 AM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #279  
Old 05-27-2012, 11:54 PM
trackpads's Avatar
trackpads trackpads is offline
 
Join Date: Aug 2003
Location: Armyville
Posts: 1,074
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Again, thanks for the hard work on this!
Reply With Quote
  #280  
Old 06-02-2012, 09:17 PM
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Location: CT
Posts: 843
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hostboard View Post
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 View Post
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.
Reply With Quote
  #281  
Old 06-28-2012, 03:07 PM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Front Range 4x4 View Post
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?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:48 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.05097 seconds
  • Memory Usage 2,378KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete