$data->description"; - $item->date = $data->date; + $item->date = strtotime($data->date); $item->author = get_bloginfo("admin_email"); $rss->addItem($item); diff -Naur fgallery-2.4.1/fgallery/functions/fim_functions.php fgallery-2.4.1-1/fgallery/functions/fim_functions.php --- fgallery-2.4.1/fgallery/functions/fim_functions.php 2006-10-18 12:12:23.000000000 +0500 +++ fgallery-2.4.1-1/fgallery/functions/fim_functions.php 2008-09-19 15:17:00.000000000 +0500 @@ -57,7 +57,7 @@
@@ -138,9 +138,9 @@
";
if($lightbox == 'false'){
- $fim .= "";
+ $fim .= "";
}else{
- $fim .= "";
+ $fim .= "";
}
$fim .= "";
if(get_option('fim_show_caption') == 'true'){
@@ -177,8 +177,11 @@
$query_string = $_SERVER['QUERY_STRING'];
$image = fim_query_one_image($_GET['image']);
$title = ($image->title!="") ? "$title" : "Image";
- $back_link = get_url("album/$image->cat");
+ // $back_link = get_url("album/$image->cat");
$folder = get_bloginfo('wpurl')."/wp-content/fgallery/".fim_get_folder($image->cat);
+ $gdsize = getimagesize($folder.rawurlencode($image->image));
+ $gdwidth = ($gdsize[0] <= 600 ? $gdsize[0] : 600);
+ $gdheight = ($gdsize[0] <= 600 ? $gdsize[1] : $gdsize[1] * 600 / $gdsize[0]);
$fim .= "";
$fim .= fim_build_navigation(fim_get_cat_name_($image->cat), $image->image, $image->cat);
@@ -190,9 +193,12 @@
$fim .= "";
}
$fim .= "";
+ if($gdsize[0] > 600) {
+ $fim .= "";
+ }
$fim .= "";
$fim .= "";
@@ -328,7 +334,7 @@
{
$md5sum = md5($email);
- return "";
+ return "";
}
// Get comments for an image
function fim_get_comments($image_id)
@@ -488,7 +494,7 @@
$order_by = get_option('fim_image_order');
$order_type = get_option('fim_image_order_type');
- return $wpdb->get_results("SELECT * FROM $table_image WHERE cat = '$catid' AND status <> 'exclude' ORDER BY '$order_by' $order_type");
+ return $wpdb->get_results("SELECT * FROM $table_image WHERE cat = '$catid' AND status <> 'exclude' ORDER BY `$table_image`.`$order_by` $order_type");
}
// Get all galleries
function fim_query_cats($status = 'public')
@@ -524,11 +530,11 @@
$imagetitle = ($t->title == "")?$image:$t->title;
$string = "".__('Current Albums', 'fgallery')."";
if($album && $image)
- $string .= " » $album";
+ $string .= " » ".htmlspecialchars($album)."";
else
- $string .= " » $album";
+ $string .= " » ".htmlspecialchars($album);
if($image)
- $string .= " » $imagetitle";
+ $string .= " » ".htmlspecialchars($imagetitle);
$string .= "
";
return $string;
@@ -553,11 +559,11 @@
echo "";
}
@@ -585,11 +591,11 @@
";
if(get_option('fim_use_lightbox') == 'true'){
echo "
- ";
+ ";
}
else{
- echo "";
+ echo "";
}
echo "
";
if($lightbox == 'false'){
- $fim .= "";
+ $fim .= "";
}else{
- $fim .= "";
+ $fim .= "";
}
$fim .= "
";
if(get_option('fim_show_caption') == 'true'){
@@ -177,8 +177,11 @@
$query_string = $_SERVER['QUERY_STRING'];
$image = fim_query_one_image($_GET['image']);
$title = ($image->title!="") ? "$title" : "Image";
- $back_link = get_url("album/$image->cat");
+ // $back_link = get_url("album/$image->cat");
$folder = get_bloginfo('wpurl')."/wp-content/fgallery/".fim_get_folder($image->cat);
+ $gdsize = getimagesize($folder.rawurlencode($image->image));
+ $gdwidth = ($gdsize[0] <= 600 ? $gdsize[0] : 600);
+ $gdheight = ($gdsize[0] <= 600 ? $gdsize[1] : $gdsize[1] * 600 / $gdsize[0]);
$fim .= "";
$fim .= fim_build_navigation(fim_get_cat_name_($image->cat), $image->image, $image->cat);
@@ -190,9 +193,12 @@
$fim .= "";
}
$fim .= "
";
+ if($gdsize[0] > 600) {
+ $fim .= "";
+ }
$fim .= "";
$fim .= "";
@@ -328,7 +334,7 @@
{
$md5sum = md5($email);
- return "";
+ return "";
}
// Get comments for an image
function fim_get_comments($image_id)
@@ -488,7 +494,7 @@
$order_by = get_option('fim_image_order');
$order_type = get_option('fim_image_order_type');
- return $wpdb->get_results("SELECT * FROM $table_image WHERE cat = '$catid' AND status <> 'exclude' ORDER BY '$order_by' $order_type");
+ return $wpdb->get_results("SELECT * FROM $table_image WHERE cat = '$catid' AND status <> 'exclude' ORDER BY `$table_image`.`$order_by` $order_type");
}
// Get all galleries
function fim_query_cats($status = 'public')
@@ -524,11 +530,11 @@
$imagetitle = ($t->title == "")?$image:$t->title;
$string = "