##############################################################
## MOD Title: Full Album Pack
## MOD Author: Mighty Gorgon < mightygorgon@mightygorgon.com > (Luca Libralato) http://www.mightygorgon.com/
## MOD Description: This MOD adds a full Album system, based on several MODS.
##                  In Author Notes you can find more informations about the included MODS.
##                  Some modifications on the original MODS have been applied to make
##                  this package more integrated, flexible and multilanguage.
##                  Some features: Picture SlideShow, Album Image BBCode ([albumimg]),
##                  Image Archive Download, Album Nuffload, Nuffimage, On The Fly Gallery,
##                  Multiple Uploads, Image Rotate/Resizing, Folders Upload Via FTP and many others...
## 
## Instructions for Categories Hierarchy 2.1.6
## 		    Complete all Edits as normally described EXCEPT those changes described after seeing this: ---[ CH 2.1.6 ]---
##		    Bugs and other suggestions can be included at Mighty Gorgon here: http://www.mightygorgon.com/viewtopic.php?t=3576
##
## MOD Version: 1.4.0
## 
## Installation Level: Easy
## Installation Time: 30 minutes
## Files To Edit: (15)
##                profile.php
##                viewonline.php
##                admin/index.php
##                includes/bbcode.php
##                includes/constants.php
##                includes/functions.php
##                includes/page_header.php
##                includes/usercp_viewprofile.php
##                language/lang_english/lang_main.php
##                templates/subSilver/admin/page_header.tpl
##                templates/subSilver/bbcode.tpl
##                templates/subSilver/overall_header.tpl
##                templates/subSilver/profile_view_body.tpl
##                templates/subSilver/simple_header.tpl
##                templates/subSilver/subSilver.cfg
##                
## Included Files: (136)
##                album.php
##                album_allpics.php
##                album_cat.php
##                album_comment_delete.php
##                album_comment_edit.php
##                album_delete.php
##                album_download.php
##                album_edit.php
##                album_hotornot.php
##                album_modcp.php
##                album_nuffload.php
##                album_nuffload_pbar.php
##                album_otf.php
##                album_otf_thumbnail.php
##                album_pclzip_lib.php
##                album_personal_cat_admin.php
##                album_personal_index.php
##                album_pic.php
##                album_pic_nuffed.php
##                album_picm.php
##                album_search.php
##                album_showpage.php
##                album_thumbnail.php
##                album_upload.php
##                admin/admin_album_personal.php
##                admin/admin_album_auth.php
##                admin/admin_album_cat.php
##                admin/admin_album_config_clearcache.php
##                admin/admin_album_config_extended.php
##                admin/admin_album_config_gd_info.php
##                admin/admin_album_config_index.php
##                admin/admin_album_config_personal.php
##                admin/admin_album_config_settings.php
##                admin/admin_album_config_thumb.php
##                admin/admin_album_config_upload.php
##                album_mod/album_acp_functions.php
##                album_mod/album_bbcode.php
##                album_mod/album_common.php
##                album_mod/album_constants.php
##                album_mod/album_exif_info.php
##                album_mod/album_functions.php
##                album_mod/album_hierarchy_auth.php
##                album_mod/album_hierarchy_debug.php
##                album_mod/album_hierarchy_functions.php
##                album_mod/album_hierarchy_sql.php
##                album_mod/album_image_class.php
##                album_mod/album_memberlist.php
##                album_mod/album_nuffimage_box.php
##                album_mod/album_personal.php
##                album_mod/album_watermark.php
##                album_mod/archive.php
##                album_mod/clown_album_functions.php
##                album_mod/fap_alpha.png
##                album_mod/fap_blur.png
##                album_mod/fap_bw.png
##                album_mod/fap_flip.png
##                album_mod/fap_infrared.png
##                album_mod/fap_interlace.png
##                album_mod/fap_mirror.png
##                album_mod/fap_normal.png
##                album_mod/fap_pixelate.png
##                album_mod/fap_recompress.png
##                album_mod/fap_resize.png
##                album_mod/fap_rotate.png
##                album_mod/fap_scatter.png
##                album_mod/fap_screen.png
##                album_mod/fap_sepia.png
##                album_mod/fap_tint.png
##                album_mod/fap_stereogram.png
##                album_mod/fap_watermark.png
##                album_mod/mark.png
##                album_mod/mark_fap.png
##                album_mod/rank.gif
##                language/lang_english/lang_album_admin.php
##                language/lang_english/lang_album_main.php
##                language/lang_english/email/album_notify.tpl
## ---[ CH 2.1.6 ]---
##		  language/lang_english/lang_extend_album_main.php
## ---[ CH 2.1.6 ]---
##                templates/subSilver/album_box.tpl
##                templates/subSilver/album_cat_body.tpl
##                templates/subSilver/album_comment_body.tpl
##                templates/subSilver/album_edit_body.tpl
##                templates/subSilver/album_hon.tpl
##                templates/subSilver/album_index_body.tpl
##                templates/subSilver/album_memberlist_body.tpl
##                templates/subSilver/album_modcp_body.tpl
##                templates/subSilver/album_move_body.tpl
##                templates/subSilver/album_nuffimage_box.tpl
##                templates/subSilver/album_nuffload_pbar_body.tpl
##                templates/subSilver/album_otf_body.tpl
##                templates/subSilver/album_page_body.tpl
##                templates/subSilver/album_personal_body.tpl
##                templates/subSilver/album_personal_index_body.tpl
##                templates/subSilver/album_pic_nuffed_body.tpl
##                templates/subSilver/album_posting_smilies.tpl
##                templates/subSilver/album_search_body.tpl
##                templates/subSilver/album_showpage_body.tpl
##                templates/subSilver/album_slideshow_body.tpl
##                templates/subSilver/album_upload_body.tpl
##                templates/subSilver/admin/album_auth_body.tpl
##                templates/subSilver/admin/album_cat_body.tpl
##                templates/subSilver/admin/album_cat_body_debug.tpl
##                templates/subSilver/admin/album_cat_delete_body.tpl
##                templates/subSilver/admin/album_cat_new_body.tpl
##                templates/subSilver/admin/album_cat_select_body.tpl
##                templates/subSilver/admin/album_config_body_extended.tpl
##                templates/subSilver/admin/album_config_body_extended_vert.tpl
##                templates/subSilver/admin/album_config_clearcache_body.tpl
##                templates/subSilver/admin/album_config_gd_info_body.tpl
##                templates/subSilver/admin/album_config_index_body.tpl
##                templates/subSilver/admin/album_config_personal_body.tpl
##                templates/subSilver/admin/album_config_settings_body.tpl
##                templates/subSilver/admin/album_config_sub_body.tpl
##                templates/subSilver/admin/album_config_thumb_body.tpl
##                templates/subSilver/admin/album_config_upload_body.tpl
##                templates/subSilver/admin/album_personal_body.tpl
##                templates/subSilver/admin/album_personal_cat_body.tpl
##                templates/subSilver/admin/album_personal_cat_delete_body.tpl
##                templates/subSilver/admin/album_personal_cat_new_body.tpl
##                templates/subSilver/images/icon_left_arrow3.gif
##                templates/subSilver/images/icon_mini_album.gif
##                templates/subSilver/images/icon_mini_showall.gif
##                templates/subSilver/images/icon_right_arrow3.gif
##                templates/subSilver/images/nothumbnail.jpg
##                templates/subSilver/images/spacer.gif
##                templates/subSilver/images/blue_dot.png
##                templates/subSilver/images/green_dot.png
##                templates/subSilver/images/orange_dot.png
##                templates/subSilver/images/yellow_dot.png
##                templates/subSilver/images/lang_english/download.gif
##                templates/subSilver/images/lang_english/icon_album.gif
##                templates/subSilver/images/lang_english/manage_pic.gif
##                templates/subSilver/images/lang_english/normal_view.gif
##                templates/subSilver/images/lang_english/show_all_comments.gif
##                templates/subSilver/images/lang_english/show_all_pics.gif
##                templates/subSilver/images/lang_english/show_all_ratings.gif
##                templates/subSilver/images/lang_english/showall.gif
##                templates/subSilver/images/lang_english/simple_view.gif
##                templates/subSilver/images/lang_english/upload_pic.gif
##                
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Author Link Discussion: http://www.mightygorgon.com/forum.php?c=8
## Author Link Discussion @ Smartor Site: http://smartor.is-root.com/viewtopic.php?t=14094
## Author Link Download: http://www.mightygorgon.com/viewforum.php?f=682
## Author Link Demo: http://www.mightygorgon.com/album.php
## 
## Copyrights are of each MODS authors.
## Each MOD author reserve the opportunity for supporting only its own MOD, and not this full package.
## 
## Please check in contrib folder for languages, upgrade instructions and other stuffs.
## 
## Thanks to Smartor, CLowN and IdleVoid for giving me the opportunity
## to create and distribuite their MODS in this Package.
## In CONTRIB folder you can find the original MODS package of each of
## the MODS added here. All additions and integrations between MODS
## have been made by me (Mighty Gorgon).
##
## Thanks to plasma for some language integrations.
##
## Thanks to Minc for providing the webspace for beta testing and for his precious support.
##
## Special thanks to Minc, nuffmon, PaulW, cavallino and sKaZoOoNe, for having tested it,
## and having helped me in bugs fixing and features enhancements.
##
## A big thanks to Artie for being so helpful in supporting my mod @ my site.
##
## Last, but not less important! Thank you to my friend Bicet, who has tested all the package several times
## and who has helped me in solving several issues with the album (and providing me some useful hints
## and pieces of code).
## 
## EasyMod 0.1.13 compliant.
## 
## =======================================
## Upgrading from Smartor Album or older FAP
## =======================================
## If you are upgrading from older versions of Smartor Album and FAP, you should first uninstall
## the modifications listed in the installation files of those mods, and then apply the ones listed here.
## There is no need to remove the SQL part, since you can use "fap_install.php" to upgrade from any old version.
## Just remember that if you are upgrading from older Album version, you may need to run even the
## Personal Galleries migration step from "fap_install.php", just after having installed FAP.
## 
## 
## =======================================
## Features
## =======================================
## 
## On The Fly Gallery
## =======================================
## Folders with pictures may be uploaded into a folder called OTF into album_mod/uploads/
## and thumbnails and categories (based on subfolder) will be automatically generated.
## This feature support only one level of subfolder, so will be browsed for images only
## all the folders into album_mod/uploads/otf/.
## When logged as ADMIN pictures may be automatically imported in the album.
## 
## 
## Picture SlideShow
## =======================================
## All pictures in each category can be shown in SlideShow mode by clicking the link near the cat name
## or in the top right corner while browsing subcat.
## 
## 
## Album Image BBCodes Parsing
## =======================================
## FAP includes its own BBCode parsing function for comments page.
## 
## 
## Album Image BBCode
## =======================================
## Five BBCodes added:
## [fullalbumimg]Picture ID[/fullalbumimg] (Mid Thumb Image)
## [albumimg]Picture ID[/albumimg]
## [albumimgl]Picture ID[/albumimgl] (Left Alignment)
## [albumimgr]Picture ID[/albumimgr] (Right Alignment)
## [albumimgc]Picture ID[/albumimgc] (Center Alignment)
## The user is required to insert only the Picture ID and a thumbnail is attached in the post.
## 
## 
## =======================================
## Other Included MODS:
## =======================================
##
## Photo Album 2.0.54
## =======================================
## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
## MOD Description:
##  This is a phpBB-based photo album/gallery management system.
##  It is really powerful, stable, efficient, rich features and highly customizable.
##  The version 2 was written from the scratch for more security, performance, etc.
##  It is not really a MOD/hack, it is rather a phpBB-based system :)
## 
## 
## Supercharged Album Pack 1.5.1
## =======================================
## MOD Author: Volodymyr (CLowN) Skoryk 
## MOD Description: 
##  A series of modification for Album version 2 by Smartor ( http://smartor.is-root.com ) 
## 
## 
## Album Category Hierarchy 1.3.0
## =======================================
## MOD Author: IdleVoid < idlevoid@slater.dk > (N/A) N/A
## MOD Description: 
##  Adds category hierarchy functionality to the album
## 
## 
## Album Multiple Uploads 1.0.3
## =======================================
## MOD Author: IdleVoid < idlevoid@slater.dk > (N/A) N/A
## MOD Description: 
##  This mod allows people to upload more than one picture at a time.
## 
## 
## Archive Mod
## =======================================
## MOD Author: chadsmith < N/A > (Chad Smith) N/A
## MOD Description:
##  Adds a link to download all the pics in a page as a single compressed zip
## MOD Link: http://smartor.is-root.com/viewtopic.php?t=14096
## 
## 
## Thumbnail Dimension Mod
## =======================================
## MOD Author: nuffmon < nuffmon@hotmail.com > (Nuffmon)
## MOD Description:
##  Places a small black band at the bottom of thumbnails with dimensions and file size on
## MOD Link: http://smartor.is-root.com/viewtopic.php?t=15198
## 
## 
## Picture Rotation Mod
## =======================================
## MOD Author: nuffmon < nuffmon@hotmail.com > (Nuffmon)
## MOD Description:
##  Rotate image on upload
## MOD Link: http://smartor.is-root.com/viewtopic.php?t=11971
## 
## 
## Album Nuffload
## =======================================
## MOD Author: nuffmon < nuffmon@hotmail.com > (Nuffmon)
## MOD Description:
##  Features:
##  - Progress bar when uploading
##  - PHP upload limit bypass
##  - Doesn't use applets or activex
##  - Multiple file uploads
##  - Auto resizing (gif's included)
##  - Manual-uploaded thumbnail supported
## MOD Link: http://smartor.is-root.com/viewtopic.php?t=15093
## 
## 
## Nuffimage
## =======================================
## MOD Author: nuffmon < nuffmon@hotmail.com > (Nuffmon)
## MOD Description:
##  It's a class for images editing.
##  Features:
##  - Sepia
##  - Grayscale
##  - Watermarking
##  - Resizing
## MOD Link: N/A
## 
## 
##############################################################
## MOD History:
## 
##   2006-09-10 - Version 1.4.0
##     Updated to Smartor Album 2.0.54.
##     Updated Nuffload to version 1.4.3.
##     Installation file rewritten.
##     Possibility to upload folders using Album OTF.
##     Possibility to select different watermarks for each category.
##     Quick and secure thumbnails generation.
##     Edited some templates.
##     FAP is now phpBB XS compliant.
##     Thumbnails completely rewritten with GIF support.
##     Fixed some bugs.
## 
##   2006-04-24 - Version 1.2.3
##     Created Album OTF.
##     Added EXIF Info
##     Fixed some bugs.
## 
##   2006-01-28 - Version 1.2.1
##     Fixed some bugs.
## 
##   2006-01-15 - Version 1.2.0
##     Added some BBCodes parsing on album comment.
##     Added optional FX on slideshow.
##     Several templates fixes.
##     Various fixes to Album Avatar (PaulW).
##     PHP5 compatibility (Bicet).
##     Rewritten most of the code in album_showpage.php.
##     Created a page where all posted images could be browsed.
##     Integrated Nuffimage (a very well done class for image editing).
##     Integrated Album Nuffload.
##     Added option to allow GIF to be shown instead of "No Thumbnail".
##     Dynamic Resizing on upload (some tweaks and enhancements on the original mod from Luciano).
##     Pics approval now even for Personal Galleries.
##     Added GD Info in ACP (Bicet).
##     Added Thumbnail Dimension MOD (nuffmon).
##     Added Picture Rotation MOD (nuffmon).
##     Added last pics since last visit (Minc).
##     Watermark support in Mid Thumb ([fullalbumimg]Picture ID[/fullalbumimg]).
##     Mid Thumb BBCode (with Watermark support).
##     Added picture id and pregenerated BBCode in showpage.
##     Admin email notification on new image posted.
##     Download button shown only when upload is authorized.
##     Personal album block in view profile.
##     Album ACP renewed and added lots of switch for disabling some features.
##     SP Config Table dropped and integrated in album config.
##     Lang files integrated into two files.
##     Renamed some functions which caused problems with other phpBB mods.
##     Fixed a lot of minor bugs and templates layout.
## 
##   2005-06-12 - Version 1.0.3
##     Fixed some bugs.
##     Added Album Image BBCode [albumimg], [albumimgl], [albumimgr], [albumimgc].
##     Added Archive Images Download.
##
##   2005-04-23 - Version 1.0.2
##     Fixed some bugs.
##
##   2005-04-23 - Version 1.0.1
##     Added some graphics elements.
##     Fixed authorizations for Personal Galleries.
##     Fixed some minor bugs.
## 
##   2005-04-14 - Version 1.0.0
##     First Release.
## 
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ COPY ]------------------------------------------------
#
# These following instructions mean...
# Upload all files in directory "phpbb_root" with their structure to your phpBB root directory
#
# Remember to upload all the language files and template files to all your
# language packs and template directories
#
# If you use FTP please remember to use ASCII mode for text files (*.php, *.tpl)
# and BINARY mode for image files (*.jpg, *.gif)
# Fortunately good FTP clients today can auto-detect the mode for your files

