The same problem occurs if I set
$show_subdirs_first=false;
Here is the contents of my my_config.php:
Code:
<?php
/*************************
Copyright (c) 2004-2006 TinyWebGallery
written by Michael Dempfle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
TWG version: 1.4
$Date: 2006/04/06 10:00 $
**********************************************/
/* Configuration v1.4 - Please use line wrap to see the documentation of each parameter
or go to the website. The parameters are now nicely grouped
**********************************************************************
----------------------- PLEASE NOTE ------------------------
**********************************************************************
Don't make any changes here! Use the file my_config.php.
This makes it easier for migration to a new version and gives you a
better overview about your changes!
**********************************************************************
----------------------------------------------------------------------
**********************************************************************
*/
/*
Settings you should adapt to your website. The title "Welcome to the Tiny Web Gallery" is language
dependant and stored in the language files - Please change it too!
*/
$default_language = "br"; // The gallery is started with this language if no language from the browser can be read. This language file has to exist! To add a new language you have to translate one of the existing language file (e. g. language/language_de.php - the name of the needed flag is language/language_de.gif) and copy it in the language directory (+ the flag).
$titelpassword = "removed"; // The password used for entering titles, delete comments, rotate images permanently and send user notifications!
$privatepassword = "removed"; // = "test" - To protect a gallery with a password you have to create an empty file with the name 'private.txt' in the directory you want to protect. If you want to protect a gallery with a different password you have to enter the password in the 'private.txt' file.
$enable_external_privategal_login=false; // new 1.2 - enables/disables to login a private gallery with a password - the password has to be added as parameter twg_private_login=<password>. The password is the plain password! - when the administration is available I will add a kind of encryption.
$encrypt_passwords=false; // new 1.2 - enable/disable encryption of passwords! - if you change this to true you have to generate your passwords with the provided password.php. Sha256 is used for the encryption. TWG has a password.php (or the TWG Admin) where you can generate your passwords!
$autogenerate_private_png = true; // new 1.6 - true : password protected galleries shows the 1st image with a lock on it - false: only the lock is displayed! - if you want to use your own: use private.png - the generated images are stored in the cache with the prefix pi_
$browser_title_prefix="Fabricio Breve - Galeria de Fotos"; // new 1.2 - This is the title which is shown in the browser title - you may change this to the name of your gallery
$default_gallery_title="Bem-Vindo a galeria de fotos de Fabricio Breve"; // new 1.3 This is the default title shown on the main page if no real $lang_titel is specified in the language file. If you want to have different titles for a language please adapt the language files!
$encrypt_passwords=false; // new 1.2 - enable/disable encryption of passwords! - if you change this to true you have to generate your passwords with the provided password.php. Sha256 is used for the encryption. Passwords titelpasswort and adminpasswort are NOT encrypted!! only privatepasswort!! see password_file and the how-to for more info!! TWG has a password.php where you can generate your passwords!
$metatags="Galeria, Fotos, Fabricio, Breve, Igreja, Evangelho, Quadrangular, Acampamento, Nova, Vida, Rio, Claro, Grêmio, Madalena, Ginástico, Confraria, Habibs, Churrasco, Culto, Gospel, Oficina, G3, Recital, Aniversário, Michael, Smith, Encontro, Jovens, David, Quinlan, Conjubanesp, Imagem, Foto, Fotografia, Comentário, Votação"; // new 1.3 - You can add the content of an individual metatag here. separte the entries with an ',' . Makes your gallery better to find in the web - metatags are only generated if $php_include=false
$metadescription="Galeria de Fotos, Fabricio Breve, Igreja do Evangelho Quadrangular, Acampamento, Igreja Evangélica Nova Vida, Rio Claro, São Carlos, Natal, Manaus, Aniversários, Grêmio, Madalena, Ginástico, Confraria, Habibs, Churrasco, Culto, Gospel, Oficina G3, Recital, Michael W Smith, Morumbi, Encontro de Jovens, David Quinlan, Conjubanesp, Imagem, Foto, Fotografia, Comentário, Votação"; // // new 1.6 - You can add the content of an individual metatag description here. Separte the entries with an ',' . Makes your gallery better to find in the web - metatags are only generated if $php_include=false If nothing is provided the default TWG metatag description is used!
/*
Here you can adapt all the directories - normally there is no need to change something here
Make sure to set the permissions correctly (if you want to include the index.php read the description behind $install_dir)
*/
$iframe_include=false; // new 1.4 - When you include your galerie in an iframe set this to true - if not included a different doctype is used that does better layouting for ie - if included the doctype has to ce changed to avoid the reserved right border for the scrollbar. ie does not show all hover effects anymore if you set this to true!
$php_include=false; // new in 1.2 - This has to be set to true if you include (with include ....) - see the settings below !!
$install_dir = ""; // new 1.2 - This is ONLY needed if you include (with include ....) twg with php into an existing php page and twg is in a subdirectory! you have to enter the path from your including page to the twg installation e.g. "TinyWebGallery/". The / at the end is needed!
$ignore_parameter = array('file'); // new 1.2 - Some parameters are not wanted to be added to all twg links - (e.g. cmsphp - file parameter) - make an array with the parameters here !
$include_y_bottom=0; // not used yet ! - will be implemented sometimes if someone needs it - will be used if twg is included in a php page and something is below this offset is the height of this bottom part - this can be calculated but most browsers do his wrong ;).
$disable_frame_adjustment_ie=false; // new 1.3 - ie has a bug in i_frame adjustment! - if you integrate twg and the i_frames are all right in ff but totally rearranged in ie set this to true!
$basedir = "../../fotos"; // The directory where the directories with the images has to be copied. The path has to be relative no absolute paths are allowed here!
$cachedir = "cache"; // The directory where all generated images are cached. This directory has to be made read- and writeable on the web server. The path has to be relative no absolute paths are allowed here!
$counterdir = "counter"; // The directory where all counter stuff is stored. This directory has to be made read- and writeable on the web server. The path has to be relative no absolute paths are allowed here!
$xmldir = "xml"; // The directory where all image titles and comments is stored. This directory has to be made read- and writeable on the web server. The path has to be relative no absolute paths are allowed here!
/*
Skin Settings
This are the settings to activate a skin - this are the default settings for the gallery.
A skin does most of the time overwrite the next settings! A skin can also set non visual
settings to - but it is not recommended to do this! Read the Skins howto if you want to
share your gallery layout with others.
*/
$skin=""; // as default no skin is used - in the download are "black","green","transparent","winter" and "newyork" . All other style settings are still valid (check howto 9). Some of the skin have a background! Check the Skins howto to create your own skin or look in the forum of TWG - there is a skins section. if you change the skin you have to delete the *.slide.jpg images in the cache folder!
$background_default_image=$install_dir . ""; // normally you put the background in the stylesheet! but if you want to use a dynamic background the image has to be here - skins overwrite this setting if they have a background image
$use_dynamic_background=false; // If you want a dynamic background that resizes with the browser size you have to set this to true and set a $background_default_image - skins overwrite this setting if they have a background image - this does slow down the motion gallery in FF and a litle bit in ie - for opera it is disabled because it is too slow! - please don't use this if you don't like that!
$resize_only_if_too_small=false; // if you have this to true the image is not made smaller than the original its only made bigger - if false it is resized all the time!
$slideshow_backcolor_R = 255; // for the slideshow are images created which are $small_pic_size x $small_pic_size
$slideshow_backcolor_G = 255; // therefore we need a background color that has to match the color in the style sheet (see the comment there)
$slideshow_backcolor_B = 255; // default is white - the values are the RGB values in decimals!
$comment_corner_size=5; // new 1.1 - when an image has a comment the right upper corner is make white by default. This value determines the size of this corner
$comment_corner_backcolor_R = 255; // new 1.2 this are the colors of the comment corner (RGB value in decimal)
$comment_corner_backcolor_G = 255;
$comment_corner_backcolor_B = 255;
$enable_drop_shadow=true; // new 1.3 - you can enable/disable the default border of the image - there is a drop shadow defined in style.css -> div.twg_img-shadow - This looks very good if you have white backgrounds if not - don't use it ;)
/*
Here you can set image sizes, number of images displayed on each page ...
*/
$menu_x = 4; // Number of galleries which are shown in a row on the overview page.
$menu_y = 3; // Number of rows on the overview page.
$hidemenuborder = false; // new 1.3c - Shows or hides the menu border - is not done in the sylesheet because the style is used more often
$autodetect_maximum_thumbnails=true; // new 1.2 - twg tries to display as much thumbnails as possible without creating scrollbars - is turned off in low bandwidth mode!
$thumbnails_x = 6; // Number of images in a row on the thumbnail page.
$thumbnails_y = 4; // Number of images in a column on the thumbnail page.
$number_top10 = ($thumbnails_x * ($thumbnails_y -2)) + 1; // Number of images that are shown in the top views page. The existing calculation (13) works nice with the existing layout; The last row of the top x is alwys filled - therefore more then number_top10 images can be shown!
$small_pic_size = 400; // max pic size - please read the description of $use_small_pic_size_as_height (at the end) before you set this!
$resize_only_if_too_big=false; // new 1.3 - If images are equal or smaller they are not resized if true. You can save disk space if you set this to true and resize all pictures with an external program before uploading. watermarks are not generated on his images becasuse the are not touched at all! if you need them - please insert them by yourself because you wanted to keep the quality of the images.
$use_small_pic_size_as_height=true; // new 1.1 - use small_pic_size as height! - the small pic size restricts the picture to a maximum height and width of small_pic_size - therefore vertical and horizontal images have the same maximum side length. If you set this switch to true the size is used as maximum height. vertical images are then smaller then horizontal - but when you watch the images the navigation does not jump to the bottom if a vertical image is coming - If you use this please decrease the picture size by ~1/3 to get the vertical images in the same size as before (and delete the cache!!). The cross fade slideshow does appear smaller because the horizontal images are here still as big as the vertical ones.
$maxXSize = 800; // new 1.2 - If you have panorama images you can restrict the maximum width of an image - $use_small_pic_size_as_height has to be true that this restriction is needed! A panorama is assumed if the width/height > 1.5!
$thumb_pic_size = 120; // the thumbnail size - check the $show_clipped_images description. If this is set true the thumbnails appear bigger
$menu_pic_size_x = 120; // size of the gallery overview pictures - has to be dividable by 2 if using $show_colage=true; if $show_colage=false; please use the same scale as the pictures have to get the nicest results.
$menu_pic_size_y = 120;
$compression = 75; // quality of the generated jpegs - best = 100 - but biggest size !!
$compression_thumb = 80; // new 1.3 - quality of the generated thumbnail jpegs - best = 100 - but biggest size !! I make them better quality because they are really small
$show_clipped_images=true; // new 1.1 - clipped images in the thumbnail view - all images will be shown as squares - if you change this - delete all thumbnails in the cache!!! The size of the images (x and y) will be $thumb_pic_size! remember - all thumbnails are squares then on the detail page you cannot see if a image is horizontal or vertical. remove all thumbnails from the cache folder after changing this!
$center_clipped_images_horizontal=true; // new 1.3 - center clipped images horizontal if true
$center_clipped_images_vertical=false; // new 1.3 - center clipped images vertical if true
$show_colage = true; // shows collage on the main page or the 1st image - you have to change the size of some preset images!
$use_random_image_for_folder=true; // new 1.2 - if true a random image of this folder is picked for the collage or the image which is shown in a folder icon.
$show_languages_as_dropdown=false; // new 1.2 - show language flags or as a kind of dropdown
$folder_effect="fade"; // new 1.4 - there are 3 effects for the main gallery view "fade", "gray" and "change" (change the images with another from the directory on mouseover!) - if you don't want an effect use "" or "none" - this effects looks best under ie - ff does some flickering in modus fade! - gray only works for ie (fade effect in ff as backup) - fade only for ie and ff - change for all browsers!
$fading_level = 80; // new 1.4 - this is the level a picure is blured - 100 is max visibility!
$gray_fading_level = 50; // new 1.4 - gray is only available for ie - other browsers fade with this setting
$fade_all=true; // new 1.4 - normaly only the image over the mouse is changed - if you set this to true all images of the collage are changed.
$use_random_image_for_change=true; // new 1.4 - if true a random image from the folder is used for switching - if false the one from the colage is used
$other_file_formats=array("avi" => "buttons/wm_avi.png", "mpg" => "buttons/wm_mpg.png","mpeg" => "buttons/wm_mpg.png", "gif" => "buttons/wm_gif.png", "pdf" => "buttons/wm_pdf.png", "mp3" => "buttons/wm_mp3.png", "divx" => "buttons/wm_divx.png", "png" => "buttons/wm_png.png"); // new 1.4 - other file formats that can be downloaded - the ist parameter is the extension, the 2nd is the watermark image - If you don't like a watermark please use the wm_none.png file. The downloads are direct downloads - if it does not work check if the directory or filename conain special characters ...
$watermark_position=5; // new 1.4 - you can define the location of the watermark with this setting (top: 1 2 3, middle: 4 5 6, bottom: 7 8 9
$watermark_transparency=30; // new 1.4 - you can also set the transparency of your watermark. 0 is no transparency - 100 max; Try your logo with different settings to get best results
/*
Here you can set some default settings which can be changed by the user or by url or shown in the options panel
The settings where you don't have a String like 'FALSE' can be changed with an url parameter -
*/
$show_only_small_navigation = 'FALSE'; // new 1.2 - default if only the small navigation is shown. 'TRUE' shows only the small navigation
$disable_nav_sel=false; // new 1.4 - You can disable the option that someone can enable/disable the big navigation
$default_big_navigation="DHTML"; // new 1.1 - There are tree types of big Navigation - normal (value "HTML"), dhtml (value "DHTML") and htmlside ("HTML_SIDE")- the new HTML_SIDE version shows the thmbnails right and left next to the image! $numberofpics is the TOTAL number of images shown - 5 = 2 left, 2 right images - The dhtml version does a lot of preloading - please do not use this if you have a lot of images in a directories or your expected users don't have fast connections "HTML" = normal; "DHTML" = dhtml version (much cooler :))
$numberofpics=5; // new 1.3 - number of pictures that are displayed in the thumbnail strip off the image page - only 3,5,7 and 9 are tested - more does not make sense I would say :) !! The number has to be uneven!
$numberofpics_html_side = 9; // new 1.4 - If you switch to the html side mode another number of preview images sometimes make sense - 9 means 4 on each side
$disable_nav_big_sel=false; // new 1.4 - You can disable the selection of another big navigation - especially if you have a layout that would be killed by another navigation!
$html_side_break=2; // new 1.4 - This is for HTML_SIDE only. you can specifiy how many images are in one row. if you show e.g. 4 images on ech side you can set this to 2 which shows an 2x2 block - if you set this to 1 you have all thumbs in one column
$html_side_space_optimization=true;// new 1.4 - if you set this to true and select the 1st image still images are shown on the left side - if false no images would be on the left side if the 1st is selected - same for the end! if you have numberofpics_html_side - 1 images a special treatment is used - the images are static and you can always selct one of the numberofpics_html_side - 1 thumbnails.
$html_side_show_dividor=true; // new 1.4 - if html_side_space_optimization is true and you e.g. click on the 2nd image the 1st thumbnail is shown and after wards the 3rd 4th and 5th on the left side - the dividor is added between the thumb of image 1 and 3 the show the user where the image belong in the order. If set to false this dividor is not shown.
$show_slideshow=true; // new 1.3 - Enables / disables the slideshow functionality of TWG
$show_optimized_slideshow=true; // new 1.3 - Shows/hides the optimized slideshow option in the options menu - if true: $twg_slide_type should not be 'TRUE'!
$show_maximized_slideshow=true; // new 1.3 - Shows/hides the maximized slidshow option in the options menu - if true: $twg_slide_type should not be 'FULL'!
$twg_slide_type = 'TRUE'; // new 1.1 - define the default slideshow type - 'TRUE' is the cross fade version, 'FALSE' the normal version, 'FULL' the maximized version!
$twg_slideshow_time = '5'; // new 1.1 - Defines the default slideshowtime
$show_border='TRUE'; // new 1.2 - default for the border around the gallery. If the url parameter twg_withborder is set this value is not used. Valid values 'TRUE' and 'FALSE';
$enable_maximized_view=true; // new 1.3 - = fullscreen modus - This modus is intended for people who want to show their images like in a slideshow but with manual navigation. The images are not cached in this modus because they can get very big! If php_include is true this modus is disabled because the detection dows not work properly!
$default_is_fullscreen=false; // new 1.3 - default is started in full screen - Should be false as default and only be set to true with the options
$show_warning_message_at_maximized_view=true; // new 1.2 - enable/disable a JavaScript warning that tells the user that switching to the maximized view is quite slow ;).
$show_caption_at_maximized_view=true; // new 1.3 - show the caption in full screen modus at the bottom
/*
In this section you can enable or disable main features of TWG
*/
$show_comments = true; // enable comments and shows them below the pictures !! - if you set this to false make sure that the $topx_default does not point to comments
$show_comments_menue = true; // new 1.4 - you can disable the entry in the menu - but still enter it at the bottom - see $show_enter_comment_at_bottom
$show_enter_comment_at_bottom=true; // new 1.2 - shows the comment link additionally below the picture! - if you set this to true you should maybe $show_comments_in_layer set to false !
$show_number_of_comments=true; // new 1.3 - Show the number of entered comments next to the comment text
$show_comments_in_layer=true; // new 1.3 - Show the comments in a big layer instead below image - makes a nicer layout!
$height_of_comment_layer=250;// new 1.3 - The additional height of the layer where the comments are shown.
$show_number_of_pic = true; // show the number of images in a gallery in the overview.
$show_count_views = true; // shows the views counter in the right corner in the details view - this is quite slow because it has to read and write the counterxml file every time. (This is still not multithreading safe - but good enough for the gallery!)
$show_login = true; // new 1.2 - enables/disables the login button in the right upper corner
$show_captions = true; // new 1.4 - you can hide the menu element to enter a caption
$show_optionen = true; // new 1.2 - enables/disables the options button in the right upper corner on the details page
$show_new_window = true; // true; // new 1.2 - enables/disables the "new window" button in the right upper corner and in the options pane.
$new_window_x="auto"; // new 1.1 - the size of the new window - this setting work nice for the actual settings - please change them if you change the image sizes
$new_window_y="auto"; // new 1.2 if you enter "auto" at this point for both values it is resized to the maximum your screen can do ;)
$enable_download = true; // enable download of original files
$enable_download_counter=true; // new 1.3 - Enables the counting of download of an image - $enable_direct_download has to be set to false
$enable_direct_download=false; // new v1.1 - does only work with $enable_download=true - you can select if the original images are linked directly or if a call goes to a php page which returns the image. true: shows the image in the browser and it's easy for someone to go to your image directory and browse even into protected folders - please don't use this if you have protected galleries false: shows a download window where you can save the image. This is much saver but people with slow connections have sometimes problems downloading properly (reported by some users - therefore I added the direct download) - please test on your system if the recommended "false" setting work! Attention: if your filename does contains characters like äöü... you get a "you don't have permissions" warning on my windows system please don't use this characters if you using direct download - thanks
$open_download_in_browser=true; // new v1.1 - Opens the original file as download or in the browser: true: in the browser; false as download
$open_download_in_new_window=true; // new 1.3 - should be true if open in browser is true because the dhtml jumps back to the initial image and not to he last!
$open_as_popup=false; // new 1.4 - true: opens the new window as popup - false: opens the new window as new browser - works for direct download as well - but be careful with the files and foldernames here - There is a php and Javascript mix - Don't usw special characters like &§$% for album and folder names!
$show_rotation_buttons=true; // new 1.1 - show the rotation buttons ; true - shows them; false - hides them - if the rotation function cannot be defected by function_exists the rotation buttons are not shown at all!
$show_big_left_right_buttons=false; // new 1.1 - shows the left - right buttons in the HTML navigation (they are never shown at the DHTML navigation!)
$enable_counter=true; // new 1.2 - enable/disable the counter in the left lower corner
$show_counter=true; // new 1.2 - show the counter - if not shown the counter is still counting!
$show_today_counter = true; // new 1.2 - show the counter of today or only the overall counter
$enable_counter_details=true; // new 1.2 - enable/disable the detail popup when you move over the user counter
$enable_counter_details_by_mouseover=true; // new 1.2 - If true the counter history does popup by moving over the counter, If false is by clicking on the counter!
$show_help_link=true; // new 1.2 - Shows the help link
$show_first_last_buttons=true; // shows the first and last buttons on the details page in the upper navigation
$enable_dir_description_on_image=false; // new 1.2 - shows/hides a directory description on the image page if existing. you can use the image.txt as well - see the howto's!
$show_translator=false; // new 1.2 - shows/hides the name of the translator if he/she was specified in the language file.
$show_image_rating=true; // new 1.3 - Enables the rating of images
$show_rating_security_image=false; // new 1.3 - enables an additional page where you have to enter a 4 digit security number that is shown on an image - used to prevent robots to vote!
$image_rating_position="over_image";// new 1.3 - Position of voting. Valid entries: menu, over_image, below_navigation
$enable_download_as_zip=true; // new 1.3 - you can enable that whole dirs can be downloaded if a zip is provided - see the howto
$show_enhanced_file_infos=true; // new 1.3 - Shows the "Info" of an image in the menu
$show_download_counter=true; // new 1.3 - Shows the download counter in the info box.
$show_exif_info=true; // New 1.3 - Shows the "Exif Info" of an image in the iframe
$show_topx=($show_comments || $show_image_rating || $enable_download_counter || $show_count_views); // before show_count_views was used but now we have much more view! - be sure to enable at least one of the topx things (views, downloads, rating, comments!)
$show_topx_comments_details = true; // new 1.3 - shows the latest comment next to the image - false - view like the other one !
$topx_default="views"; // new 1.3 - "views","comments","dl","votes","average";
$show_search=true; // new 1.3 - shows the search
$preselect_caption_search=true; // new 1.3 - Preselect the caption checkbox in the search window
$preselect_comments_search=true; // new 1.3 - Preselect the comments checkbox in the search window
$preselect_filenames_search=true; // new 1.3 - Preselect the file names checkbox in the search window
$show_topx_search_details = false; // new 1.3 - If you want a more detailed view for the search set this parameter to true - If you want more thumbnails and less text use false here! If you include TWG with php_include please use true here!
$image_txt_position="bottom"; // new 1.4 - top,bottom,side - if you use side you have to provide an image.txt AND an image2.txt - image.txt is used for the left, image2.txt for the right side nex to the image! - image.txt does a include of the whole text that is in the file - you can even use php in there! At all other .txt files only the first line is read! You should use a div with a fixed width for he sides! IE does someimes bad rendering if his is not the case!
$show_public_admin_link=true; // new 1.4 - enables disables the link to the admin area !
$open_in_new_window=false; // new 1.5.3 - you can define how the administration from the frontend is opened - true = new window, false = same window
$show_changes=7; // new 1.5.3 - you can highlight the galleries that are newer then x days. 0 does not show highlighting - e.g. 7 highlights galleries that have a file date newer than 7 days. the highlight is shown recursive! if a file is changed in a dir normally der date of the dir is updated too! The style in style.css is 'highlight'. The icon is based on the date of the folder! If you copy new image to a folder and the time of the folder is not updated (this is system dependent) you can simply rename the folder twice to get a new date on this folder.
$show_changes_type="image"; // or "highlight" - ...
$show_tags = true; // New 1.6 - Show the top tags - the search for tags and the posiblility to enter tags at the detail page when logged in.
$number_of_top_tags = 40; // New 1.6 - Number of maximum entries that are shown in the top tags iframe
$number_of_top_tags_results = 20; // New 1.6 - Number of results that are shown in the search for a tag after selecting it in the top tags iframe
$iptc_fields_for_imagetags= array("2#025"); // New 1.6 - IPTC offsets that are used for image tags - right now: keywords
$iptc_fields_for_dirtags=array("2#020"); // New 1.6 - IPTC offsets that are used for album tags - right now: sub-categories
$iptc_fields_for_caption= array("2#105","2#005"); // New 1.6 - IPTC offsets that are used for the caption when captions are extracted in TWG Admin or after the upload
$add_iptc_at_upload=true; // New 1.6 - Extract the IPTC data (tags and caption) and stores it in the xml file during upload with the TWG upload flash - for html bakckup it is not implemented - you have to use the "Exctact IPTC data" function in TWG Admin then.
$enable_album_tree = true; // New 1.6 - You can display an explorer like album tree on the left side - this is a bonus feature for registered users :).
$album_tree_default_open = true; // New 1.6 - Shows/hides the tree when you open the gallery.
$autoclose_tree = true; // New 1.6 - You can make the tree autoclose by default if you click on it. Otherwise it stays open until you close it - you can change this behavior by the small marker in the right upper corner of the tree.
$album_tree_width = 200; // New 1.6 - The width of the album tree.
$left_htm_width = 150; // New 1.6 - TWG does support a file called left.htm - works like header.htm - only at the left side - You can put your own navigation there without haveing the troube to integrate TWG to your layout.
$enable_frontend_upload = true; // New 1.6 - You can enable/disable the upload in the frontend. You have to enable this AND create users in the backend that have the permission to upload in the frontend!
$use_login_short_menu = true; // New 1.6 - If you are logged in you get a couple of more entries in the menu. To keep your layout the fixed menu items can be displayed shorter (!st letter and a . Info -> I.) if you set this to true.
/*
In this section you can customize internal features of TWG
If you change something of the sorting: the directory structure is cached - close your browser once after changing this parameter!
*/
$skip_thumbnail_page = false; // Skip thumbnail page - if you set this to true, the thumbnail page is not displayed - be careful if you have subdirectories some levels cannot be displayed if a level before has pictures as well (like the demo) - the up button does always jump to the overview page!
$sort_images_ascending = true; // new 1.1 - true: sorts the images ascending; false: descending (date and filename!)
$sort_by_date = true; // new 1.1 - sorts the images by name if set to false - if set to true it tries to read the image exif data first - if this fails it uses the filetime to sort! - read the faq for the settings you need on your server to get exif data! if you have a lot of images in a dir setting this to true could slow down the gallery because the data is read every time a directory is read
$sort_by_filedate=false; // new 1.2 - uses the last modified file date and is not searching for exif data. If false is looks for exif data and uses the file time only if no exif data is available.
$sort_albums = true; // new 1.2 - sometimes sorting is not wanted - I cannot tell how the sorting will be - but maybe exactly how you like it (most of the time it is the order the directories are created!)
$sort_albums_ascending = false; // true: sorts the albums ascending (if $sort_album_by_date true = oldest first); false: descending () - directory struture is cached - close your browser once after changing this parameter!
$sort_album_by_date=true; // new 1.3 - enables sorting of folders by last modified date - directory structure is cached - close your browser once after changing this parameter!
$autodetect_filenames_as_captions=true; // if true the filename is taken as caption if the filename contains less then 4 numbers (e.g. Hello. jpg is o.k, CIM12345.job is not). if false - filenames are not used;
$autodetect_filenames_as_captions_number=3; // new 1.2 - if you set $autodetect_filenames_as_captions = true you can set the number of numbers that are allowed in a filename that it is used as caption. e.g. setting this to 3 means 3 numbers are allowed in a filename to be used as a default caption - if a filename has 4 numbers it is not used as default
$center_cmotiongal_over_image=true; // new 1.2 enables/disables to center the cmotion gallery when you move the mouse over the big image
/*
This section is responsible for the watermark stuff
*/
$print_text=false; // new 1.1 - you can print some text on the lower left corner to protect your images or at least make it a little bit harder to copy it without doing anything :) if you change this setting please delete the cache folder - otherwise generated images are not changed.
$print_text_original=false; // new 1.1 does print the text on the original as well - $enable_direct_download has to be set to false!!!
$font = "./tahoma.ttf"; // this are the settings for the image text
$fontsize=10;
$fontsize_original=12;
$text = "powered by Fabricio Breve";
$textcolor_R = 255; // be careful with changing the colors ! if the compression is low the text becomes unreadable
$textcolor_G = 255; // pretty fast if it is a crazy color :)
$textcolor_B = 255;
$print_watermark = true; // new 1.1 - you can make a watermark on the images to protect your images or at least make it a little bit harder to copy it without doing anything :) if you change this setting please delete the cache folder - otherwise generated images are not changed. Please read the description of the parameters that belong to the watermark to get best results!
$print_watermark_original=true; // new 1.2 does print the watermark on the original as well - $enable_direct_download has to be set to false!!!
$watermark_small = "buttons/fab_watermark_small.png"; // new 1.1 - this is the watermark that is used on the detail and slideshow images - can be jpg or png - png gives better results
$watermark_big = "buttons/fab_watermark.png"; // new 1.1 - this is the watermark that is used on the download images - can be jpg or png - png gives better results. you can use a larger image here because the original images are most of the times much bigger
$position= 9; // new 1.1 you can define the location of the watermark with this setting (top: 1 2 3, middle: 4 5 6, bottom: 7 8 9
$transparency= 50; // new 1.1 - you can also set the transparency of your logo. 0 is no transparency - 100 max; Try your logo with different settings to get best results
$t_x= 0; // new 1.1 - The next two settings define the position of a transparent color in your watermark.
$t_y= 0; // new 1.1 - If your logo has e.g. a white border you can set the values to 0:0 and the border will be transparent. If you don't want a transparent color: set these values to -1!
/*
In this section you can customize/setup the emails features of TWG
*/
$enable_email_sending=true; // new 1.2 - You can enable/disable the sending of emails - The user can still register but no notification emails are sent. The admin side can still be used but no email are sent - set this to false if you are testing twg and you don't want to send any emails!
$show_email_notification = true; // new 1.2 - enable/disables the end-user and the admin part if logged in :). The emails are stored in the xml/subscribers.xml (plain text file!)
$encrypt_emails=true; // new 1.2 - enable/disable encryption of emails! - if you change this your subscriber.xml file will become invalid! - you are not able to fix this file manually if you turn the encryption to true. if you set this to false make sure that the file can not be read from outside - set the xml directory to 770!
$encrypt_emails_key="This is the encryption key used for emails in TWG - to make your emails really save please change this string with your random string like asdf8373jhg9f072njh8df7gdjh98g76jnszawpog9... - the longer the better."; // new in 1.2 - this key is used to encrypt and decrypt the emails in the subscriber.xml - the longer the saver! - (please use 1-9, a-z or A-Z to make the algorithm work properly! - no e.g. ÄÖÜ are allowed!) - internal the key is permuttated 2 times and added to this string to add additional security ;). If you change this string all existing emails cannot be used anymore!
$youremail = "fbreve@gmail.com"; // new 1.2 - this email, will be the reply-to mail for the registration !!
$default_subject = "Galeria atualizada!"; // new 1.2 - This is the default subject for the emails which can be send to the registered users.
$default_text = "Olá,\nHá novas imagens disponíveis na galeria que você se registrou.\nPor favor vá para %s"; // new 1.2 - The default email body. %s is a iternal variable to the main page of the gallery - If you want a different link please change it.
$email_bottomtext = "enviado por Fabricio Breve. Se você quiser mudar ou deletar seu registro por favor vá para %s"; // new 1.2 - Every email gets this footer. It makes it easier for your users to get back to your gallery. %s is an internal variable to the main page of the gallery - If you want a different link please change it.
$admin_email="fbreve@gmail.com"; // new 1.3 - Email address where the notifications are sent to. $enable_email_sending has to set to true to make this work!
$send_notification_if_comment=true; // new 1.3 - if true a notification is sent every time a user enters a comment
$notification_comment_subject="A new comment was entered at " . $browser_title_prefix; // new 1.3 - Subject of the comment notification email
$notification_comment_text="A new comment was added for image %s"; // new 1.3 - Text for the comment notification email. %s is the link to the image the comment was entered.
$send_notification_if_rating=true; // new 1.3 - if true a notification is sent every time a user enters a rating
$notification_rating_subject="A new rating was entered at ". $browser_title_prefix; // new 1.3 - Subject of the rating notification email
$notification_rating_text="A new rating was added for image %s"; // new 1.3 - Text for the rating notification email. %s is the link to the image the rating was entered.
/*
Here are set settings for the bandwidth and the settings!
*/
$test_client_connection = true; // new 1.2 - you can enable/disable the connection test of TWG. It is now integrated into the main page (in <v1.2 it was an extra page!) - there the parameter lowbandwidth or highbandwidth are set! Optimizer settings $low_ ... this settings are used if the parameter &lowbandwidth=true was provided once &highbandwith=true uses the original settings. These settings are for users that have maybe only ISDN or a 56k modem. The file speed.htm does measure the speed of a connection and calls the index.php with the parameter lowbandwidth or highbandwidth - if you want to provide the same settings for all - just call the index.php directly :). This is the minimum value (64 kbit ~ ISDN) a user have to have. If this speed is not reached the low_ parameters are used if test_bandwidth=true; With the actual setting you have to have more then normal ISDN to get the high bandwidth settings! - if you set this to false the bandwidth icon is not shown!
$test_connection_background=true; // new 1.4 - normally the speedtest is done before the 1st page is loaded to optimize it - but is does not look nice but all low settings are done properly - if you use the inline test the view of your gallery can change when the user clicks something because e.g. show_colage has a different value in low bandwidth mode ! - it's up too you ;).
$bandwidth_limit=80;
$low_show_colage = false;
$low_count_views = true;
$low_cmotion_gallery_limit_ie=20;
$low_cmotion_gallery_limit_firefox=10;
$low_compression = 50; // be carefull with the compression parameter - if someone with low bandwidth calls the gallery first the images are generated with lower quality this will be then for all users - the maximized slideshow images are NOT cached - therefore its good to change this parameter later on to a lower value (or call the gallery first by yourself on a fast line)
$low_thumbnails_x = $thumbnails_x-1;
$low_thumbnails_y = $thumbnails_y-1;
$low_number_top10 = ($low_thumbnails_x * ($low_thumbnails_y -2)) + 1;
$low_show_big_left_right_buttons=false;
$low_enable_maximized_view=false; // this is too heavy for a low bandwidth
$low_default_is_fullscreen=false; // has to be set too because otherwise lowbandwidth starts in full screen
$low_show_big_navigation="TRUE"; // or "FALSE" the next two settings are normally set by an url parameter - this parameter is overwritten in lowbandwidth mode
$low_twg_slide_type="FALSE"; // or "TRUE" or "FULL"
$low_default_big_navigation="HTML"; // normally not shown in this modus - but the user can still enable the big navigation - and than this is the default
$low_show_background_images=false; // new 1.3 - This disables the background images back.png, if present
$low_folder_effect=""; // new 1.4 - you can select a different folder effect for low bandwidth or disable it!
/*
You can show the user some tips or help or additional info if you like at the bottom -
Just enter them in the language file $lang_tips_overview, $lang_tips_thumb, $lang_tips_image as array
The style is defined in style.css: .twg_user_help_td
*/
$show_tips_overview=true; // new 1.2 - enables to show a small tip on the overview page
$show_tips_overview_once=false; // new 1.2 - true: shows a tip only once per session
$show_tips_thumb=true; // new 1.2 - enables to show a small tip on the thumbnail page
$show_tips_thumb_once=false; // new 1.2 - true: shows a tip only once per session
$show_tips_image=true; // new 1.2 - enables to show a small tip on the image page
$show_tips_image_once=false; // new 1.2 - true: shows a tip only once per session
/*
Internal settings - there is normally no need to change something here
- but you can :).
*/
$debug_file = dirname(__FILE__) . '/' . $xmldir . '/_mydebug.out'; // new 1.1 - this is your debug file - if any error happen at TWG - they are written there! some installations don't allow writing this file to the main directory! Please write this file to a writeable directory then. If you want to disable debuging you have to set the file to '';
$cache_time=42; // new 1.1 - number of days until big images (big and slideshow images) files hat are not touched will be deleted from the cache. If you don't want cache cleanup use -1 here. some OS return at this test of the last time where the file was touched the time when it was last modified. The generated big images are deleted a little bit faster than ;). Thumbnails are never deleted!
$cmotion_gallery_limit_ie=40; // new 1.1 - this is the max number of images that are shown in one cmotion gallery. At the end there will be a small arrow to go o the next x images :) IE does nice background loading and therefore the number of images can be much larger (after 5 images the cmotiongallery works!) firefox does not with this script (if someone can solve this - die developer of the script couldn’t :() all images have to be loaded in the beginning (20x4k=80k - with ISDN ~ 10 sek - that’s the maximum I would wait!) - better see optimizer settings
$cmotion_gallery_limit_firefox=20;
$enable_optimize_cmotion_gallery_limit_ie=false; // enable IE optimization for the cmotion gallery - if sometimes the preview images below the big images do not appear - set this value to false - cmotion_gallery_limit_ff is used then for firefox as well!
$extension_slideshow = "slide.jpg"; // extensions of the images
$extension_thumb = "thumb.jpg";
$extension_small = "small.jpg";
$double_encode_urls = false; // new 1.2 - some servers need double encoding of all urls to work correctly - normally this is not needed but if TWG fails with spaces in filenames ... try a true here !
$test_email_by_checking_url=false; // new 1.2 - twg can test entered emails by trying the corresponding email domain - e.g. test@test.com would be tested by opening a connection to www.test.com - if this fails the email is not valid. This is not a 100% test because there are a few email servers that don't have a Http server running! If you set this to true these users have to enter a different email - if you are not online (test against wwww.google.de fails!) this test is skipped.
$password_file="private.txt"; // new 1.2 - You can set the password file here. On a unix system you can use e.g. ".htprivate" to secure the private file! .txt is added here because I have a htaccess file that
$enable_folderdescription=true; // new 1.2 - if you don't use this turn it off - makes the gallery a little bit faster :) - this setting is for foldername.txt AND image.txt
$enable_foldername=true; // new 1.2 - if you don't use this turn it off - makes the gallery a little bit faster :) - see how-to’s if you don't know what this is :)
$enable_external_html_include=true; // new 1.2 - Enables disables usage of: header/footer/overview/thumb and image.htm ! - if you don't use this turn it off - makes the gallery a little bit faster :) -see how-tow’s if you don't know what this is :)
$enable_smily_support=true; // new 1.2 - :) , ;) and :( are shown as smiles - adapt the size of the smiles if you change the font size ! - read the howto about smilies !!
$url_file = "url.txt"; // new 1.3 - you can place your images on an extern http - on the local server are only some working images! This only works of fsocksopen is available. Please check the how-to!
$cache_dirs = true; // new 1.3 - content of directories are cached in the session - you can disable this if you have lots of image updates or are testing TWG while uploading.
$show_background_images=true; // new 1.3 - you can enable/disable the including of the background images - turn this of if you don't want to use background images!
$min=2; // new 1.3c - after how many minutes does a user count as a new user - 2 means that if he does not do anything for 2 minutes the counter is increased
$resize_folder_gif = false; // new 1.3c - if you exchange the original buttons/ordner.gif and the gif is too big it is not resized by default and this looks bad in ie or ff - set this swtich to true - the gif is resized to the menu size of the others! this works too for the folder.gif and the private.gif!
$use_sha1_for_password=true; //new 1.2 - you can use SHA1 or SHA256 to generate the hash values of the passwords. true = SHA1, false=SHA256. If SHA1 is not available on your system (php <4.3) the internal SHA256 is used! TWG has a password.php where you can generate your passwords!
$try_to_increase_memory_limit_to_32MB = false; // new 1.4 - TWG can try to increase the memory limit to 32MB - but this is most of the time disabled by security reasons - if you have problems with the memory you can try to set this to true. if you find errors in the debug file because of this - use false here ....
$image_file_extension = "txt"; // new 1.4 - image.txt can be renamed to image.php - this can be useful because you can include php code in this file then and you can implement some logic to display some individual information for each file (in HTML and HTML_SIDE mode only - DHTML mode does not reload the page) - you can get the image name with the variable $image
$exclude_directories=array("CVS","thumbs"); // new 1.4 - You can enter directories here that are ignored in TWG
$disable_direct_thumbs_access=false; // new 1.4.1 - if you use private folders and really want to protect your images 100% you have to set this switch to true! then ALL images are loaded over the image.php and no thumbs are directly linked anymore - it is then possible to protect your cache as well. The optimized slideshow is then disabled because it does only work with the cache!
$show_subdirs_first=true; // new 1.4.1 - if you have folders and pictures in one folder - this is the switch where you can decide which to show first! if you show folders first less thumbnails are shown! If pictures are shown first this is not the case because the row detection does not work the other way around.
$disable_enhanced_keybord_navigation = false; // new 1.4.1 - If you include TWG into a page and you have other input fields you should disable the enhanced keyborad navigation for t=title, c = comments ...
$show_powered_by_twg_as_text=false; // new 1.4.1 - you can change the TWG logo to a text - if you want to remove it you have to register!
$enable_random_image_caching=true; // new 1.4.2 - You can enable caching of random images - if you have enough space and the thumbsize is not the random size you can urn his to true - shows he random images much faster if they are already generated.
$timezone='America/Sao_Paulo'; // new 1.4.3 - for all date calls a timezone has o be set since 5.1.x - if you need exact times - enter your timezone - see http://www.dynamicwebpages.de/php/timezones.php
$store_xml_in_picfolders=false; // new 1.5 - you can now store your xml files in the pictures folder - please read the howto 35 to use this feature!
$maximum_transations_per_session=10000; // new 1.5.0.2 - you can limit the number of transactions per session - this limit was implemented becasue if a bad robot cycles through your gallery you will gets lots of trafic. please not - each image that is shown is one transaction too! A change from one page to another is ~ 10 (when the cache images are generated - otherwiese each image is another hit - if you disable direct cache access each page needs up to 50 hits!) 10000 is ~ 1000 pages until you get a warning to closes the browser and restart it! This limit should normally ony be reached by a robot!
$enable_ie_filename_fix=true; // new 1.6 - shows the right file name in ie when you use "save as.." - but you loose the browser caching - show pictures are loaded from the server again and again - decide what you want - save as or a faster gallery!
$allowed_html_tags = array("<br>", "<b>", "</b>", "<u>", "</u>", "<i>", "</i>"); // new 1.6 - allowed html tags in comments and titles !
$allow_all_html_captions=false; // new 1.6 - You can allow to enter everything for captions! All html - simply everything! - This is false be default to protect your gallery! if true scripts could be executed on your server if someone has the right to enter captions - only set this to true if you trust ALL of your users that are allowed to enter captions!!!
$disable_right_click=false; // new 1.6 - you can disable the righclick in the gallery to protect your images - but if people turn off Javascript they can still copy - only usefully for dau's
$cache_gen_wait_time=0.5; // new 1.6 - time in s. This is the time the generator of the cache waits until it processes the next image - don't kill your server ;). should not be below 0.1
$max_gen_num=5000; // new 1.6 - Number of cache images that are generated by the admin. If the number is too big the scripts runs too long and the max_execution_time is not enough. I set this time internally to 10 min but this does sometimes not work. Then you have to change max_execution_time in the php.ini or decreate this value to a number your server can handle.
$use_direct_small=true; // new 1.6.1 - Use the small images directly from the cache - if you have problems with displaying images with some file names turn this off!
$thumbnail_offset_y=0; // New 1.6.1 - If you have e.g. ad's on the thumbnail page or a header.htm and footer.htm twg does not know this - you have to tell how much space this takes!
$generate_cache_at_upload=true; // New 1.6.1 - you can generate the thumbs during upload - upload is slower but the cache already generated.
$use_image_magic=false; // New 1.7 - You can use image magick to create the files in the cache folder. This are the thumbnails and the small images. image magick creates a little better images than gd and uses less memory! You have to have image magick installed on your server. Check info.pp and the howto for details! You still need gd lib for the other image types!
$image_magic_path="convert"; // New 1.7 - This is the path to the convert command of image magick. If it's not in the path you have to add the full path here!
$show_counter_in_jstree=true; // New 1.7 - Shows the number of pictures in a folder in the js album tree (only available for reg. users because the album tree is only available there) . like $show_number_of_pic in the normal view.
$autorotate_images = ''; // New 1.7 - TWG can autodetect the orientation of images if your camera set this. The problem is that TWG does not know how you hold your camera. if you like no autorotation use '', If you want normal rotation use 'normal', If the images are all rotated 180 Degrees use 'invert'. I have set 'invert' as default because I always hold my camera like this + 2 other camera is tested did the same ;).
$iptc_fields_for_caption_add = array(); // New 1.7 - IPTC offsets that are used to be ADDED to the caption when captions are extracted in TWG Admin or after the upload - this field is ADDED to the normal caption! e.g. you can add the city tags to the image
$iptc_fields_for_caption_add_style=" (%s)"; // new 1.7 - This is the style how the 2nd IPTC field is added - the %s is the text that is found. You can e.g. use " - %s" to add the 2nd field with a simple -
$use_cache_hash=false; // New 1.7 - you can store the images in the cache md5 encoded - it's slower but you get shorter cache names, the cache is not readable anymore and you don't have non ansi chars in the file name anymore. This can be important for people with deep directory structures and long file names. If you have problems that images with special characters cannot be shown set this to true - I have removed $double_encode_urls in 1.7 because this is the more secure way if you have problems with encodings in the cache!
$hide_middle_folders_in_breadcrumb=true; // New 1.7 - The breadcrub can get really long - therefore the middle folders can be replaced by an ... if you set this to true.
$move_error_images=""; // New 1.7 - You can automatically move images that throw an error to the folder your provide here! Makes it easy to find corrupt images people upload. The problem can be too big images, or corrupt images. An empty folder disables this function!
$autocreate_folder_image = true; // New 1.7 - You can automatically generate a topx folder.png. Once a day the topx views is checked and the most viewed image is used. if a folder.png exists no folder_top.png is generated. If a folder has no images but only folders then a random image from the subdirs is used!
$autocreate_folder_image_recursive = true; // New 1.7 - if true the most vied image of the whole sutree is used - if false only the one of the actual folder. This need quite some time. If you want to speed up the gallery set this to false (but it's cached and only done once a day!)
$admin_user_edit_textfile_extensions = "txt,css,php,htm,html"; // New 1.7 - This are the files that can be edited in the flash in the backend. But you can restrict is to single files as well by using the full name. e.g. foldername.txt. * is supported as wildcard! Only available for registered users.
$user_edit_textfile_extensions = "txt,htm,html"; // New 1.7 - This are the files that can be edited in the flash of the users. But you can restrict is to single files as well by using the full name. e.g. foldername.txt. * is supported as wildcard! Only available for registered users.
$support_piclens=true; // New 1.7.1 - if true a rss for all unprotected images is created. After login to a protected gallery an extra rss for all files is created! rss files are created in the background. therefore it is possible that the files is not pressent right after the one day cache was removed - simply wait a couple of requests!
$enable_external_adremove = false; // new 1.7.4 - TWG can remove ad's from websites like funpic.de. But the code of the layer ad change very often. If you have this switch on then a small js file is loaded from tinywebgallery.com that always contains the newest ad removal code. If you don't have any ad's on your webspace you can set this to false;
$charset="UTF-8";
/* new 1.4 we include your configuration file ! */
if (file_exists(dirname(__FILE__) . "/my_config.php")) {
include_once dirname(__FILE__) . "/my_config.php";
}
?>