<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>PHP Thumb: Forum: Feature Suggestions / Requests - Recent Topics</title>
<link>http://phpthumb.gxdlabs.com/forums/</link>
<description>Help, Suggestions, and General Discussion</description>
<language>en</language>
<pubDate>Tue, 07 Feb 2012 12:15:44 +0000</pubDate>

<item>
<title>forgotz on "PHP Album App"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/php-album-app#post-186</link>
<pubDate>Sun, 11 Sep 2011 09:58:38 +0000</pubDate>
<dc:creator>forgotz</dc:creator>
<guid isPermaLink="false">186@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Updated as of Sep. 11 2011. I would like to implement PHPThumb into my scripts. Below are the two scripts any ideas or suggestions, would be very much appreciated. &#60;/p&#62;
&#60;p&#62;Inspected every line of code and updated install instructions. This mod is tight except display still needs a fix...demo is currently at this site, &#60;a href=&#34;http://php-evolved.com/&#34;&#62;http://php-evolved.com/&#60;/a&#62;. I also have forum threads going on this topic &#60;a href=&#34;http://www.icyphoenix.com/viewtopic.php?f=24&#38;#38;t=8057&#34;&#62;here&#60;/a&#62; and &#60;a href=&#34;http://evolution-xtreme.com/modules.php?name=Forums&#38;#38;file=viewtopic&#38;#38;t=4637&#34;&#62;here&#60;/a&#62;. As mentioned in those threads, everything is working, except PHP image generation scripts are not working (album_thumbnail.php and album_pic.php), or at least that appears to be the issue. Again, the port appears to be a success - except for the most important thing, the images will not display :(  Today, I started from scratch and did the port once again - still the same result. The resolution MUST be something simple. I implemented a new image class and nothing. Tried rewriting the .htaccess files and still nothing. Even downloaded the FAP and attempted a port, and that was even worse. That's all good though, because I don't want everything that comes with FAP. The port of Album Mod version 2.0.56 is all I want - clean, simple and well integrated. Visit &#60;a href=&#34;http://php-evolved.com&#34;&#62;php-evolved.com&#60;/a&#62; for yourself and see what I am talking about. Any help at all would be greatly appreciated. Below, I have attached the second port that I did today. Maybe this is above my pay grade, and I should leave it - but I do not wish to. Have come this far and everything else is working, it's just a shame that this one thing has tripped me up...&#60;/p&#62;
&#60;p&#62;-K&#60;/p&#62;
&#60;p&#62;album_thumbnail.php&#60;br /&#62;
&#60;code&#62;&#60;/p&#62;
&#60;p&#62;define('IN_PHPBB', true);&#60;br /&#62;
$album_root_path = $phpbb_root_path . 'album_mod/';&#60;br /&#62;
include($phpbb_root_path . 'extension.inc');&#60;br /&#62;
include($phpbb_root_path . 'common.'.$phpEx);&#60;/p&#62;
&#60;p&#62;//&#60;br /&#62;
// Start session management&#60;br /&#62;
//&#60;br /&#62;
$userdata = session_pagestart($user_ip, PAGE_ALBUM);&#60;br /&#62;
init_userprefs($userdata);&#60;br /&#62;
//&#60;br /&#62;
// End session management&#60;br /&#62;
//&#60;/p&#62;
&#60;p&#62;//&#60;br /&#62;
// Get general album information&#60;br /&#62;
//&#60;br /&#62;
include($album_root_path . 'album_common.'.$phpEx);&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check the request&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if( isset($HTTP_GET_VARS['pic_id']) )&#60;br /&#62;
{&#60;br /&#62;
	$pic_id = intval($HTTP_GET_VARS['pic_id']);&#60;br /&#62;
}&#60;br /&#62;
else if( isset($HTTP_POST_VARS['pic_id']) )&#60;br /&#62;
{&#60;br /&#62;
	$pic_id = intval($HTTP_POST_VARS['pic_id']);&#60;br /&#62;
}&#60;br /&#62;
else&#60;br /&#62;
{&#60;br /&#62;
	die('No pics specified');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Get this pic info&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;$sql = &#34;SELECT *&#60;br /&#62;
		FROM &#34;. ALBUM_TABLE .&#34;&#60;br /&#62;
		WHERE pic_id = '$pic_id'&#34;;&#60;br /&#62;
if( !($result = $db-&#38;gt;sql_query($sql)) )&#60;br /&#62;
{&#60;br /&#62;
	message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);&#60;br /&#62;
}&#60;br /&#62;
$thispic = $db-&#38;gt;sql_fetchrow($result);&#60;/p&#62;
&#60;p&#62;$cat_id = $thispic['pic_cat_id'];&#60;br /&#62;
$user_id = $thispic['pic_user_id'];&#60;/p&#62;
&#60;p&#62;$pic_filetype = substr($thispic['pic_filename'], strlen($thispic['pic_filename']) - 4, 4);&#60;br /&#62;
$pic_filename = $thispic['pic_filename'];&#60;br /&#62;
$pic_thumbnail = $thispic['pic_thumbnail'];&#60;/p&#62;
&#60;p&#62;if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) )&#60;br /&#62;
{&#60;br /&#62;
	die($lang['Pic_not_exist']);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Get the current Category Info&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if ($cat_id != PERSONAL_GALLERY)&#60;br /&#62;
{&#60;br /&#62;
	$sql = &#34;SELECT *&#60;br /&#62;
			FROM &#34;. ALBUM_CAT_TABLE .&#34;&#60;br /&#62;
			WHERE cat_id = '$cat_id'&#34;;&#60;br /&#62;
	if( !($result = $db-&#38;gt;sql_query($sql)) )&#60;br /&#62;
	{&#60;br /&#62;
		message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$thiscat = $db-&#38;gt;sql_fetchrow($result);&#60;br /&#62;
}&#60;br /&#62;
else&#60;br /&#62;
{&#60;br /&#62;
	$thiscat = init_personal_gallery_cat($user_id);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;if (empty($thiscat))&#60;br /&#62;
{&#60;br /&#62;
	die($lang['Category_not_exist']);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check the permissions&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;$album_user_access = album_user_access($cat_id, $thiscat, 1, 0, 0, 0, 0, 0); // VIEW&#60;/p&#62;
&#60;p&#62;if ($album_user_access['view'] == 0)&#60;br /&#62;
{&#60;br /&#62;
	die($lang['Not_Authorised']);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check Pic Approval&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if ($userdata['user_level'] != ADMIN)&#60;br /&#62;
{&#60;br /&#62;
	if( ($thiscat['cat_approval'] == ADMIN) or (($thiscat['cat_approval'] == MOD) and !$album_user_access['moderator']) )&#60;br /&#62;
	{&#60;br /&#62;
		if ($thispic['pic_approval'] != 1)&#60;br /&#62;
		{&#60;br /&#62;
			die($lang['Not_Authorised']);&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check hotlink&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if( ($album_config['hotlink_prevent'] == 1) and (isset($HTTP_SERVER_VARS['HTTP_REFERER'])) )&#60;br /&#62;
{&#60;br /&#62;
	$check_referer = explode('?', $HTTP_SERVER_VARS['HTTP_REFERER']);&#60;br /&#62;
	$check_referer = trim($check_referer[0]);&#60;/p&#62;
&#60;p&#62;	$good_referers = array();&#60;/p&#62;
&#60;p&#62;	if ($album_config['hotlink_allowed'] != '')&#60;br /&#62;
	{&#60;br /&#62;
		$good_referers = explode(',', $album_config['hotlink_allowed']);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$good_referers[] = $board_config['server_name'] . $board_config['script_path'];&#60;/p&#62;
&#60;p&#62;	$errored = TRUE;&#60;/p&#62;
&#60;p&#62;	for ($i = 0; $i &#38;lt; count($good_referers); $i++)&#60;br /&#62;
	{&#60;br /&#62;
		$good_referers[$i] = trim($good_referers[$i]);&#60;/p&#62;
&#60;p&#62;		if( (strstr($check_referer, $good_referers[$i])) and ($good_referers[$i] != '') )&#60;br /&#62;
		{&#60;br /&#62;
			$errored = FALSE;&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	if ($errored)&#60;br /&#62;
	{&#60;br /&#62;
		die($lang['Not_Authorised']);&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/*&#60;br /&#62;
+----------------------------------------------------------&#60;br /&#62;
&#124; Main work here...&#60;br /&#62;
+----------------------------------------------------------&#60;br /&#62;
*/&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Send Thumbnail to browser&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if( ($pic_filetype != '.jpg') and ($pic_filetype != '.png') and ($pic_filetype != '.gif') )&#60;br /&#62;
{&#60;br /&#62;
	// --------------------------------&#60;br /&#62;
	// GD does not support GIF so we must SEND a premade No-thumbnail pic then EXIT&#60;br /&#62;
	// --------------------------------&#60;/p&#62;
&#60;p&#62;	header('Content-type: image/jpeg');&#60;br /&#62;
	readfile($images['no_thumbnail']);&#60;br /&#62;
	exit;&#60;br /&#62;
}&#60;br /&#62;
else&#60;br /&#62;
{&#60;br /&#62;
	// --------------------------------&#60;br /&#62;
	// Check thumbnail cache. If cache is available we will SEND &#38;#38; EXIT&#60;br /&#62;
	// --------------------------------&#60;/p&#62;
&#60;p&#62;	if( ($album_config['thumbnail_cache'] == 1) and ($pic_thumbnail != '') and file_exists(ALBUM_CACHE_PATH . $pic_thumbnail) )&#60;br /&#62;
	{&#60;br /&#62;
		switch ($pic_filetype)&#60;br /&#62;
		{&#60;br /&#62;
		  case '.gif':&#60;br /&#62;
			case '.jpg':&#60;br /&#62;
				header('Content-type: image/jpeg');&#60;br /&#62;
				break;&#60;br /&#62;
			case '.png':&#60;br /&#62;
				header('Content-type: image/png');&#60;br /&#62;
				break;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		readfile(ALBUM_CACHE_PATH . $pic_thumbnail);&#60;br /&#62;
		exit;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	// --------------------------------&#60;br /&#62;
	// Hmm, cache is empty. Try to re-generate!&#60;br /&#62;
	// --------------------------------&#60;/p&#62;
&#60;p&#62;	$pic_size = @getimagesize(ALBUM_UPLOAD_PATH . $pic_filename);&#60;br /&#62;
	$pic_width = $pic_size[0];&#60;br /&#62;
	$pic_height = $pic_size[1];&#60;/p&#62;
&#60;p&#62;	$gd_errored = FALSE;&#60;br /&#62;
	switch ($pic_filetype)&#60;br /&#62;
	{&#60;br /&#62;
	 case '.gif':&#60;br /&#62;
      $read_function = 'imagecreatefromgif';&#60;br /&#62;
      $pic_filetype = '.jpg';&#60;br /&#62;
   break;&#60;br /&#62;
		case '.jpg':&#60;br /&#62;
			$read_function = 'imagecreatefromjpeg';&#60;br /&#62;
			break;&#60;br /&#62;
		case '.png':&#60;br /&#62;
			$read_function = 'imagecreatefrompng';&#60;br /&#62;
			break;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$src = @$read_function(ALBUM_UPLOAD_PATH  . $pic_filename);&#60;/p&#62;
&#60;p&#62;	if (!$src)&#60;br /&#62;
	{&#60;br /&#62;
		$gd_errored = TRUE;&#60;br /&#62;
		$pic_thumbnail = '';&#60;br /&#62;
	}&#60;br /&#62;
	else if( ($pic_width &#38;gt; $album_config['thumbnail_size']) or ($pic_height &#38;gt; $album_config['thumbnail_size']) )&#60;br /&#62;
	{&#60;br /&#62;
		// ----------------------------&#60;br /&#62;
		// Resize it&#60;br /&#62;
		// ----------------------------&#60;/p&#62;
&#60;p&#62;		if ($pic_width &#38;gt; $pic_height)&#60;br /&#62;
		{&#60;br /&#62;
			$thumbnail_width = $album_config['thumbnail_size'];&#60;br /&#62;
			$thumbnail_height = $album_config['thumbnail_size'] * ($pic_height/$pic_width);&#60;br /&#62;
		}&#60;br /&#62;
		else&#60;br /&#62;
		{&#60;br /&#62;
			$thumbnail_height = $album_config['thumbnail_size'];&#60;br /&#62;
			$thumbnail_width = $album_config['thumbnail_size'] * ($pic_width/$pic_height);&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		$thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height);&#60;/p&#62;
&#60;p&#62;		$resize_function = ($album_config['gd_version'] == 1) ? 'imagecopyresized' : 'imagecopyresampled';&#60;/p&#62;
&#60;p&#62;		@$resize_function($thumbnail, $src, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height);&#60;br /&#62;
	}&#60;br /&#62;
	else&#60;br /&#62;
	{&#60;br /&#62;
		$thumbnail = $src;&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	if (!$gd_errored)&#60;br /&#62;
	{&#60;br /&#62;
		if ($album_config['thumbnail_cache'] == 1)&#60;br /&#62;
		{&#60;br /&#62;
			// ------------------------&#60;br /&#62;
			// Re-generate successfully. Write it to disk!&#60;br /&#62;
			// ------------------------&#60;/p&#62;
&#60;p&#62;			$pic_thumbnail = $pic_filename;&#60;/p&#62;
&#60;p&#62;			switch ($pic_filetype)&#60;br /&#62;
			{&#60;br /&#62;
				case '.jpg':&#60;br /&#62;
					@imagejpeg($thumbnail, ALBUM_CACHE_PATH . $pic_thumbnail, $album_config['thumbnail_quality']);&#60;br /&#62;
					break;&#60;br /&#62;
				case '.png':&#60;br /&#62;
					@imagepng($thumbnail, ALBUM_CACHE_PATH . $pic_thumbnail);&#60;br /&#62;
					break;&#60;br /&#62;
			}&#60;/p&#62;
&#60;p&#62;			@chmod(ALBUM_CACHE_PATH . $pic_thumbnail, 0777);&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		// ----------------------------&#60;br /&#62;
		// After write to disk, donot forget to send to browser also&#60;br /&#62;
		// ----------------------------&#60;/p&#62;
&#60;p&#62;		switch ($pic_filetype)&#60;br /&#62;
		{&#60;br /&#62;
			case '.jpg':&#60;br /&#62;
				@imagejpeg($thumbnail, '', $album_config['thumbnail_quality']);&#60;br /&#62;
				break;&#60;br /&#62;
			case '.png':&#60;br /&#62;
				@imagepng($thumbnail);&#60;br /&#62;
				break;&#60;br /&#62;
		}&#60;/p&#62;
&#60;p&#62;		exit;&#60;br /&#62;
	}&#60;br /&#62;
	else&#60;br /&#62;
	{&#60;br /&#62;
		// ----------------------------&#60;br /&#62;
		// It seems you have not GD installed :(&#60;br /&#62;
		// ----------------------------&#60;/p&#62;
&#60;p&#62;		header('Content-type: image/jpeg');&#60;br /&#62;
		readfile('images/nothumbnail.jpg');&#60;br /&#62;
		exit;&#60;br /&#62;
	}&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;album_pic.php&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
define('IN_PHPBB', true);&#60;br /&#62;
$album_root_path = $phpbb_root_path . 'album_mod/';&#60;br /&#62;
include($phpbb_root_path . 'extension.inc');&#60;br /&#62;
include($phpbb_root_path . 'common.'.$phpEx);&#60;/p&#62;
&#60;p&#62;//&#60;br /&#62;
// Start session management&#60;br /&#62;
//&#60;br /&#62;
$userdata = session_pagestart($user_ip, PAGE_ALBUM);&#60;br /&#62;
init_userprefs($userdata);&#60;br /&#62;
//&#60;br /&#62;
// End session management&#60;br /&#62;
//&#60;/p&#62;
&#60;p&#62;//&#60;br /&#62;
// Get general album information&#60;br /&#62;
//&#60;br /&#62;
include($album_root_path . 'album_common.'.$phpEx);&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check the request&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if( isset($HTTP_GET_VARS['pic_id']) )&#60;br /&#62;
{&#60;br /&#62;
	$pic_id = intval($HTTP_GET_VARS['pic_id']);&#60;br /&#62;
}&#60;br /&#62;
else if( isset($HTTP_POST_VARS['pic_id']) )&#60;br /&#62;
{&#60;br /&#62;
	$pic_id = intval($HTTP_POST_VARS['pic_id']);&#60;br /&#62;
}&#60;br /&#62;
else&#60;br /&#62;
{&#60;br /&#62;
	die('No pics specified');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Get this pic info&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;$sql = &#34;SELECT *&#60;br /&#62;
		FROM &#34;. ALBUM_TABLE .&#34;&#60;br /&#62;
		WHERE pic_id = '$pic_id'&#34;;&#60;br /&#62;
if( !($result = $db-&#38;gt;sql_query($sql)) )&#60;br /&#62;
{&#60;br /&#62;
	message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql);&#60;br /&#62;
}&#60;br /&#62;
$thispic = $db-&#38;gt;sql_fetchrow($result);&#60;/p&#62;
&#60;p&#62;$cat_id = $thispic['pic_cat_id'];&#60;br /&#62;
$user_id = $thispic['pic_user_id'];&#60;/p&#62;
&#60;p&#62;$pic_filetype = substr($thispic['pic_filename'], strlen($thispic['pic_filename']) - 4, 4);&#60;br /&#62;
$pic_filename = $thispic['pic_filename'];&#60;br /&#62;
$pic_thumbnail = $thispic['pic_thumbnail'];&#60;/p&#62;
&#60;p&#62;if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) )&#60;br /&#62;
{&#60;br /&#62;
	die($lang['Pic_not_exist']);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Get the current Category Info&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if ($cat_id != PERSONAL_GALLERY)&#60;br /&#62;
{&#60;br /&#62;
	$sql = &#34;SELECT *&#60;br /&#62;
			FROM &#34;. ALBUM_CAT_TABLE .&#34;&#60;br /&#62;
			WHERE cat_id = '$cat_id'&#34;;&#60;br /&#62;
	if( !($result = $db-&#38;gt;sql_query($sql)) )&#60;br /&#62;
	{&#60;br /&#62;
		message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$thiscat = $db-&#38;gt;sql_fetchrow($result);&#60;br /&#62;
}&#60;br /&#62;
else&#60;br /&#62;
{&#60;br /&#62;
	$thiscat = init_personal_gallery_cat($user_id);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;if (empty($thiscat))&#60;br /&#62;
{&#60;br /&#62;
	die($lang['Category_not_exist']);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check the permissions&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;$album_user_access = album_user_access($cat_id, $thiscat, 1, 0, 0, 0, 0, 0); // VIEW&#60;br /&#62;
if ($album_user_access['view'] == 0)&#60;br /&#62;
{&#60;br /&#62;
	die($lang['Not_Authorised']);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check Pic Approval&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if ($userdata['user_level'] != ADMIN)&#60;br /&#62;
{&#60;br /&#62;
	if( ($thiscat['cat_approval'] == ADMIN) or (($thiscat['cat_approval'] == MOD) and !$album_user_access['moderator']) )&#60;br /&#62;
	{&#60;br /&#62;
		if ($thispic['pic_approval'] != 1)&#60;br /&#62;
		{&#60;br /&#62;
			die($lang['Not_Authorised']);&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Check hotlink&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;if( ($album_config['hotlink_prevent'] == 1) and (isset($HTTP_SERVER_VARS['HTTP_REFERER'])) )&#60;br /&#62;
{&#60;br /&#62;
	$check_referer = explode('?', $HTTP_SERVER_VARS['HTTP_REFERER']);&#60;br /&#62;
	$check_referer = trim($check_referer[0]);&#60;/p&#62;
&#60;p&#62;	$good_referers = array();&#60;/p&#62;
&#60;p&#62;	if ($album_config['hotlink_allowed'] != '')&#60;br /&#62;
	{&#60;br /&#62;
		$good_referers = explode(',', $album_config['hotlink_allowed']);&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	$good_referers[] = $board_config['server_name'] . $board_config['script_path'];&#60;/p&#62;
&#60;p&#62;	$errored = TRUE;&#60;/p&#62;
&#60;p&#62;	for ($i = 0; $i &#38;lt; count($good_referers); $i++)&#60;br /&#62;
	{&#60;br /&#62;
		$good_referers[$i] = trim($good_referers[$i]);&#60;/p&#62;
&#60;p&#62;		if( (strstr($check_referer, $good_referers[$i])) and ($good_referers[$i] != '') )&#60;br /&#62;
		{&#60;br /&#62;
			$errored = FALSE;&#60;br /&#62;
		}&#60;br /&#62;
	}&#60;/p&#62;
&#60;p&#62;	if ($errored)&#60;br /&#62;
	{&#60;br /&#62;
		die($lang['Not_Authorised']);&#60;br /&#62;
	}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;/*&#60;br /&#62;
+----------------------------------------------------------&#60;br /&#62;
&#124; Main work here...&#60;br /&#62;
+----------------------------------------------------------&#60;br /&#62;
*/&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Increase view counter&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;$sql = &#34;UPDATE &#34;. ALBUM_TABLE .&#34;&#60;br /&#62;
		SET pic_view_count = pic_view_count + 1&#60;br /&#62;
		WHERE pic_id = '$pic_id'&#34;;&#60;br /&#62;
if( !($result = $db-&#38;gt;sql_query($sql)) )&#60;br /&#62;
{&#60;br /&#62;
	message_die(GENERAL_ERROR, 'Could not update pic information', '', __LINE__, __FILE__, $sql);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;// ------------------------------------&#60;br /&#62;
// Okay, now we can send image to the browser&#60;br /&#62;
// ------------------------------------&#60;/p&#62;
&#60;p&#62;switch ( $pic_filetype )&#60;br /&#62;
{&#60;br /&#62;
	case '.png':&#60;br /&#62;
		header('Content-type: image/png');&#60;br /&#62;
		break;&#60;br /&#62;
	case '.gif':&#60;br /&#62;
		header('Content-type: image/gif');&#60;br /&#62;
		break;&#60;br /&#62;
	case '.jpg':&#60;br /&#62;
		header('Content-type: image/jpeg');&#60;br /&#62;
		break;&#60;br /&#62;
	default:&#60;br /&#62;
		die('The filename data in the DB was corrupted');&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;readfile(ALBUM_UPLOAD_PATH  . $thispic['pic_filename']);&#60;/p&#62;
&#60;p&#62;exit;&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>atDev on "suggestions from another library"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/suggestions-from-another-library#post-17</link>
<pubDate>Wed, 17 Jun 2009 08:29:51 +0000</pubDate>
<dc:creator>atDev</dc:creator>
<guid isPermaLink="false">17@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Sorry if some of these are already implemented but here are some other methods/suggestions.  I know most can be done via plugins but not sure if you wanted to implement them as core methods because of their popularity in image manipulation.&#60;br /&#62;
- grayscale&#60;br /&#62;
- writeText (perhaps to write some text on the image when thumbnailing)&#60;br /&#62;
- watermark (saw there was a plugin for it), but could also be labeled &#34;merge&#34; as a core method
&#60;/p&#62;</description>
</item>
<item>
<title>alex on "round corners"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/zoomcrop#post-44</link>
<pubDate>Mon, 06 Jul 2009 23:45:10 +0000</pubDate>
<dc:creator>alex</dc:creator>
<guid isPermaLink="false">44@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Is it possible to round corners with PHP thumb?
&#60;/p&#62;</description>
</item>
<item>
<title>nikmauro on "CONVERTING COLOR IMAGES TO B&#038;W(GREYSCALE)"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/converting-color-images-to-b038wgreyscale#post-111</link>
<pubDate>Thu, 24 Sep 2009 00:06:56 +0000</pubDate>
<dc:creator>nikmauro</dc:creator>
<guid isPermaLink="false">111@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;hello it is possible to change the color of the image to monochrome or B/W ??&#60;/p&#62;
&#60;p&#62;CONVERTING COLOR IMAGES TO B&#38;#38;W(GREYSCALE)&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>gtraxx on "remove exif on picture"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/remove-exif-on-picture#post-152</link>
<pubDate>Wed, 03 Feb 2010 13:17:52 +0000</pubDate>
<dc:creator>gtraxx</dc:creator>
<guid isPermaLink="false">152@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hello I am trying to remove the EXIF data useless in the pictures!&#60;br /&#62;
Remove EXIF data will be really useful to create an image&#60;br /&#62;
An idea?&#60;br /&#62;
I love the project, I think integrating it into my framework&#60;/p&#62;
&#60;p&#62;Sorry for my english, i'm speak french :D
&#60;/p&#62;</description>
</item>
<item>
<title>skyzyx on "Feature Request: Memory-only images"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/feature-request-memory-only-images#post-125</link>
<pubDate>Fri, 16 Oct 2009 23:23:36 +0000</pubDate>
<dc:creator>skyzyx</dc:creator>
<guid isPermaLink="false">125@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;I'm probably a special case in that I'm doing some nutty things with Amazon S3, but I'd like to be able to use an S3 class to fetch the binary image data, pass that into PHPThumb, and (besides show and save) add a third option for returning the processed binary image data to a variable that I can use to write back to S3.&#60;/p&#62;
&#60;p&#62;Basically, I'd like the entire resizing/converting process to happen in memory, so that I can pull from (and push to) S3 without having to create temporary files on disk or be forced to output them to the buffer.&#60;/p&#62;
&#60;p&#62;Within a few minutes I was able to write a plugin that did the memory output, but I don't seem to be able to pass image data in without hacking on the core library — and that's not something I want to have to do.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>fametown on "Resize only width or height"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/resize-only-width-or-height#post-96</link>
<pubDate>Thu, 10 Sep 2009 05:20:15 +0000</pubDate>
<dc:creator>fametown</dc:creator>
<guid isPermaLink="false">96@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;Hi!&#60;/p&#62;
&#60;p&#62;Sorry if my english is not very good. :) I'm a spanish web developer.&#60;/p&#62;
&#60;p&#62;I love your thumb tool, a great piece of software! but i need 2 little modifications to make it perfect for me. &#60;/p&#62;
&#60;p&#62;First... i want resize my thumb with only the &#34;WIDTH&#34; value or only the &#34;HEIGHT&#34; value.&#60;/p&#62;
&#60;p&#62;For example in a 800x600 picture, i resize the height to 100 (height = 100 and width = 133) and then crop in X=0 and Y=0 to 100x100 thumbnail.&#60;/p&#62;
&#60;p&#62;And finally... a parameter to apply a &#34;Unsharp Mask&#34; to the thumbmails (you can take the code here &#60;a href=&#34;http://vikjavev.no/computing/ump.php&#34; rel=&#34;nofollow&#34;&#62;http://vikjavev.no/computing/ump.php&#60;/a&#62;).&#60;/p&#62;
&#60;p&#62;Thanks a lot :)
&#60;/p&#62;</description>
</item>
<item>
<title>alex on "imagick"</title>
<link>http://phpthumb.gxdlabs.com/forums/topic/imagick#post-50</link>
<pubDate>Mon, 13 Jul 2009 22:10:14 +0000</pubDate>
<dc:creator>alex</dc:creator>
<guid isPermaLink="false">50@http://phpthumb.gxdlabs.com/forums/</guid>
<description>&#60;p&#62;When will imagick be available?&#60;br /&#62;
And is there a way to be notified when new versions come available? (mailinglist)
&#60;/p&#62;</description>
</item>

</channel>
</rss>

