Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Picture and Album Gallery Details »»
Picture and Album Gallery
Version: 1.09, by HCGB HCGB is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.1.0 Rating:
Released: 03-09-2010 Last Update: 01-11-2011 Installs: 1361
Uses Plugins Auto-Templates
Re-useable Code Additional Files Translations  
No support by the author.

Picture and Album Gallery for vB4


This is a simple mod written out of frustration with the lack of such a basic feature in vb4 (and vb3, etc....)

Features:
Adds a Gallery drop-down menu to the nav bar OR to the navtab which allows browsing AND searching of all pictures and albums on your site.

The search function searches the album title, album description, picture caption AND username.

Note: If guest permission AdminCP->Usergroups->UserGroup Manager->Unregistered/Not Logged In->Can View Albums is "yes" then they will be able to browse album and picture thumbnails - they may NOT be able to view the full-size pictures. To hide the gallery menu from guest see Settings below.

The gallery and menu is phrased.

Tested with Vbulletin 4.0.2/3 (note: earlier versions have not been tested and are not supported) AND vBadvanced 4 beta1.

Settings:
None are needed - it does what it says on the tin .

AdminCP->Options->User Profile:Album Options "Pictures Per Page" and "Albums Per Page" control the number of thumbnails displayed per page in each gallery type.

If you get images overlapping the borders then you have inconsistent thumbnail sizes - you need to:
AdminCP->Maintenance->Update Counters->Rebuild Attachment Thumbnails

If you want to hide the Gallery menu from guests then edit the Gallery navbar (or navtab) popup menu plugin and change $allowguests = from true to false

Installation
  1. Unzip the download package and copy the contents of the UPLOAD folder into your forum folder.
  2. Go to the VB AdminCP->Plugins & Products click "Manage Products". The click "Add/ImportProduct" at the bottom of the page.
  3. Click "Browse" button and point to the product-gallery-(etc).XML file included in this ZIP package.
  4. Click "Import"
  5. Once the gallery import is complete, click "Add/Import Product" again and select EITHER product_gallery_navtab-xxx.xml OR product_gallery_navbar-xxx.xml depending on where you want the gallery menu to appear (navbar or navtab).
... all done

Updates

To update from an older version you MUST uninstall the product (admincp->manage products: delete Picture and Album Gallery). Then re-install as above.

v1.08
tested on vb4.0.3
v1.07
Fixed navtab menu - picture and album URLS swapped

Converted navtab/bar into products to make installation easier.
v1.06
Due to popular demand added navtab drop down menu (with help from
TimberFloorAu )
Cleaned up code and templates
v1.05
Phrased menu items - upgrade is not required unless you use other languages.

v1.04b
fixed database connection issue

deleted unused template from product xml
v1.03b
Changed permissions to allow guests to view thumbnail galleries

Added phrasing for main gallery code.
Removed navbar template - replaced by plug-in code
Changed album display template from albumbit to album_latestbit (it works better!)
Various template mods to clean up display
v1.02b
Wasn't remembering search query between pages.


This is my first "proper" product so comment/criticism/etc is welcome

John

Download Now

File Type: zip vb4 Gallery 108.zip (9.6 KB, 3031 views)
File Type: zip vB4 Gallery 109.zip (9.6 KB, 4925 views)

Screenshots