copy phpbb_root/*.php to *.php
copy phpbb_root/admin/*.php to admin/*.php
copy phpbb_root/album_mod/*.* to album_mod/*.*
copy phpbb_root/album_mod/upload/*.* to album_mod/upload/*.*
copy phpbb_root/album_mod/upload/cache/*.* to album_mod/upload/cache/*.*
copy phpbb_root/album_mod/upload/med_cache/*.* to album_mod/upload/med_cache/*.*
copy phpbb_root/album_mod/upload/otf/*.* to album_mod/upload/otf/*.*
copy phpbb_root/album_mod/upload/wm_cache/*.* to album_mod/upload/wm_cache/*.*
copy phpbb_root/language/lang_english/*.php to language/lang_english/*.php
copy phpbb_root/language/lang_english/email/*.* to language/lang_english/email/*.*
copy phpbb_root/templates/subSilver/*.* to templates/subSilver/*.*
copy phpbb_root/templates/subSilver/admin/*.* to templates/subSilver/admin/*.*
copy phpbb_root/templates/subSilver/images/*.* to templates/subSilver/images/*.*
copy phpbb_root/templates/subSilver/images/lang_english/*.* to templates/subSilver/images/lang_english/*.*
copy cgi-bin/nuffload.cgi to cgi-bin/nuffload.cgi

#*/
#
#-----[ DIY INSTRUCTIONS ]------------------------------------
#
CHMOD these directories for Full Album Pack to work correctly.
.
CHMOD 777 album_mod/upload
CHMOD 777 album_mod/upload/cache
CHMOD 777 album_mod/upload/med_cache
CHMOD 777 album_mod/upload/otf
CHMOD 777 album_mod/upload/wm_cache
.
Change "Path to cgi-in" in Admin CP to a relative path from phpBB root to your cgi-bin
Create folder: cgi-bin/tmp/
CHMOD 777 cgi-bin/tmp/
CHMOD 755 cgi-bin/nuffload.cgi

