vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Geek Gallery Popup for vBadvanced Gallery or PhotoPost 4 or higher (https://vborg.vbsupport.ru/showthread.php?t=73040)

The Geek 12-17-2004 10:00 PM

Geek Gallery Popup for vBadvanced Gallery or PhotoPost 4 or higher
 
IMPORTANT:
Please note that I can no longer support this project. Primarily as it is designed for vb3.0.x and I no longer use that version (im obviously on vb3.5x ;) ). There is a version for vb3.5 over here . This project is left here for the community.
-----------------------


Inspired by mpdev's photopost popup modifcation.
I used photopost and had his modification installed. When I moved from photopost to vBadvanced Gallery, I needed the same type of hack - so here it is!

This lil doofer is designed to allow your users to open up a popup window while creating a post. The popup window will display all of the users images in thier gallery (vba or photopost) and allow them to click on an image to insert it into their post (inline). They can insert the image as a thumbnail, large image, or a clickable thumbnail that will open the large image in a seperate window. The real cool thing here is that all this works no matter which editor they are using.

You must have vBadvanced Gallery installed and working or PhotoPost 4 or higher duh.

Difficulty: Easy
File modifications: A few (only for phrases).
Time: About 5 minutes
Sign: Libra

Known issues:
Mozilla wysiwyg editor does not allow for html inserts which limits their options to thumbs or original pics only.

Change Log
v. 3 Update 20/2/05
Rewrote most of file to include support for PhotoPost. You can now set up your installation to use either vBadvanced Gallery or PhotoPost 4 or 5. This is determined by the settings in your geek-gallery-popup.php file. Special thanks goes to MPdev for helping sort out the PP integration.

v.2.01 update 11/2/05
fixed mozilla support ;)

v.2 update 3/1/05
  1. Added a couple more insertion methods
  2. Tidied up UI big time
  3. Auto sized popup window
  4. Finished the phrasing (found a hard coded phrase)
v.1.1 updated 21/12/04
  1. Added phrasegroup additions to newreply, newthread and private as phrases were not appearing there (easy edits).
  2. Made the $mediaext easier to edit (types of images allowed in popup)
  3. Fixed typo in template that always showed the Next button (took me ages to find the stupid thing)
  4. Fixed Back phrase as it was overwritten during the install
  5. Fixed problem where in non wysiwyg editor, the clickable thumb was screwing up
To upgrade: Follow instructions in the Readme

Make sure you click the freaking Install button. Otherwise you will run the risk of being skipped over in my Christmas Card Mail Out.

lasto 12-18-2004 12:20 PM

wot gallery is this - just done a search and it come up with nothing ?

Mone' 12-18-2004 12:24 PM

Quote:

Originally Posted by lasto
wot gallery is this - just done a search and it come up with nothing ?


You can find it here: http://www.vbadvanced.com/products.p...roductinfo&p=5



the nail geek great mod :)

The Geek 12-18-2004 12:32 PM

Quote:

Originally Posted by Mone'
You can find it here: http://www.vbadvanced.com/products.p...roductinfo&p=5



the nail geek great mod :)

Thanks! Duh. Should have made it clearer (updated the original thread). vBadvanced Gallery is superb software. Anyone with gallery software should look at it.

Ghostsuit 12-19-2004 06:35 PM

Class will be installing this soon :D

Mephisteus 12-20-2004 06:24 AM

Looking good :) When I get the gallery this will prolly come along with it, for those lazy members of mine :p

tormodg 12-20-2004 05:29 PM

This is looking good. I'm waiting for the final vBa Gallery but I already bought the license so I'll give this a try.

LunaTech 12-20-2004 09:04 PM

Great hack, but I had to make some changes to get it working.

First, I had to set the template code to the following as the phrases didn't display in the template:
Code:

<fieldset id="photobox" title="My Photos">
        <legend>Gallery</legend>
        <table cellpadding="4" cellspacing="0" border="0" align="center">
                <tr>
                        <td class="smallfont" colspan="$vboptions[smcolumns]">[<a href="#" onclick="open_geek_gallery_window(); return false" title="Pick">Select</a>]</td>
                </tr>
        </table>
</fieldset>

Next I expanded the media array to:
Code:

    $mediaext = array( '.gif', '.jpg', '.jpeg', '.png', '.psd', '.bmp' );
Then I had to modify the SQL query to:
Code:

            images.imageid, filename, thumbname, extension, images.title, categories.title AS cattitle
        FROM " . TABLE_PREFIX . "adv_gallery_images AS images
        INNER JOIN " . TABLE_PREFIX . "adv_gallery_categories AS categories USING (catid)
        WHERE images.userid=$userid and extension in ('gif', 'jpg', 'jpeg', 'png', 'psd', 'bmp') ORDER BY dateline DESC LIMIT $start ,$perpage";

After that, in the popup template I had to remove the $folderstring reference before THUMB in the sendLinked() function.

Lastly, next shows up even when you have no more photos. A band-aid for this is to add:
Code:

if($numrows < $perpage)
                $next = 0;

below:
Code:

    $numrows = $DB_site->num_rows($myphotos);
in the php file. You then have to edit the popup template to have <if condition="$next>0"> - there's only one i in the original.

LunaTech 12-20-2004 09:42 PM

Oh! And there is no phrase $vbphrase[geek_gallery_back] created. Once it's created, the previous link will work.

tormodg 12-21-2004 08:41 AM

Nail Geek,

Now you should write something like this for the vBa Links Directory as well!!! :)


All times are GMT. The time now is 02:02 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.03149 seconds
  • Memory Usage 1,749KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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