The config file

First the mySQL settings are defined...

$MySqlHostname = "localhost"; // hostname of database server
$MySqlUsername = "mysql_user"; // mysql username
$MySqlPassword = "mysql_password"; // mysql password
$MySqlDatabase = "mysql_db"; // mysql database to use
$config[tbl_prefix] = "portf_"; // the database table prefix

Now some basic setup information...

// the title of your portfolio
$config[title] = "phpPortfolio";
// your portfolio's base URL
$config[baseurl] = "http://www.domain.com/portfolio";
// the admin's email address
$config[adminMail] = "admin@domain.com";
// your portfolio's physical server basepath
$config[basepath] = "/server/pathto/domain.com/portfolio";
// path to portfolio's core files relative to your basepath
// you shouldn't change this unless you really need to
$config[corefilespath] = "/portfolio_app";

Some default behaviours...

// number of rows in list view pages
$config[listViewLimit] = "6"; 
// number of items in gallery view pages
$config[galleryViewLimit] = "3"; 
// number of items in a gallery view row
$config[galleryViewRowLength] = "3"; 
// lowest rank to display in random blocks (1 ranks higher than 10)
$config[randomViewMinRank] = "4";
// default area code for client phone numbers
$config[defaultAreaCode] = "705"; 
// the currency symbol to use
// default is dollars, but it could be "£" for pounds or "€" for euros
$config[money_symb] = "$";
// support for international numbering format
// 1 = usa, england, 2 = spain, germany, 3 = estonia, 4 = france, norway, 5 = switzerland, 6 = kazahistan
$config[number_format_style] = "1"; 

Image upload controls...

// max upload size (in bytes)
$config[max_upload_size] = "400000";
// max upload width (in pixels) 
$config[max_upload_width] = 1280;
// allowed file upload types
$config[allowed_upload_types] = array("image/pjpeg","image/jpeg","image/gif", "image/x-png");
// allowed file upload extensions
$config[allowed_upload_extensions] = array("jpg","gif","png");

Image size and quality...

// thumbnail options
// max width (in pixels) of thumbnails
$config[thumbnail_width] = "150";
// jpeg quality 0-100 -- the lower the num, the smaller the file size
$config[thumb_quality] = "70";

// icon options
// max width (in pixels) of icons
$config[icon_width] = "48";
// jpeg quality 0-100 -- the lower the num, the smaller the file size
$config[icon_quality] = "70";

// resized image options
// max width (in pixels) of resized images
$config[img_width] = "400";
// jpeg quality 0-100 -- the lower the num, the smaller the file size
$config[img_quality] = "70";

Image directory paths...

// upload and URL paths for various image directories
// you shouldn't have to change these, but one never knows
// leave off the trailing slash
$config[client_upload_path] = "$config[basepath]$config[corefilespath]/images/client";
$config[client_view_images_path] = "$config[baseurl]$config[corefilespath]/images/client";
$config[piece_upload_path] = "$config[basepath]$config[corefilespath]/images/piece";
$config[piece_view_images_path] = "$config[baseurl]$config[corefilespath]/images/piece";
$config[project_upload_path] = "$config[basepath]$config[corefilespath]/images/project";
$config[project_view_images_path] = "$config[baseurl]$config[corefilespath]/images/project";
$config[media_upload_path] = "$config[basepath]$config[corefilespath]/images/media";
$config[media_view_images_path] = "$config[baseurl]$config[corefilespath]/images/media";
$config[icon_view_images_path] = "$config[baseurl]$config[corefilespath]/images/icons";

Image manipulation controls...

// make sure you have the correct version of GD lib specified for your server
$config[gd_version] = "2"; // version of gd lib available - 1 or 2
if ($config[gd_version] == "2") {
	// path to the resizing tool for gd 2
	// you shouldn't change this!
	$config[path_to_resizer] = "$config[basepath]$config[corefilespath]/thumbnail_create.php";
	} elseif ($config[gd_version] == "1") {
	// path to the resizing tool for gd 1
	// you shouldn't change this!
	$config[path_to_resizer] = "$config[basepath]$config[corefilespath]/resize.php";
	}

Advanced image manipulation...

/*    the following advanced transformations are available for people 
* who are using gd lib v2 .x
*
* specified transformations - blank for simple resizing
* 
* sample - "bevel()","greyscale(32,22,22)","drop_shadow(3,333333,FFFFFF)"
*
* 'bevel' - shaded beveled edges ( edge width, hex light colour, hex dark colour )
* 'greyscale' basic black n white ( int red, int green, int blue )
* 'ellipse' ellipse on bg colour  ( hex background colour )
* 'round_edges' corner trimming ( edge_radius, background colour, anti-alias width )
* 'merge' overlay merge image ( merge image, x start [neg = from right], y start [neg = from base], opacity, transparent colour on merge image )
* 'frame' plain raised border ( hex light colour, hex dark colour, int width of mid bit )
* 'drop_shadow' more like a dodgy motion blur [semi buggy] ( shadow width, hex shadow colour, hex background colour )
* 'motion_blur' fading parallel lines ( int number of lines, hex background colour ) 
*/

// effects for thumbnails if using GD2
// blank out between '' for simple resizing
// with no effects, ie $config[thumb_effects] = '';
$config[thumb_effects] = '"bevel()","drop_shadow(3,333333,FFFFFF)"';
// effects for icons if using GD2
// blank out between '' for simple resizing
$config[icon_effects] = '"drop_shadow(1,333333,FFFFFF)"';
// effects for resized images if using GD2
// blank out between '' for simple resizing
$config[img_effects] = '"drop_shadow(4,333333,FFFFFF)"';
© phpPortfolio