#
#-----[ SQL ]-------------------------------------------------
#
# You can manually execute "SQL_full_album_pack_1_4_0.txt" instead of run this portion of code
# Or you can copy "fap_install.php" to your phpBB root and execute it from your browser when you're logged in with admin rights
#
CREATE TABLE `phpbb_album` (
	`pic_id` int(11) unsigned NOT NULL auto_increment,
	`pic_filename` varchar(255) NOT NULL default '',
	`pic_thumbnail` varchar(255) NULL default '',
	`pic_title` varchar(255) NOT NULL default '',
	`pic_desc` text,
	`pic_user_id` mediumint(8) NOT NULL default '0',
	`pic_username` varchar(32) NULL default '',
	`pic_user_ip` varchar(8) NOT NULL default '0',
	`pic_time` int(11) unsigned NOT NULL default '0',
	`pic_cat_id` mediumint(8) unsigned NOT NULL default '1',
	`pic_view_count` int(11) unsigned NOT NULL default '0',
	`pic_lock` tinyint(3) NOT NULL default '0',
	`pic_approval` tinyint(3) NOT NULL default '1',
	PRIMARY KEY  (`pic_id`),
	KEY `pic_cat_id` (`pic_cat_id`),
	KEY `pic_user_id` (`pic_user_id`),
	KEY `pic_time` (`pic_time`)
);

CREATE TABLE `phpbb_album_cat` (
	`cat_id` mediumint(8) unsigned NOT NULL auto_increment,
	`cat_title` varchar(255) NOT NULL default '',
	`cat_desc` text,
	`cat_wm` text,
	`cat_order` mediumint(8) NOT NULL default '0',
	`cat_view_level` tinyint(3) NOT NULL default '-1',
	`cat_upload_level` tinyint(3) NOT NULL default '0',
	`cat_rate_level` tinyint(3) NOT NULL default '0',
	`cat_comment_level` tinyint(3) NOT NULL default '0',
	`cat_edit_level` tinyint(3) NOT NULL default '0',
	`cat_delete_level` tinyint(3) NOT NULL default '2',
	`cat_view_groups` varchar(255) NULL default '',
	`cat_upload_groups` varchar(255) NULL default '',
	`cat_rate_groups` varchar(255) NULL default '',
	`cat_comment_groups` varchar(255) NULL default '',
	`cat_edit_groups` varchar(255) NULL default '',
	`cat_delete_groups` varchar(255) NULL default '',
	`cat_moderator_groups` varchar(255) NULL default '',
	`cat_approval` tinyint(3) NOT NULL default '0',
	`cat_parent` mediumint(8) unsigned default '0',
	`cat_user_id` mediumint(8) unsigned default '0',
	PRIMARY KEY  (`cat_id`),
	KEY `cat_order` (`cat_order`)
);

