Thumbnail Exclude .8 README!!!

THis will allow the admin to choose which file extensions to exlude from random pics.
The admin option will appear under "Advanced thumbnails"
If you have an otherwise unmodified 1.3.2 Installation you can copy the files from ./root
then proceed to step two.

Otherwise, you should Follow instructions below...
-----------------------------------------------------------
Mod Author: Charlie Croom
Mod install time: <10 min
Mod Difficulty: VERY EASY
Files to Modify: ./include/functions.inc.php AND lang/english.php
--------------------------------------------------
STEP ONE - MODIFY FILES:
ONLY FOR NON 1.3.2, 1.3.2 Should copy root dir and go to step 2


---OPEN----
include/functions.inc.php
---FIND---
/**************************************************************************
   Functions for album/picture management
 **************************************************************************/
---AFTER ADD---
//Exclude types in thumbnails mod by Comp615

function parse($input) {
	$types = "`filename` NOT LIKE '%.";
	for($x = 1; $i < strlen($input); $i++) {
		$char = $input{$i};
		if($char != "," AND $char != ".") {
			$types .= $char;
		} elseif ($char == ".") {
			1 == 1;	
		} else {
		$types .= "' OR `name` LIKE '%.";
		}
	}
	$types .= "' AND";
	if($input == "")
	$types = "";
	return $types;
}
---FIND---
$sql = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE
--BEFORE THAT LINE ADD--
$thumbdata = parse($CONFIG['disable_thumb_types']);
---DIRECTLY AFTER "WHERE" ADD---
$thumbdata
---SAVE AND CLOSE---

---OPEN---
lang/english.php
---FIND---
'Files and thumbnails advanced settings', //cpg1.3.0

---CREATE NEW LINE AFTER WITH:---
  array('Do NOT show thumbnails of file type, i.e. gif/jpg/bmp','disable_thumb_types',0), //Comp615
  //array('Don't show above types for following modes:','disable_thumb_modes',xxxx), //Comp615
---SAVE AND CLOSE---




STEP 2
SQL MODIFICATION:
ALL USERS MUST DO THIS!!!!

just execute the query once:
---SQL---
INSERT INTO `cpg132_config` ( `name` , `value` ) 
VALUES (
'disable_thumb_types', ''
);
-------------------



ALL DONE, MODIFY THE SETTING FROM CONFIG

ENJOY!!!!!!!!!
