Add thumbnails to Lightbox Add thumbnails to Lightbox
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Add thumbnails to Lightbox

Started by Walkinman, February 08, 2006, 04:00:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Walkinman

Hey Folks,

I know I must be driving you all crazy with these requests - but I really do appreciate all the help here.

What I want to do now is add a checkbox under each thumbnail in an album, allowing a visitor to simply check the box to add images to their lightbox (Favorites), instead of opening the image, and adding it, then return to the main gallery. Is this possible, and if so, can someone give me some help with doing so. I'll probably more explanation than you'd expect.  ;D

Thank you.

Cheers

Carl

Nibbler

#1
Try this plugin, follow the instructions in the online docs if you are not familiar with installing plugins.

v 1.0 - Original version (no longer available)
v 1.01 - Fixed installer bug (album_fav_boxes.zip)
v 1.1 - Added lightbox removal feature (album_fav_boxes_11.zip)
v 1.2 - Added into search results, easier customization of lang strings, added class to checkboxes (no longer available)
v 1.2.1 - Fixed error when adding from search results  (no longer available)
v 1.2.2 - Only display 'add to lightbox' under pics not already there (no longer available)
v 1.2.3 - Fixed co-existance issue with other plugins   (no longer available)
v 1.2.4 - CPG 1.4.12 compatiblity fix (no longer available)
v 1.2.5 - Favpics fix (rebase to 1.4.12 theme.php)   (album_fav_boxes_125.zip)

Walkinman

Hry Nibbler,

Thanks - I had searched but didn't know there was a plug in for this.

I uploaded the file,and when I went to install the plug in I got this message:

Fatal error: Cannot redeclare theme_display_thumbnails() (previously declared in /home/skola2/public_html/stock/include/themes.inc.php:1716) in /home/skola2/public_html/stock/plugins/album_fav_boxes/codebase.php on line 61

My guess is it conflicts with something I changed earlier, so allow adding to lightboxes only for logged in users, is that correct?

Thanks

Cheers

Carl

Nibbler

I've fixed the issue with the installer, try again.

Walkinman

Hey Nibbler,

Thank you - that is awesome.

Would there by any way to have the same thing apepar in the Lightbox/Favorites Gallery, only with "remove from Lightbox"? As it is now, I have to open the full size image, delete from the Lightbox, then return to to the lightbox to remove another one. If there could be an option to "empty lightbox", that would be great as well (I know that borders on 2 questions in one thread, but I thought they were sufficiently related - hope that's ok).

Thanks again.

Cheers

Carl

Nibbler

Done, version 1.1 added to original post.

Walkinman

Hey Nibbler,

Thank you .. that is even more awesome.

Say, you don't happen to want to run for President do you?  :)

Thanks again - really appreciated.

Cheers

Carl

PS - Moderators can feel free to mark this thread Solved

sbpoole

I hate to ask, but how could I center the checkbox located beside "add to lightbox" so that it is in line with the text?  Now the checkbox is higher than the text. 

Thanks for this plug-in

Note: I changed the wording from lightbox to favorites on mine

Sonny


Walkinman

Hey Nibbler,

One more thing - is it possible to have this also displayed under thumbnails found from a "search"? Presently if someone does a search, the resulting thumbnail pages don't display the "Add to Lightbox" check box. Could you add this to the plug in?

Thanks again.

Cheers

Carl

Nibbler

Plugin updated to address both issues, see original post.

Walkinman

Hey Nibbler,

Thanks for your work.

I'm getting errors when I try to add to lightbox from search results.

Template error
Failed to find block 'log_ecards'(#(<!-- BEGIN log_ecards -->)(.*?)(<!-- END log_ecards -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">
                        <tr>

                                <td class="admin_menu"><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></td>
                                <td class="admin_menu"><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></td>
                                <td class="admin_menu"><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></td>
                                <td class="admin_menu"><a href="groupmgr.php" title="{GROUPS_TITLE}">{GROUPS_LNK}</a></td>
                                <td class="admin_menu"><a href="usermgr.php" title="{USERS_TITLE}">{USERS_LNK}</a></td>
                                <td class="admin_menu"><a href="banning.php" title="{BAN_TITLE}">{BAN_LNK}</a></td>
                                <td class="admin_menu"><a href="reviewcom.php" title="{COMMENTS_TITLE}">{COMMENTS_LNK}</a></td>

                                <td class="admin_menu"><a href="picmgr.php" title="{PICTURES_TITLE}">{PICTURES_LNK}</a></td>
                                <td class="admin_menu"><a href="searchnew.php" title="{SEARCHNEW_TITLE}">{SEARCHNEW_LNK}</a></td>
                                <td class="admin_menu"><a href="util.php" title="{UTIL_TITLE}">{UTIL_LNK}</a></td>
                                <td class="admin_menu"><a href="profile.php?op=edit_profile" title="{MY_PROF_TITLE}">{MY_PROF_LNK}</a></td>
<!-- BEGIN documentation -->
                                <td class="admin_menu"><a href="{DOCUMENTATION_HREF}" title="{DOCUMENTATION_TITLE}" target="cpg_documentation">{DOCUMENTATION_LNK}</a></td>
<!-- END documentation -->
                        </tr>
                </table>
                </div>


This is when I'mlogged in, or even when I'm not. Like I said earlier, I had made a mod to allow the Lightbox only for registered users (which I will change back to allow for everryone) and that may be causing it - but I get this error whether logged in or not. Is the problem just on my end?

Thanks again.

Cheers

Carl


Walkinman

Hey Nibbler,

Thanks. Looking at that thread, it tells me to edit the include/theme.inc.php - correct? I thought I'd read somewhere never to edit this, so I copied the original just in case. Then I made the change you suggested at the bottom of the thread, and now I get this error:

error: the selected album/file does not exist!

I don't get that error when I just add to lightbox from an album .. only when I do it from the search results.

Thanks again - I appreciate your help.

Cheers

Carl

Nibbler


Walkinman

Hey Nibbler,

This works great now, thanks.

One (more) question: If a visitor has an image in their lightbox, and does a search or browses a gallery, the thumbnails only show "add to lightbox" .. which is Ok, but if they check that and the image is already in their lightbox, the image is then removed from their lightbox. Does that make sense? Perhaps it makes sense to have the text read "Remove from Lightbox if the image is already in their lightbox, so they don't check it accidentally. If you have a better idea, feel free to change it how you think it would work best.

Thanks again, I really do appreciate your help.

Cheers

Carl


sbpoole

Thanks Nibbler.  Great plug-in!

Sonny

Walkinman

Hey Nibbler,

Awesome!

Thanks so much for your help.

Cheers

Carl

qseb


lordprodigy

I got this error Fatal error: Cannot redeclare theme_display_thumbnails() (previously declared

I guess there is a duplicate function problem. How do I fix that?

Also, when an error as such occurs, I cant access the plugin manager to uninstall the plugin. the whole site is down. I assume I can re-upload my backed up version of theme.php but would have been nice if for example when there is an error of some kind for the plugin to default and uninstall itself so the site is still functional. Only a suggestion.