CREATE TABLE `phpbb_album_comment` (
	`comment_id` int(11) unsigned NOT NULL auto_increment,
	`comment_pic_id` int(11) unsigned NOT NULL default '0',
	`comment_cat_id` int(11) NOT NULL default '0',
	`comment_user_id` mediumint(8) NOT NULL default '0',
	`comment_username` varchar(32) NULL default '',
	`comment_user_ip` varchar(8) NOT NULL default '',
	`comment_time` int(11) unsigned NOT NULL default '0',
	`comment_text` text,
	`comment_edit_time` int(11) unsigned NULL default '0',
	`comment_edit_count` smallint(5) unsigned NOT NULL default '0',
	`comment_edit_user_id` mediumint(8) NULL default '0',
	PRIMARY KEY  (`comment_id`),
	KEY `comment_pic_id` (`comment_pic_id`),
	KEY `comment_user_id` (`comment_user_id`),
	KEY `comment_user_ip` (`comment_user_ip`),
	KEY `comment_time` (`comment_time`)
);

CREATE TABLE `phpbb_album_config` (
	`config_name` varchar(255) NOT NULL default '',
	`config_value` varchar(255) NOT NULL default '',
	PRIMARY KEY  (`config_name`)
);

CREATE TABLE `phpbb_album_rate` (
	`rate_pic_id` int(11) unsigned NOT NULL default '0',
	`rate_user_id` mediumint(8) NOT NULL default '0',
	`rate_user_ip` char(8) NOT NULL default '',
	`rate_point` tinyint(3) unsigned NOT NULL default '0',
	`rate_hon_point` tinyint(3) NOT NULL default '0',
	KEY `rate_pic_id` (`rate_pic_id`),
	KEY `rate_user_id` (`rate_user_id`),
	KEY `rate_user_ip` (`rate_user_ip`),
	KEY `rate_point` (`rate_point`)
);