File Type: jpg albs.jpg (86.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #662  
Old 01-26-2012, 12:54 AM
rbc1225 rbc1225 is offline
 
Join Date: Feb 2010
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Videx View Post
If you do a "Search this Mod" in the upper right you may see others have had problems with vbadvanced and this mod also. You could try writing them and ask if they solved the issue.
Ahhhh never saw that "Search this Mod" button. Cool. Thanks for your response. I think I might just have to update everything to the latest version and see how it goes. I see this mod used on another board with Vbadvanced and the newest VB. Just haven't doen that yet, so a little leary about updating the first time. Thanks again
Reply With Quote
  #663  
Old 01-30-2012, 12:11 AM
Travis-Mc Travis-Mc is offline
 
Join Date: Sep 2009
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by XManuX View Post
I wanted to give a bigger emphasis on the gallery, thus displaying the link in the main navbar, not in the "forum" sub-bar.

Here are the modifications in the navbar template :

Find:
Code:
{vb:raw template_hook.navtab_end}
Add Below:
Code:
<vb:if condition="!$vboptions['selectednavtab'] AND (THIS_SCRIPT == 'albumall' OR THIS_SCRIPT == 'album' OR THIS_SCRIPT == 'picall')">
			<vb:if condition="$show['member']">
				<li  class="selected"><a class="navtab" href="albumall.php?{vb:raw session.sessionurl}">Gallery</a>
				<ul class="floatcontainer">
					<li><a href="picall.php?{vb:raw session.sessionurl}">Picture Gallery</a></li>
					<li><a href="albumall.php?{vb:raw session.sessionurl}">Album Gallery</a></li>
					<li><a href="album.php?{vb:raw session.sessionurl}do=latest">Latest Albums</a></li>
					<li><a href="album.php?{vb:raw session.sessionurl}u={vb:raw userinfo.userid}">My Albums</a></li>
					<li><a href="album.php?{vb:raw session.sessionurl}do=addalbum">Add Albums</a></li>
				</ul>
			<vb:else />
				<li  class="selected"><a class="navtab" href="albumall.php?{vb:raw session.sessionurl}">Gallery</a>
				<ul class="floatcontainer">
					<li><a href="picall.php?{vb:raw session.sessionurl}">Picture Gallery</a></li>
					<li><a href="albumall.php?{vb:raw session.sessionurl}">Album Gallery</a></li>
					<li><a href="album.php?{vb:raw session.sessionurl}do=latest">Latest Albums</a></li>				
				</ul>
			</vb:if>
		<vb:else />
			<li><a class="navtab" href="albumall.php?{vb:raw session.sessionurl}" >Gallery</a>
		</vb:if>
Find:
Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
Replace With:
Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'albumall' AND THIS_SCRIPT != 'album' AND THIS_SCRIPT != 'picall'">
Done.

Note: the addition in navbar could be easily coded as a hook on navtab_end, not sure that the replacment could be achieved in a "clean" way (ie : not altering the navbar template)

Thank for this! That filled in a couple of gaps for me. I tired using the product that created the links in the NavTab but I didn't like how the the tab wasn't selected when you were in an album. Your replacement works perfectly. Expect that since I'm not using the What's New button, mine looks like this:

PHP Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'albumall' AND THIS_SCRIPT != 'album' AND THIS_SCRIPT != 'picall'"
Anyone have any reasons for or against putting those in an array instead of using so many ANDs? I thought an array would be the way to go but both work I guess.

I also attempted to create a plugin to add the new tab and links. I did them in the same style as you where after you click on the main tab, the other links are in the secondary navigation bar and not in a drop-down. This is more consistent with the rest of the tabs.

Here's the plugin I created. I'm extremely new to this so be easy on me.

Hook: process_templates_complete

PHP Code:
$albumshowmember '';
if (
$show['member'])
{    
$albumshowmember '        <li><a href="album.php?' $sess '&u=' $vbulletin->userinfo['userid'] . '">' $vbphrase['my_albums'] . '</a></li>
                <li><a href="album.php?' 
$sess '&do=addalbum">' $vbphrase['add_album'] . '</a></li>
'
;
}

$tabselected '';
$tablinks '';
if (
THIS_SCRIPT == 'albumall' OR THIS_SCRIPT == 'album' OR THIS_SCRIPT == 'picall')
{
    global 
$vbphrase$vbulletin;
    
$vbulletin->options['selectedalbum']='selectalbum';
    
$tabselected ' class="selected"';
    
$sess $vbulletin->session->vars['sessionurl_q'];
    
$tablinks '            <ul class="floatcontainer">
                <li><a href="albumall.php?' 
$sess '">' $vbphrase['album_gallery'] . '</a></li>
                <li><a href="picall.php?' 
$sess '">' $vbphrase['picture_gallery'] . '</a></li>
                <li><a href="album.php?' 
$sess '&do=latest">' $vbphrase['latest_albums'] . '</a></li>
                '
.$albumshowmember.'';

}            
$template_hook[navtab_end] .= '<li'.$tabselected.'><a class="navtab" href="albumall.php?' $sess '">' $vbphrase['gallery'] . '</a>'.$tablinks.'</li>' 
I created that using a lot of trial and error and copy and pasting using your code, the code provided in this mod, and Lynne's [HOW TO - vB4] Create a New Tab in the navbar. I really don't know how clean or efficient it is, but seems to work so far!

Ok so as was typing all of the above, I discovered that KW802 accomplished everything I was going for in a nice product (just a few posts later) here: https://vborg.vbsupport.ru/showthrea...20#post2199320. It does the same thing but uses a template for the code instead of having all of it in the plugin itself.

Oh well. I guess I just posted another way to do it. For you programmers, is it better to have the code in a template that gets cached or have it all in the plugin like what I did?

A huge thanks to HCGB for creating this and to everyone else who has supported it.
Reply With Quote
  #664  
Old 02-20-2012, 03:23 AM
KProjects KProjects is offline
 
Join Date: Feb 2006
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jpolola View Post
Anybody could please help me how to fix it. Please see picture. I am using 4.1.8 and downloaded gallery 109.
Did you figure this out?

Experiencing the same thing with vbulletin 4.1.10..

I'm using vbadvanced cmps version 4.1.3 - not getting the issue that vbadvanced 'links' users are getting.. I'm getting the blank navtab.

When I use the navbar one xml file, it does not show up in the forum navbar..

Also tested w/ default style... same thing.
Reply With Quote
  #665  
Old 02-26-2012, 01:37 AM
RustyF RustyF is offline
 
Join Date: Feb 2012
Location: Cebu Philippines via Memp
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this plugin or any other plugin import meta data from Adobe Light Room?

I will install it any way as it is useful. I could really use something like that too though.

Thanks
Reply With Quote
  #666  
Old 03-02-2012, 10:35 AM
keyper keyper is offline
 
Join Date: Nov 2011
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I installed Gallery on my vb and everything works like it should, allows me to upload pics, create an album, goes thru the process of uploading pics, and then says that there are no new albums to show. If I click on the thumbnail of the album in the user section (which shows) it says there are no pictures to display.
please tell me what I have missed. maybe a check box that I didn't tick. any help appreciated.

Thanks
Nick
Reply With Quote
  #667  
Old 03-02-2012, 12:51 PM
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
Posts: 3,085
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by keyper View Post
Hi, I installed Gallery on my vb and everything works like it should, allows me to upload pics, create an album, goes thru the process of uploading pics, and then says that there are no new albums to show.
I think you're confused as to what this mod does - which is none of that. Right now probably the best thing you can do is uninstall this and any other mods and make sure your stock vb is working correctly.

PS When uninstalling mods be sure to manually delete any files you uploaded.
Reply With Quote
  #668  
Old 03-02-2012, 11:14 PM
Terminal-Access Terminal-Access is offline
 
Join Date: Sep 2006
Location: United Kingdom
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome mod! iv morked as installed, rated 5 stars and nominated
Additionally i have just upgraded my forums to version 4.1.11 and wish to report this mod is working wonderfully with the new version.
Reply With Quote
  #669  
Old 03-05-2012, 09:38 AM
keyper keyper is offline
 
Join Date: Nov 2011
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Videx View Post
I think you're confused as to what this mod does - which is none of that. Right now probably the best thing you can do is uninstall this and any other mods and make sure your stock vb is working correctly.

PS When uninstalling mods be sure to manually delete any files you uploaded.
Ok so the question is, " When is a gallery not a gallery " <-- When its this MOD??!!
So if I can clarify, your Mod is a gallery mod, which displays photos?? or Not??

and for some reason, now I have photos showing in Albums, which I can find from the gallery Tab............

so yes your reply has confused me. my next question was going to be how can i make the auto resize for displaying the pics bigger, but that will probably be a stupid question to ask here.

so Thanks for the mod, and even though I obviously have no idea what it does, it seems to be working for the most part. :erm:
Reply With Quote
  #670  
Old 03-13-2012, 08:37 PM
laebshade laebshade is offline
 
Join Date: Jul 2010
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This addon groups all albums or pictures as a 'gallery'. It allows you to browse all of them rather than just the latest or recently updated (album.php?do=latest or album.php). It has no functionality for uploading pictures; vBulletin is still left to do that using album.php.
Reply With Quote
  #671  
Old 03-19-2012, 05:34 AM
bloodyred bloodyred is offline
 
Join Date: Mar 2012
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

two words "Remote Linking"
Reply With Quote
Reply


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 10:41 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.13108 seconds
  • Memory Usage 2,389KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (2)bbcode_php
  • (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
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (12)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)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_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