INSERT INTO `phpbb_album_config` VALUES ('max_pics', '1024');
INSERT INTO `phpbb_album_config` VALUES ('user_pics_limit', '-1');
INSERT INTO `phpbb_album_config` VALUES ('mod_pics_limit', '-1');
INSERT INTO `phpbb_album_config` VALUES ('max_file_size', '128000');
INSERT INTO `phpbb_album_config` VALUES ('max_width', '1024');
INSERT INTO `phpbb_album_config` VALUES ('max_height', '768');
INSERT INTO `phpbb_album_config` VALUES ('rows_per_page', '5');
INSERT INTO `phpbb_album_config` VALUES ('cols_per_page', '4');
INSERT INTO `phpbb_album_config` VALUES ('fullpic_popup', '0');
INSERT INTO `phpbb_album_config` VALUES ('thumbnail_quality', '75');
INSERT INTO `phpbb_album_config` VALUES ('thumbnail_size', '125');
INSERT INTO `phpbb_album_config` VALUES ('thumbnail_cache', '1');
INSERT INTO `phpbb_album_config` VALUES ('sort_method', 'pic_time');
INSERT INTO `phpbb_album_config` VALUES ('sort_order', 'DESC');
INSERT INTO `phpbb_album_config` VALUES ('jpg_allowed', '1');
INSERT INTO `phpbb_album_config` VALUES ('png_allowed', '1');
INSERT INTO `phpbb_album_config` VALUES ('gif_allowed', '1');
INSERT INTO `phpbb_album_config` VALUES ('desc_length', '512');
INSERT INTO `phpbb_album_config` VALUES ('hotlink_prevent', '0');
INSERT INTO `phpbb_album_config` VALUES ('hotlink_allowed', 'mightygorgon.com');
INSERT INTO `phpbb_album_config` VALUES ('personal_gallery', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_gallery_private', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_gallery_limit', '-1');
INSERT INTO `phpbb_album_config` VALUES ('personal_gallery_view', '-1');
INSERT INTO `phpbb_album_config` VALUES ('rate', '1');
INSERT INTO `phpbb_album_config` VALUES ('rate_scale', '10');
INSERT INTO `phpbb_album_config` VALUES ('comment', '1');
INSERT INTO `phpbb_album_config` VALUES ('gd_version', '2');
INSERT INTO `phpbb_album_config` VALUES ('album_version', '.0.54');
INSERT INTO `phpbb_album_config` VALUES ('fap_version', '1.4.0');
INSERT INTO `phpbb_album_config` VALUES ('show_index_thumb', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_index_total_pics', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_index_total_comments', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_index_comments', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_index_last_comment', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_index_last_pic', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_index_pics', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_recent_in_subcats', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_recent_instead_of_nopics', '1');
INSERT INTO `phpbb_album_config` VALUES ('line_break_subcats', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_index_subcats', '1');
INSERT INTO `phpbb_album_config` VALUES ('personal_allow_gallery_mod', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_allow_sub_categories', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_sub_category_limit', '-1');
INSERT INTO `phpbb_album_config` VALUES ('personal_show_subcats_in_index', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_show_recent_in_subcats', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_show_recent_instead_of_nopics', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_personal_gallery_link', '1');
INSERT INTO `phpbb_album_config` VALUES ('album_category_sorting', 'cat_order');
INSERT INTO `phpbb_album_config` VALUES ('album_category_sorting_direction', 'ASC');
INSERT INTO `phpbb_album_config` VALUES ('album_debug_mode', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_all_in_personal_gallery', '1');
INSERT INTO `phpbb_album_config` VALUES ('new_pic_check_interval', '1M');
INSERT INTO `phpbb_album_config` VALUES ('index_enable_supercells', '0');
INSERT INTO `phpbb_album_config` VALUES ('email_notification', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_download', '2');
INSERT INTO `phpbb_album_config` VALUES ('show_slideshow', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_pic_size_on_thumb', '1');
INSERT INTO `phpbb_album_config` VALUES ('hon_rate_users', '0');
INSERT INTO `phpbb_album_config` VALUES ('hon_rate_where', '');
INSERT INTO `phpbb_album_config` VALUES ('hon_rate_sep', '1');
INSERT INTO `phpbb_album_config` VALUES ('hon_rate_times', '1');
INSERT INTO `phpbb_album_config` VALUES ('disp_watermark_at', '3');
INSERT INTO `phpbb_album_config` VALUES ('wut_users', '0');
INSERT INTO `phpbb_album_config` VALUES ('use_watermark', '0');
INSERT INTO `phpbb_album_config` VALUES ('rate_type', '2');
INSERT INTO `phpbb_album_config` VALUES ('disp_rand', '1');
INSERT INTO `phpbb_album_config` VALUES ('disp_mostv', '1');
INSERT INTO `phpbb_album_config` VALUES ('disp_high', '1');
INSERT INTO `phpbb_album_config` VALUES ('disp_late', '1');
INSERT INTO `phpbb_album_config` VALUES ('img_cols', '4');
INSERT INTO `phpbb_album_config` VALUES ('img_rows', '1');
INSERT INTO `phpbb_album_config` VALUES ('midthumb_use', '1');
INSERT INTO `phpbb_album_config` VALUES ('midthumb_height', '450');
INSERT INTO `phpbb_album_config` VALUES ('midthumb_width', '600');
INSERT INTO `phpbb_album_config` VALUES ('midthumb_cache', '1');
INSERT INTO `phpbb_album_config` VALUES ('max_files_to_upload', '1');
INSERT INTO `phpbb_album_config` VALUES ('max_pregenerated_fields', '1');
INSERT INTO `phpbb_album_config` VALUES ('dynamic_fields', '1');
INSERT INTO `phpbb_album_config` VALUES ('pregenerate_fields', '0');
INSERT INTO `phpbb_album_config` VALUES ('propercase_pic_title', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_index_last_pic_lv', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_pics_approval', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_img_no_gd', '0');
INSERT INTO `phpbb_album_config` VALUES ('dynamic_pic_resampling', '1');
INSERT INTO `phpbb_album_config` VALUES ('max_file_size_resampling', '1024000');
INSERT INTO `phpbb_album_config` VALUES ('switch_nuffload', '0');
INSERT INTO `phpbb_album_config` VALUES ('path_to_bin', './cgi-bin/');
INSERT INTO `phpbb_album_config` VALUES ('perl_uploader', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_progress_bar', '1');
INSERT INTO `phpbb_album_config` VALUES ('close_on_finish', '1');
INSERT INTO `phpbb_album_config` VALUES ('max_pause', '5');
INSERT INTO `phpbb_album_config` VALUES ('simple_format', '0');
INSERT INTO `phpbb_album_config` VALUES ('multiple_uploads', '1');
INSERT INTO `phpbb_album_config` VALUES ('max_uploads', '5');
INSERT INTO `phpbb_album_config` VALUES ('zip_uploads', '1');
INSERT INTO `phpbb_album_config` VALUES ('resize_pic', '1');
INSERT INTO `phpbb_album_config` VALUES ('resize_width', '600');
INSERT INTO `phpbb_album_config` VALUES ('resize_height', '600');
INSERT INTO `phpbb_album_config` VALUES ('resize_quality', '70');
INSERT INTO `phpbb_album_config` VALUES ('show_pics_nav', '1');
INSERT INTO `phpbb_album_config` VALUES ('show_inline_copyright', '0');
INSERT INTO `phpbb_album_config` VALUES ('enable_nuffimage', '1');
INSERT INTO `phpbb_album_config` VALUES ('enable_sepia_bw', '0');
INSERT INTO `phpbb_album_config` VALUES ('personal_allow_avatar_gallery', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_gif_mid_thumb', '1');
INSERT INTO `phpbb_album_config` VALUES ('slideshow_script', '0');
INSERT INTO `phpbb_album_config` VALUES ('show_exif', '0');
INSERT INTO `phpbb_album_config` VALUES ('album_bbcode', '1');
INSERT INTO `phpbb_album_config` VALUES ('quick_thumbs', '0');

#
#---[ CH 2.1.6 ]--- IGNORE profile.php edit as Full Album Pack does not currently work with CH 2.1.6 Profile.
#-----[ OPEN ]------------------------------------------------
#
profile.php
#
#-----[ FIND ]------------------------------------------------
#
	if ( $mode == 'viewprofile' )
	{
#
#-----[ AFTER, ADD ]------------------------------------------
#
		// Mighty Gorgon - Full Album Pack - BEGIN
		$album_root_path = $phpbb_root_path . 'album_mod/';
		include ($album_root_path . 'album_constants.' . $phpEx);
		// Mighty Gorgon - Full Album Pack - END
#
# 
#---[ CH 2.1.6 ]--- Do NOT do viewonline.php OR admin/index.php edits.  Both edits are now rewritten and combined in a new CH file.  Code is found following admin/index.php is the NEW code placed in a CH file.
#-----[ OPEN ]------------------------------------------------
#
viewonline.php
#
#-----[ FIND ]------------------------------------------------
#
				case PAGE_FAQ:
					$location = $lang['Viewing_FAQ'];
					$location_url = "faq.$phpEx";
					break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
				// Mighty Gorgon - Full Album Pack - BEGIN
				case PAGE_ALBUM:
					$location = $lang['View_Album_Index'];
					$location_url = "album.$phpEx";
					break;
				case PAGE_ALBUM_PERSONAL:
					$location = $lang['View_Album_Personal'];
					$location_url = "album_personal_index.$phpEx";
					break;
				case PAGE_ALBUM_PICTURE:
					$location = $lang['View_Pictures'];
					$location_url = "album.$phpEx";
					break;
				case PAGE_ALBUM_SEARCH:
					$location = $lang['Album_Search'];
					$location_url = "album.$phpEx";
					break;
				// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
admin/index.php [DO NOT DO admin/index.php edits for CH 2.1.6]
#
#-----[ FIND ]------------------------------------------------
#
						case PAGE_FAQ:
							$location = $lang['Viewing_FAQ'];
							$location_url = "index.$phpEx?pane=right";
							break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
						// Mighty Gorgon - Full Album Pack - BEGIN
						case PAGE_ALBUM:
							$location = $lang['View_Album_Index'];
							$location_url = "index.$phpEx?pane=right";
							break;
						case PAGE_ALBUM_PERSONAL:
							$location = $lang['View_Album_Personal'];
							$location_url = "index.$phpEx?pane=right";
							break;
						case PAGE_ALBUM_PICTURE:
							$location = $lang['View_Pictures'];
							$location_url = "index.$phpEx?pane=right";
							break;
						case PAGE_ALBUM_SEARCH:
							$location = $lang['Album_Search'];
							$location_url = "index.$phpEx?pane=right";
							break;
						// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
					case PAGE_FAQ:
						$location = $lang['Viewing_FAQ'];
						$location_url = "index.$phpEx?pane=right";
						break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
					// Mighty Gorgon - Full Album Pack - BEGIN
					case PAGE_ALBUM:
						$location = $lang['View_Album_Index'];
						$location_url = "index.$phpEx?pane=right";
						break;
					case PAGE_ALBUM_PERSONAL:
						$location = $lang['View_Album_Personal'];
						$location_url = "index.$phpEx?pane=right";
						break;
					case PAGE_ALBUM_PICTURE:
						$location = $lang['View_Pictures'];
						$location_url = "index.$phpEx?pane=right";
						break;
					case PAGE_ALBUM_SEARCH:
						$location = $lang['Album_Search'];
						$location_url = "index.$phpEx?pane=right";
						break;
					// Mighty Gorgon - Full Album Pack - END
#
#---[ CH 2.1.6 ]---
#-----[ OPEN ]------------------------------------------------
#
includes/class_stats_online.php
#
#-----[ FIND ]------------------------------------------------
#
			PAGE_FAQ => array('txt' => 'Viewing_FAQ', 'url' => $this->mode == 'in_admin' ? 'admin/index' : 'faq', 'parms' => $this->mode == 'in_admin' ? array('pane' => 'right') : array()),
#
#-----[ AFTER, ADD ]------------------------------------------
#
			// Mighty Gorgon - Full Album Pack - BEGIN
			PAGE_ALBUM => array('txt' => 'Viewing_Album_Index', 'url' => $this->mode == 'in_admin' ? 'admin/index' : 'view_album_index', 'parms' => $this->mode == 'in_admin' ? array('pane' => 'right') : array()),
			PAGE_ALBUM_PERSONAL => array('txt' => 'Viewing_Album_Personal', 'url' => $this->mode == 'in_admin' ? 'admin/index' : 'view_album_personal', 'parms' => $this->mode == 'in_admin' ? array('pane' => 'right') : array()),
			PAGE_ALBUM_PICTURE => array('txt' => 'Viewing_Album_Picture', 'url' => $this->mode == 'in_admin' ? 'admin/index' : 'view_album_picture', 'parms' => $this->mode == 'in_admin' ? array('pane' => 'right') : array()),
			PAGE_ALBUM_SEARCH => array('txt' => 'Viewing_Album_Search', 'url' => $this->mode == 'in_admin' ? 'admin/index' : 'view_album_search', 'parms' => $this->mode == 'in_admin' ? array('pane' => 'right') : array()),
			// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------------
#
	$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Full Album Pack - BEGIN
	// Get Album PIC based on ID
	$bbcode_tpl['fullalbumimg'] = str_replace('{IMG_NUM}', '\\1', $bbcode_tpl['fullalbumimg']);
	$bbcode_tpl['albumimg'] = str_replace('{IMG_NUM}', '\\1', $bbcode_tpl['albumimg']);
	$bbcode_tpl['albumimgl'] = str_replace('{IMG_NUM}', '\\1', $bbcode_tpl['albumimgl']);
	$bbcode_tpl['albumimgr'] = str_replace('{IMG_NUM}', '\\1', $bbcode_tpl['albumimgr']);
	$bbcode_tpl['albumimgc'] = str_replace('{IMG_NUM}', '\\1', $bbcode_tpl['albumimgc']);
	// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
	$replacements[] = $bbcode_tpl['url4'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Full Album Pack - BEGIN
	// [albumimg]image number here[/albumimg]
	$album_img_patterns[1] = "#\[albumimg:$uid\]([0-9]+)\[/albumimg:$uid\]#si";
	$album_img_replacements[1] = $bbcode_tpl['albumimg'];

	// [albumimgl]image number here[/albumimgl]
	$album_img_patterns[2] = "#\[albumimgl:$uid\]([0-9]+)\[/albumimgl:$uid\]#si";
	$album_img_replacements[2] = $bbcode_tpl['albumimgl'];

	// [albumimgr]image number here[/albumimgr]
	$album_img_patterns[3] = "#\[albumimgr:$uid\]([0-9]+)\[/albumimgr:$uid\]#si";
	$album_img_replacements[3] = $bbcode_tpl['albumimgr'];

	// [albumimgc]image number here[/albumimgc]
	$album_img_patterns[4] = "#\[albumimgc:$uid\]([0-9]+)\[/albumimgc:$uid\]#si";
	$album_img_replacements[4] = $bbcode_tpl['albumimgc'];
	// site image-end

	// [fullalbumimg]image number here[/fullalbumimg]
	$album_img_patterns[5] = "#\[fullalbumimg:$uid\]([0-9]+)\[/fullalbumimg:$uid\]#si";
	$album_img_replacements[5] = $bbcode_tpl['fullalbumimg'];

	$text = preg_replace($album_img_patterns, $album_img_replacements, $text);
	// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
	$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Full Album Pack - BEGIN
	// [albumimg]album image id here[/albumimg]
	$text = preg_replace("#\[fullalbumimg\]([0-9]+)\[/fullalbumimg\]#sie", "'[fullalbumimg:$uid]\\1[/fullalbumimg:$uid]'", $text);
	$text = preg_replace("#\[albumimg\]([0-9]+)\[/albumimg\]#sie", "'[albumimg:$uid]\\1[/albumimg:$uid]'", $text);
	$text = preg_replace("#\[albumimgl\]([0-9]+)\[/albumimgl\]#sie", "'[albumimgl:$uid]\\1[/albumimgl:$uid]'", $text);
	$text = preg_replace("#\[albumimgr\]([0-9]+)\[/albumimgr\]#sie", "'[albumimgr:$uid]\\1[/albumimgr:$uid]'", $text);
	$text = preg_replace("#\[albumimgc\]([0-9]+)\[/albumimgc\]#sie", "'[albumimgc:$uid]\\1[/albumimgc:$uid]'", $text);
	// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
include($phpbb_root_path . 'album_mod/album_constants.' . $phpEx);
define('LOGIN_MG', 'login.' . $phpEx);
// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
define('ALBUM_TABLE', $table_prefix.'album');
define('ALBUM_CAT_TABLE', $table_prefix.'album_cat');
define('ALBUM_CONFIG_TABLE', $table_prefix.'album_config');
define('ALBUM_COMMENT_TABLE', $table_prefix.'album_comment');
define('ALBUM_RATE_TABLE', $table_prefix.'album_rate');
// Mighty Gorgon - Full Album Pack - END
#
#
#---[ CH 2.1.6 ]--- Edit for includes/functions.php is placed in includes/CH_functions.php and NOT includes/functions.php
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
	// Behave as per HTTP/1.1 spec for others
	header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url);
	exit;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
//--- FLAG operation functions
function setFlag($flags, $flag)
{
	return $flags | $flag;
}
function clearFlag($flags, $flag)
{
	return ($flags & ~$flag);
}
function checkFlag($flags, $flag)
{
	return (($flags & $flag) == $flag) ? true : false;
}
// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
	'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Full Album Pack - BEGIN
	'L_ALBUM' => $lang['Album'],
	'U_ALBUM' => append_sid('album.'.$phpEx),
	'L_PIC_NAME' => $lang['Pic_Name'],
	'L_DESCRIPTION' => $lang['Description'],
	'L_GO' => $lang['Go'],
	'L_SEARCH_CONTENTS' => $lang['Search_Contents'],
	'L_SEARCH_MATCHES' => $lang['Search_Matches'],
	// Mighty Gorgon - Full Album Pack - END
#
#
#---[ CH 2.1.6 ]--- IGNORE ALL includes/usercp_viewprofile.php edits as Full Album Pack does not currently work with CH 2.1.6 Profile.
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------------
#
$avatar_img = '';
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_album_main.' . $phpEx);

$album_show_pic_url = 'album_showpage.' . $phpEx;
$album_rate_pic_url = $album_show_pic_url;
$album_comment_pic_url = $album_show_pic_url;

$sql = "SELECT * FROM ". ALBUM_CONFIG_TABLE;
if(!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, "Could not query album config information", "", __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
	$album_config_name = $row['config_name'];
	$album_config_value = $row['config_value'];
	
	$album_config[$album_config_name] = $album_config_value;
}
$db->sql_freeresult($result);

$limit_sql = $album_config['img_cols'] * $album_config['img_rows'];
$cols_per_page = $album_config['img_cols'];

if ( ($album_config['personal_gallery_view'] == -1) || ($userdata['user_level'] == ADMIN))
{
	$search_pg = '';
}
else
{
	$search_pg = 'AND c.cat_user_id = 0';
}

$sql = "SELECT * FROM " . ALBUM_TABLE . " AS p, " . ALBUM_CAT_TABLE . " AS c
		WHERE c.cat_user_id = " . $profiledata['user_id'] . "
		AND p.pic_cat_id = c.cat_id
		AND p.pic_approval = 1
		" . $search_pg . "
		ORDER BY pic_time DESC";

if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query recent pics information', '', __LINE__, __FILE__, $sql);
}

$recentrow = array();

while($row = $db->sql_fetchrow($result))
{
	$recentrow[] = $row;
}

$totalpicrow = count($recentrow);

$db->sql_freeresult($result);

if ($totalpicrow > 0)
{
	$temp_url = append_sid("album.$phpEx?user_id=" . $profiledata['user_id']);
	$album_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_album'] . '" alt="' . sprintf($lang['Personal_Gallery_Of_User'], $profiledata['username']) . '" title="' . sprintf($lang['Personal_Gallery_Of_User'], $profiledata['username']) . '" border="0" /></a>';
	$album = '<a href="' . $temp_url . '">' . sprintf($lang['Personal_Gallery_Of_User'], $profiledata['username']) . '</a>';

	$template->assign_block_vars('recent_pics_block', array());
	for ($i = 0; $i < (($totalpicrow < $limit_sql) ? $totalpicrow : $limit_sql); $i += $cols_per_page)
	{
		$template->assign_block_vars('recent_pics_block.recent_pics', array());

		for ($j = $i; $j < ($i + $cols_per_page); $j++)
		{
			if( $j >= $totalpicrow )
			{
				break;
			}

			$template->assign_block_vars('recent_pics_block.recent_pics.recent_col', array(
				'U_PIC' => ($album_config['fullpic_popup']) ? append_sid("album_pic.$phpEx?pic_id=". $recentrow[$j]['pic_id']) : append_sid($album_show_pic_url. '?pic_id='. $recentrow[$j]['pic_id']),
				'THUMBNAIL' => append_sid("album_thumbnail.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
				'DESC' => $recentrow[$j]['pic_desc']
				)
			);

			$template->assign_block_vars('recent_pics_block.recent_pics.recent_detail', array(
				'TITLE' => '<a href = "'.$album_show_pic_url . '?pic_id=' . $recentrow[$j]['pic_id'] . '">' . $recentrow[$j]['pic_title'] . '</a>',
				'POSTER' => $recent_poster,
				'TIME' => create_date($board_config['default_dateformat'], $recentrow[$j]['pic_time'], $board_config['board_timezone']),

				'VIEW' => $recentrow[$j]['pic_view_count'],
				)
			);
		}
	}
}
else
{
	$album_img = '';
	$album = '';
}
// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
	'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// Mighty Gorgon - Full Album Pack - BEGIN
	'ALBUM_IMG' => $album_img,
	'ALBUM' => $album,

	'U_PERSONAL_GALLERY' => append_sid("album.$phpEx?user_id=" . $profiledata['user_id']),
	'L_PERSONAL_GALLERY' => sprintf($lang['Personal_Gallery_Of_User_Profile'], $profiledata['username'], $totalpicrow),

	'U_TOGGLE_VIEW_ALL' => append_sid("album.$phpEx?user_id=" . $profiledata['user_id'] . "&mode=" . ALBUM_VIEW_ALL),
	'TOGGLE_VIEW_ALL_IMG' => $images['mini_all_pic_view_mode'],
	'L_TOGGLE_VIEW_ALL' => sprintf($lang['Show_All_Pic_View_Mode_Profile'], $profiledata['username']),

	'U_ALL_IMAGES_BY_USER' => append_sid("album.$phpEx?user_id=" . $profiledata['user_id'] . "&mode=" . ALBUM_VIEW_LIST),
	'L_ALL_IMAGES_BY_USER' => sprintf($lang['Picture_List_Of_User'], $profiledata['username']),

	'L_PERSONAL_ALBUM' => $lang['Your_Personal_Gallery'],
	'L_PIC_TITLE' => $lang['Pic_Image'],
	'L_POSTER' => $lang['Pic_Poster'],
	'L_POSTED' => $lang['Posted'],
	'L_VIEW' => $lang['View'],
	'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
	'L_NO_PICS' => $lang['No_Pics'],
	'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'],
	'S_COLS' => $album_config['cols_per_page'],
	'S_COL_WIDTH' => (100/$album_config['cols_per_page']) . '%',
	// Mighty Gorgon - Full Album Pack - END
#
#-----[ FIND ]------------------------------------------------
#
$template->pparse('body');
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
if ($album_config['show_all_in_personal_gallery'] == 1)
{
	$template->assign_block_vars('enable_view_toggle', array());
}
// Mighty Gorgon - Full Album Pack - END
#
#
#---[ CH 2.1.6 ]--- IGNORE the language/lang_english/lang_main.php edit as the Include file lang_extend_album_main will replace it
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
$lang['Album'] = 'Album';
$lang['Personal_Gallery_Of_User'] = 'Personal Gallery Of %s';
$lang['Personal_Gallery_Of_User_Profile'] = 'Personal Gallery of %s (%d Pictures)';
$lang['Show_All_Pic_View_Mode_Profile'] = 'Show All Pictures In The Personal Gallery of %s (without sub cats)';
$lang['Not_allowed_to_view_album'] = 'Sorry, you are not allowed to view the album.';
$lang['Not_allowed_to_upload_album'] = 'Sorry, you are not allowed to upload new pic to the album. Please contact the album administrator for more information.';
$lang['Album_empty'] = 'There are no pics in the album<br />Click on the <b>Upload New Pic</b> link on this page to post one.';
$lang['Upload_New_Pic'] = 'Upload New Pic.';
$lang['Pic_Title'] = 'Pic Title';
$lang['Pic_Title_Explain'] = 'It is very important to give your pic a good title. It could be a name, a subject to make others know what it is without see it.';
$lang['Pic_Upload'] = 'Pic Upload';
$lang['Pic_Upload_Explain'] = 'Allowed types are JPG, GIF and PNG. Maximum file size is %s bytes. Maximum image dimensions are %sx%s pixels.';
$lang['Album_full'] = 'Sorry, the album has reached the maximum number of uploaded pics. Please contact the album administrator for more information.';
$lang['Album_upload_successful'] = 'Thank you, your pic has been uploaded successfully.';
$lang['Click_return_album'] = 'Click %shere%s to return to the Album.';
$lang['Invalid_upload'] = 'Invalid Upload<br /><br />Your pic is too big or its type is not allowed.';
$lang['Image_too_big'] = 'Sorry, your image dimensions is too large.';
$lang['Uploaded_by'] = 'Uploaded by';
$lang['Category_locked'] = 'Sorry, you cannot upload because this category was locked by an admin. Please contact the album administrator for more information.';
$lang['View_Album_Index'] = 'Album Index';
$lang['View_Album_Personal'] = 'Viewing Personal Album of a user';
$lang['View_Pictures'] = 'Viewing Pictures or Posting/Reading comments in the Album';
$lang['Album_Search'] = 'Searching the Album';
$lang['Pic_Name'] = 'Picture Name';
$lang['Description'] = 'Description';
$lang['Search_Contents'] = ' that contains: ';
$lang['Search_Found'] = 'Search found ';
$lang['Search_Matches'] = 'Matches:';
// Mighty Gorgon - Full Album Pack - END
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/page_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
#
#-----[ AFTER, ADD ]------------------------------------------
#
/* Mighty Gorgon - Full Album Pack - BEGIN */
.forumline_left {
	background-color: {T_TD_COLOR2};
	border-bottom: 2px {T_TH_COLOR2} solid;
	border-left: 2px {T_TH_COLOR2} solid;
}

.tab_links, a.tab_links:hover, a.tab_links:link, a.tab_links:active, a.tab_links:visited { 
	font-size: 11px;
	color: #FF8866; 
	text-decoration: none;
}

.tab_links_unsel, a.tab_links_unsel:hover, a.tab_links_unsel:link, a.tab_links_unsel:active, a.tab_links_unsel:visited { 
	font-size: 11px;
	color: #FFFFAA; 
	text-decoration: none;
}

a.tab_links:hover, a.tab_links_unsel:hover { 
	text-decoration: underline;
}

.tab_headers, th.tab_headers {
	color: #FF8866; 
	font-size: 11px; 
	font-weight : bold;
	padding-left: 4px;
	padding-right: 8px;
	border: #003366; 
	border-style: solid; 
	border-width: 1px 1px 0px 1px;
	background-color: #006699;
}

.tab_headers_unsel, th.tab_headers_unsel {
	color: #FFFFAA; 
	font-size: 11px; 
	font-weight : bold;
	padding-left: 4px;
	padding-right: 8px;
	border: #336699; 
	border-style: solid; 
	border-width: 1px 1px 0px 1px;
	background-color: #6699AA;
}

.tab_border {
	background-color: #888888;
	border: 1px;
}

.filler, th.filler {
	background-color:#6699AA; 
	background-image:none;
}

.picframe{
	display: block;
	background-color: #FFFFFF;
	border: 1px solid #555555;
	padding: 2px 6px 2px 6px;
	position: relative;
	bottom: 2px;
	right: 2px;
}

.picshadow{
	background-color: #888888;
	color: inherit;
	margin-left: 4px;
	margin-top: 4px;
}
/* Mighty Gorgon - Full Album Pack - END */
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------------
#
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN fullalbumimg --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_picm.php?pic_id={IMG_NUM}" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" border="0" /></a><!-- END fullalbumimg -->
<!-- BEGIN albumimg --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_thumbnail.php?pic_id={IMG_NUM}" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" border="0" /></a><!-- END albumimg -->
<!-- BEGIN albumimgl --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_thumbnail.php?pic_id={IMG_NUM}" border="0" align="left" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" /></a><!-- END albumimgl -->
<!-- BEGIN albumimgr --><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_thumbnail.php?pic_id={IMG_NUM}" border="0" align="right" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" /></a><!-- END albumimgr -->
<!-- BEGIN albumimgc --><center><a href="album_showpage.php?pic_id={IMG_NUM}" target="_blank" class="postlink"><img src="album_thumbnail.php?pic_id={IMG_NUM}" border="0" align="center" alt="Image {IMG_NUM}" title="Image {IMG_NUM}" /></a></center><!-- END albumimgc -->
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
{L_USERGROUPS}</a>&nbsp;
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{L_USERGROUPS}</a>&nbsp;
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
<a href="{U_ALBUM}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_album.gif" width="12" height="13" border="0" alt="{L_ALBUM}" hspace="3" />{L_ALBUM}</a>&nbsp;
#
#
#---[ CH 2.1.6 ]--- IGNORE ALL templates/subsilver/profile_view_body.tpl edits as Full Album Pack does not currently work with CH 2.1.6 Profile.
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<td valign="top"><b><span class="gen">{POSTS}</span></b><br /><span class="genmed">[{POST_PERCENT_STATS} / {POST_DAY_STATS}]</span> <br /><span class="genmed"><a href="{U_SEARCH_USER}" class="genmed">{L_SEARCH_USER_POSTS}</a></span></td>
#
#-----[ REPLACE WITH ]----------------------------------------
#
		<td valign="top">
			<span class="gen"><b>{POSTS}</b></span><br />
			<span class="genmed">
				[{POST_PERCENT_STATS} / {POST_DAY_STATS}]<br />
				<a href="{U_SEARCH_USER}" class="genmed">{L_SEARCH_USER_POSTS}</a><br />
				<a href="{U_PERSONAL_GALLERY}" class="genmed">{L_PERSONAL_GALLERY}</a>
				<!-- BEGIN enable_view_toggle -->
				<a href="{U_TOGGLE_VIEW_ALL}"><img src="{TOGGLE_VIEW_ALL_IMG}" border="0" alt="{L_TOGGLE_VIEW_ALL}" title="{L_TOGGLE_VIEW_ALL}" /></a>
				<!-- END enable_view_toggle -->
				<br />
				<a href="{U_ALL_IMAGES_BY_USER}" class="genmed">{L_ALL_IMAGES_BY_USER}</a>
			</span>
		</td>
#
#-----[ FIND ]------------------------------------------------
#
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
	<td align="right"><span class="nav"><br />{JUMPBOX}</span></td>
  </tr>
</table>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- BEGIN recent_pics_block -->
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
	<tr>
		<th class="thTop" height="25" colspan="{S_COLS}" nowrap="nowrap">{L_RECENT_PUBLIC_PICS}</th>
	</tr>
	<!-- BEGIN no_pics -->
	<tr>
		<td class="row1" align="center" colspan="{S_COLS}" height="50"><span class="gen">{L_NO_PICS}</span></td>
	</tr>
	<!-- END no_pics -->
	<!-- BEGIN recent_pics -->
	<tr>
		<!-- BEGIN recent_col -->
		<td class="row1" width="{S_COL_WIDTH}" align="center">
			<a href="{recent_pics_block.recent_pics.recent_col.U_PIC}" {}><img src="{recent_pics_block.recent_pics.recent_col.THUMBNAIL}" border="0" alt="{recent_pics_block.recent_pics.recent_col.DESC}" title="{recent_pics_block.recent_pics.recent_col.DESC}" vspace="10" /></a>
		</td>
		<!-- END recent_col -->
	</tr>
	<tr>
		<!-- BEGIN recent_detail -->
		<td class="row2" align="center">
			<span class="gensmall">
				{L_PIC_TITLE}: {recent_pics_block.recent_pics.recent_detail.TITLE}<br />
				{L_POSTER}: {recent_pics_block.recent_pics.recent_detail.POSTER}<br />
				{L_POSTED}: {recent_pics_block.recent_pics.recent_detail.TIME}<br />
				{L_VIEW}: {recent_pics_block.recent_pics.recent_detail.VIEW}<br />
			</span>
		</td>
		<!-- END recent_detail -->
	</tr>
	<!-- END recent_pics -->
</table>
<br />
<!-- END recent_pics_block -->
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/simple_header.tpl
#
#-----[ FIND ]------------------------------------------------
#
@import url("templates/subSilver/formIE.css");
#
#-----[ REPLACE WITH ]----------------------------------------
#
/* @import url("templates/subSilver/formIE.css"); */
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Mighty Gorgon - Full Album Pack - BEGIN
$images['icon_left_arrow3'] = "$current_template_images/icon_left_arrow3.gif";
$images['icon_right_arrow3'] = "$current_template_images/icon_right_arrow3.gif";
$images['no_thumbnail'] = "$current_template_images/nothumbnail.jpg";
$images['spacer'] = "$current_template_images/spacer.gif";
$images['mini_new_pictures'] = "$current_template_images/icon_minipost_new.gif";
$images['mini_all_pic_view_mode'] = "$current_template_images/icon_mini_showall.gif";
$images['icon_album'] = "$current_template_images/{LANG}/icon_album.gif";
$images['manage_pic'] = "$current_template_images/{LANG}/manage_pic.gif";
$images['upload_pic'] = "$current_template_images/{LANG}/upload_pic.gif";
$images['download_pic'] = "$current_template_images/{LANG}/download.gif";
$images['all_pic_view_mode'] = "$current_template_images/{LANG}/simple_view.gif";
$images['normal_pic_view_mode'] = "$current_template_images/{LANG}/normal_view.gif";
$images['show_all_pics'] = "$current_template_images/{LANG}/show_all_pics.gif";
$images['show_all_ratings'] = "$current_template_images/{LANG}/show_all_ratings.gif";
$images['show_all_comments'] = "$current_template_images/{LANG}/show_all_comments.gif";
$images['orange_dot'] = "$current_template_images/orange_dot.png";
$images['blue_dot'] = "$current_template_images/blue_dot.png";
$images['green_dot'] = "$current_template_images/green_dot.png";
$images['yellow_dot'] = "$current_template_images/yellow_dot.png";
// Mighty Gorgon - Full Album Pack - END
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
