aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/thumbnail.php83
-rw-r--r--comments.php2
-rw-r--r--include/functions_notification.inc.php7
-rw-r--r--include/section_init.inc.php5
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php516
-rw-r--r--services/recent.php64
-rw-r--r--template/yoga/admin.tpl4
-rw-r--r--template/yoga/comments.tpl2
-rw-r--r--template/yoga/rating.js174
9 files changed, 398 insertions, 459 deletions
diff --git a/admin/thumbnail.php b/admin/thumbnail.php
index 543b589cc..345d08b3e 100644
--- a/admin/thumbnail.php
+++ b/admin/thumbnail.php
@@ -2,10 +2,10 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -192,54 +192,57 @@ $template->assign_vars(array(
$wo_thumbnails = array();
$thumbnalized = array();
+
// what is the directory to search in ?
$query = '
-SELECT galleries_url
- FROM '.SITES_TABLE.'
- WHERE id = 1
+SELECT galleries_url FROM '.SITES_TABLE.'
+ WHERE galleries_url NOT LIKE "http://%"
;';
-list($galleries_url) = mysql_fetch_array(pwg_query($query));
-$basedir = preg_replace('#/*$#', '', $galleries_url);
+$result = pwg_query($query);
+while ( $row=mysql_fetch_assoc($result) )
+{
+ $basedir = preg_replace('#/*$#', '', $row['galleries_url']);
+ $fs = get_fs($basedir);
-$fs = get_fs($basedir);
-// because isset is one hundred time faster than in_array
-$fs['thumbnails'] = array_flip($fs['thumbnails']);
+ // because isset is one hundred time faster than in_array
+ $fs['thumbnails'] = array_flip($fs['thumbnails']);
-foreach ($fs['elements'] as $path)
-{
- // only pictures need thumbnails
- if (in_array(get_extension($path), $conf['picture_ext']))
+ foreach ($fs['elements'] as $path)
{
- $dirname = dirname($path);
- $filename = basename($path);
-
- // only files matching the authorized filename pattern can be considered
- // as "without thumbnail"
- if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
+ // only pictures need thumbnails
+ if (in_array(get_extension($path), $conf['picture_ext']))
{
- continue;
- }
-
- // searching the element
- $filename_wo_ext = get_filename_wo_extension($filename);
- $tn_ext = '';
- $base_test = $dirname.'/thumbnail/';
- $base_test.= $conf['prefix_thumbnail'].$filename_wo_ext.'.';
- foreach ($conf['picture_ext'] as $ext)
- {
- if (isset($fs['thumbnails'][$base_test.$ext]))
+ $dirname = dirname($path);
+ $filename = basename($path);
+
+ // only files matching the authorized filename pattern can be considered
+ // as "without thumbnail"
+ if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
{
- $tn_ext = $ext;
- break;
+ continue;
+ }
+
+ // searching the element
+ $filename_wo_ext = get_filename_wo_extension($filename);
+ $tn_ext = '';
+ $base_test = $dirname.'/thumbnail/';
+ $base_test.= $conf['prefix_thumbnail'].$filename_wo_ext.'.';
+ foreach ($conf['picture_ext'] as $ext)
+ {
+ if (isset($fs['thumbnails'][$base_test.$ext]))
+ {
+ $tn_ext = $ext;
+ break;
+ }
+ }
+
+ if (empty($tn_ext))
+ {
+ array_push($wo_thumbnails, $path);
}
}
-
- if (empty($tn_ext))
- {
- array_push($wo_thumbnails, $path);
- }
- }
-}
+ } // next element
+} // next site id
// +-----------------------------------------------------------------------+
// | thumbnails creation |
// +-----------------------------------------------------------------------+
diff --git a/comments.php b/comments.php
index c7af65c90..432dad08a 100644
--- a/comments.php
+++ b/comments.php
@@ -85,7 +85,7 @@ if (isset($_GET['sort_order']))
// number of items to display
//
-$page['items_number'] = 5;
+$page['items_number'] = 10;
if (isset($_GET['items_number']))
{
$page['items_number'] = $_GET['items_number'];
diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php
index c7f3fdc49..d67b02ec6 100644
--- a/include/functions_notification.inc.php
+++ b/include/functions_notification.inc.php
@@ -474,7 +474,7 @@ SELECT date_available,
if ($max_elements>0)
{ // get some thumbnails ...
$query = '
-SELECT DISTINCT id, path, name, tn_ext
+SELECT DISTINCT id, path, name, tn_ext, file
FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id
'.$where_sql.'
AND date_available="'.$dates[$i]['date_available'].'"
@@ -535,7 +535,10 @@ function get_html_description_recent_post_date($date_detail)
{
$tn_src = get_thumbnail_url($element);
$description .= '<a href="'.
- make_picture_url(array('image_id' => $element['id']))
+ make_picture_url(array(
+ 'image_id' => $element['id'],
+ 'image_file' => $element['file'],
+ ))
.'"><img src="'.$tn_src.'"/></a>';
}
$description .= '...<br/>';
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index 399347659..0f44012de 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -411,11 +411,6 @@ if ('categories' == $page['section'])
: 'include/category_cats.inc.php';
}
- if (isset($page['flat']))
- {
- $page['title'] = $lang['recent_pics_cat'].' : '.$page['title'] ;
- }
-
if
(
(!isset($page['chronology_field'])) and
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index 7baaee2f6..1dfa5c243 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -33,263 +33,263 @@ $lang_info['direction'] = 'ltr';
$lang_info['code'] = 'en';
$lang_table_translate_ascii7bits = array(
- chr( 0) => chr(0),
- chr( 1) => chr( 1),
- chr( 2) => chr( 2),
- chr( 3) => chr( 3),
- chr( 4) => chr( 4),
- chr( 5) => chr( 5),
- chr( 6) => chr( 6),
- chr( 7) => chr( 7),
- chr( 8) => chr( 8),
- chr( 9) => chr( 9),
- chr( 10) => chr( 10),
- chr( 11) => chr( 11),
- chr( 12) => chr( 12),
- chr( 13) => chr( 13),
- chr( 14) => chr( 14),
- chr( 15) => chr( 15),
- chr( 16) => chr( 16),
- chr( 17) => chr( 17),
- chr( 18) => chr( 18),
- chr( 19) => chr( 19),
- chr( 20) => chr( 20),
- chr( 21) => chr( 21),
- chr( 22) => chr( 22),
- chr( 23) => chr( 23),
- chr( 24) => chr( 24),
- chr( 25) => chr( 25),
- chr( 26) => chr( 26),
- chr( 27) => chr( 27),
- chr( 28) => chr( 28),
- chr( 29) => chr( 29),
- chr( 30) => chr( 30),
- chr( 31) => chr( 31),
- chr( 32) => chr( 32),
- chr( 33) => chr( 33),
- chr( 34) => chr( 34),
- chr( 35) => chr( 35),
- chr( 36) => chr( 36),
- chr( 37) => chr( 37),
- chr( 38) => chr( 38),
- chr( 39) => chr( 39),
- chr( 40) => chr( 40),
- chr( 41) => chr( 41),
- chr( 42) => chr( 42),
- chr( 43) => chr( 43),
- chr( 44) => chr( 44),
- chr( 45) => chr( 45),
- chr( 46) => chr( 46),
- chr( 47) => chr( 47),
- chr( 48) => chr( 48),
- chr( 49) => chr( 49),
- chr( 50) => chr( 50),
- chr( 51) => chr( 51),
- chr( 52) => chr( 52),
- chr( 53) => chr( 53),
- chr( 54) => chr( 54),
- chr( 55) => chr( 55),
- chr( 56) => chr( 56),
- chr( 57) => chr( 57),
- chr( 58) => chr( 58),
- chr( 59) => chr( 59),
- chr( 60) => chr( 60),
- chr( 61) => chr( 61),
- chr( 62) => chr( 62),
- chr( 63) => chr( 63),
- chr( 64) => chr( 64),
- chr( 65) => chr( 65),
- chr( 66) => chr( 66),
- chr( 67) => chr( 67),
- chr( 68) => chr( 68),
- chr( 69) => chr( 69),
- chr( 70) => chr( 70),
- chr( 71) => chr( 71),
- chr( 72) => chr( 72),
- chr( 73) => chr( 73),
- chr( 74) => chr( 74),
- chr( 75) => chr( 75),
- chr( 76) => chr( 76),
- chr( 77) => chr( 77),
- chr( 78) => chr( 78),
- chr( 79) => chr( 79),
- chr( 80) => chr( 80),
- chr( 81) => chr( 81),
- chr( 82) => chr( 82),
- chr( 83) => chr( 83),
- chr( 84) => chr( 84),
- chr( 85) => chr( 85),
- chr( 86) => chr( 86),
- chr( 87) => chr( 87),
- chr( 88) => chr( 88),
- chr( 89) => chr( 89),
- chr( 90) => chr( 90),
- chr( 91) => chr( 91),
- chr( 92) => chr( 92),
- chr( 93) => chr( 93),
- chr( 94) => chr( 94),
- chr( 95) => chr( 95),
- chr( 96) => chr( 96),
- chr( 97) => chr( 97),
- chr( 98) => chr( 98),
- chr( 99) => chr( 99),
- chr(100) => chr(100),
- chr(101) => chr(101),
- chr(102) => chr(102),
- chr(103) => chr(103),
- chr(104) => chr(104),
- chr(105) => chr(105),
- chr(106) => chr(106),
- chr(107) => chr(107),
- chr(108) => chr(108),
- chr(109) => chr(109),
- chr(110) => chr(110),
- chr(111) => chr(111),
- chr(112) => chr(112),
- chr(113) => chr(113),
- chr(114) => chr(114),
- chr(115) => chr(115),
- chr(116) => chr(116),
- chr(117) => chr(117),
- chr(118) => chr(118),
- chr(119) => chr(119),
- chr(120) => chr(120),
- chr(121) => chr(121),
- chr(122) => chr(122),
- chr(123) => chr(123),
- chr(124) => chr(124),
- chr(125) => chr(125),
- chr(126) => chr(126),
- chr(127) => chr(127),
- chr(128) => chr(128),
- chr(129) => chr( 95),
- chr(130) => chr( 44),
- chr(131) => chr(102),
- chr(132) => chr( 44),
- chr(133) => chr( 46),
- chr(134) => chr( 43),
- chr(135) => chr( 43),
- chr(136) => chr( 32),
- chr(137) => chr( 37),
- chr(138) => chr( 83),
- chr(139) => chr( 60),
- chr(140) => chr( 69),
- chr(141) => chr( 32),
- chr(142) => chr( 90),
- chr(143) => chr( 32),
- chr(144) => chr( 32),
- chr(145) => chr( 39),
- chr(146) => chr( 39),
- chr(147) => chr( 34),
- chr(148) => chr( 34),
- chr(149) => chr( 46),
- chr(150) => chr( 45),
- chr(151) => chr( 45),
- chr(152) => chr( 32),
- chr(153) => chr( 32),
- chr(154) => chr(115),
- chr(155) => chr( 62),
- chr(156) => chr(111),
- chr(157) => chr( 32),
- chr(158) => chr(122),
- chr(159) => chr( 89),
- chr(160) => chr( 32),
- chr(161) => chr( 33),
- chr(162) => chr( 99),
- chr(163) => chr( 76),
- chr(164) => chr( 32),
- chr(165) => chr( 86),
- chr(166) => chr(124),
- chr(167) => chr( 83),
- chr(168) => chr( 32),
- chr(169) => chr( 99),
- chr(170) => chr( 97),
- chr(171) => chr( 60),
- chr(172) => chr( 32),
- chr(173) => chr( 45),
- chr(174) => chr( 114),
- chr(175) => chr( 45),
- chr(176) => chr( 111),
- chr(177) => chr( 43),
- chr(178) => chr( 50),
- chr(179) => chr( 51),
- chr(180) => chr( 39),
- chr(181) => chr(117),
- chr(182) => chr( 32),
- chr(183) => chr( 46),
- chr(184) => chr( 97),
- chr(185) => chr( 49),
- chr(186) => chr(111),
- chr(187) => chr( 62),
- chr(188) => chr( 32),
- chr(189) => chr( 32),
- chr(190) => chr( 32),
- chr(191) => chr( 63),
- chr(192) => chr( 65),
- chr(193) => chr( 65),
- chr(194) => chr( 65),
- chr(195) => chr( 65),
- chr(196) => chr( 65),
- chr(197) => chr( 65),
- chr(198) => chr( 65),
- chr(199) => chr( 67),
- chr(200) => chr( 69),
- chr(201) => chr( 69),
- chr(202) => chr( 69),
- chr(203) => chr( 69),
- chr(204) => chr( 73),
- chr(205) => chr( 73),
- chr(206) => chr( 73),
- chr(207) => chr( 73),
- chr(208) => chr( 68),
- chr(209) => chr( 78),
- chr(210) => chr( 79),
- chr(211) => chr( 79),
- chr(212) => chr( 79),
- chr(213) => chr( 79),
- chr(214) => chr( 79),
- chr(215) => chr( 42),
- chr(216) => chr( 48),
- chr(217) => chr( 85),
- chr(218) => chr( 85),
- chr(219) => chr( 85),
- chr(220) => chr( 85),
- chr(221) => chr( 89),
- chr(222) => chr( 80),
- chr(223) => chr( 66),
- chr(224) => chr( 97),
- chr(225) => chr( 97),
- chr(226) => chr( 97),
- chr(227) => chr( 97),
- chr(228) => chr( 97),
- chr(229) => chr( 97),
- chr(230) => chr( 97),
- chr(231) => chr( 99),
- chr(232) => chr(101),
- chr(233) => chr(101),
- chr(234) => chr(101),
- chr(235) => chr(101),
- chr(236) => chr(105),
- chr(237) => chr(105),
- chr(238) => chr(105),
- chr(239) => chr(105),
- chr(240) => chr( 97),
- chr(241) => chr(110),
- chr(242) => chr(111),
- chr(243) => chr(111),
- chr(244) => chr(111),
- chr(245) => chr(111),
- chr(246) => chr(111),
- chr(247) => chr( 47),
- chr(248) => chr( 48),
- chr(249) => chr(117),
- chr(250) => chr(117),
- chr(251) => chr(117),
- chr(252) => chr(117),
- chr(253) => chr(117),
- chr(254) => chr( 98),
- chr(255) => chr(121)
- );
+ chr( 0) => chr(0),
+ chr( 1) => chr( 1),
+ chr( 2) => chr( 2),
+ chr( 3) => chr( 3),
+ chr( 4) => chr( 4),
+ chr( 5) => chr( 5),
+ chr( 6) => chr( 6),
+ chr( 7) => chr( 7),
+ chr( 8) => chr( 8),
+ chr( 9) => chr( 9),
+ chr( 10) => chr( 10),
+ chr( 11) => chr( 11),
+ chr( 12) => chr( 12),
+ chr( 13) => chr( 13),
+ chr( 14) => chr( 14),
+ chr( 15) => chr( 15),
+ chr( 16) => chr( 16),
+ chr( 17) => chr( 17),
+ chr( 18) => chr( 18),
+ chr( 19) => chr( 19),
+ chr( 20) => chr( 20),
+ chr( 21) => chr( 21),
+ chr( 22) => chr( 22),
+ chr( 23) => chr( 23),
+ chr( 24) => chr( 24),
+ chr( 25) => chr( 25),
+ chr( 26) => chr( 26),
+ chr( 27) => chr( 27),
+ chr( 28) => chr( 28),
+ chr( 29) => chr( 29),
+ chr( 30) => chr( 30),
+ chr( 31) => chr( 31),
+ chr( 32) => chr( 32),
+ chr( 33) => chr( 33),
+ chr( 34) => chr( 34),
+ chr( 35) => chr( 35),
+ chr( 36) => chr( 36),
+ chr( 37) => chr( 37),
+ chr( 38) => chr( 38),
+ chr( 39) => chr( 39),
+ chr( 40) => chr( 40),
+ chr( 41) => chr( 41),
+ chr( 42) => chr( 42),
+ chr( 43) => chr( 43),
+ chr( 44) => chr( 44),
+ chr( 45) => chr( 45),
+ chr( 46) => chr( 46),
+ chr( 47) => chr( 47),
+ chr( 48) => chr( 48),
+ chr( 49) => chr( 49),
+ chr( 50) => chr( 50),
+ chr( 51) => chr( 51),
+ chr( 52) => chr( 52),
+ chr( 53) => chr( 53),
+ chr( 54) => chr( 54),
+ chr( 55) => chr( 55),
+ chr( 56) => chr( 56),
+ chr( 57) => chr( 57),
+ chr( 58) => chr( 58),
+ chr( 59) => chr( 59),
+ chr( 60) => chr( 60),
+ chr( 61) => chr( 61),
+ chr( 62) => chr( 62),
+ chr( 63) => chr( 63),
+ chr( 64) => chr( 64),
+ chr( 65) => chr( 65),
+ chr( 66) => chr( 66),
+ chr( 67) => chr( 67),
+ chr( 68) => chr( 68),
+ chr( 69) => chr( 69),
+ chr( 70) => chr( 70),
+ chr( 71) => chr( 71),
+ chr( 72) => chr( 72),
+ chr( 73) => chr( 73),
+ chr( 74) => chr( 74),
+ chr( 75) => chr( 75),
+ chr( 76) => chr( 76),
+ chr( 77) => chr( 77),
+ chr( 78) => chr( 78),
+ chr( 79) => chr( 79),
+ chr( 80) => chr( 80),
+ chr( 81) => chr( 81),
+ chr( 82) => chr( 82),
+ chr( 83) => chr( 83),
+ chr( 84) => chr( 84),
+ chr( 85) => chr( 85),
+ chr( 86) => chr( 86),
+ chr( 87) => chr( 87),
+ chr( 88) => chr( 88),
+ chr( 89) => chr( 89),
+ chr( 90) => chr( 90),
+ chr( 91) => chr( 91),
+ chr( 92) => chr( 92),
+ chr( 93) => chr( 93),
+ chr( 94) => chr( 94),
+ chr( 95) => chr( 95),
+ chr( 96) => chr( 96),
+ chr( 97) => chr( 97),
+ chr( 98) => chr( 98),
+ chr( 99) => chr( 99),
+ chr(100) => chr(100),
+ chr(101) => chr(101),
+ chr(102) => chr(102),
+ chr(103) => chr(103),
+ chr(104) => chr(104),
+ chr(105) => chr(105),
+ chr(106) => chr(106),
+ chr(107) => chr(107),
+ chr(108) => chr(108),
+ chr(109) => chr(109),
+ chr(110) => chr(110),
+ chr(111) => chr(111),
+ chr(112) => chr(112),
+ chr(113) => chr(113),
+ chr(114) => chr(114),
+ chr(115) => chr(115),
+ chr(116) => chr(116),
+ chr(117) => chr(117),
+ chr(118) => chr(118),
+ chr(119) => chr(119),
+ chr(120) => chr(120),
+ chr(121) => chr(121),
+ chr(122) => chr(122),
+ chr(123) => chr(123),
+ chr(124) => chr(124),
+ chr(125) => chr(125),
+ chr(126) => chr(126),
+ chr(127) => chr(127),
+ chr(128) => chr(128),
+ chr(129) => chr( 95),
+ chr(130) => chr( 44),
+ chr(131) => chr(102),
+ chr(132) => chr( 44),
+ chr(133) => chr( 46),
+ chr(134) => chr( 43),
+ chr(135) => chr( 43),
+ chr(136) => chr( 32),
+ chr(137) => chr( 37),
+ chr(138) => chr( 83),
+ chr(139) => chr( 60),
+ chr(140) => chr( 69),
+ chr(141) => chr( 32),
+ chr(142) => chr( 90),
+ chr(143) => chr( 32),
+ chr(144) => chr( 32),
+ chr(145) => chr( 39),
+ chr(146) => chr( 39),
+ chr(147) => chr( 34),
+ chr(148) => chr( 34),
+ chr(149) => chr( 46),
+ chr(150) => chr( 45),
+ chr(151) => chr( 45),
+ chr(152) => chr( 32),
+ chr(153) => chr( 32),
+ chr(154) => chr(115),
+ chr(155) => chr( 62),
+ chr(156) => chr(111),
+ chr(157) => chr( 32),
+ chr(158) => chr(122),
+ chr(159) => chr( 89),
+ chr(160) => chr( 32),
+ chr(161) => chr( 33),
+ chr(162) => chr( 99),
+ chr(163) => chr( 76),
+ chr(164) => chr( 32),
+ chr(165) => chr( 86),
+ chr(166) => chr(124),
+ chr(167) => chr( 83),
+ chr(168) => chr( 32),
+ chr(169) => chr( 99),
+ chr(170) => chr( 97),
+ chr(171) => chr( 60),
+ chr(172) => chr( 32),
+ chr(173) => chr( 45),
+ chr(174) => chr( 114),
+ chr(175) => chr( 45),
+ chr(176) => chr( 111),
+ chr(177) => chr( 43),
+ chr(178) => chr( 50),
+ chr(179) => chr( 51),
+ chr(180) => chr( 39),
+ chr(181) => chr(117),
+ chr(182) => chr( 32),
+ chr(183) => chr( 46),
+ chr(184) => chr( 97),
+ chr(185) => chr( 49),
+ chr(186) => chr(111),
+ chr(187) => chr( 62),
+ chr(188) => chr( 32),
+ chr(189) => chr( 32),
+ chr(190) => chr( 32),
+ chr(191) => chr( 63),
+ chr(192) => chr( 65),
+ chr(193) => chr( 65),
+ chr(194) => chr( 65),
+ chr(195) => chr( 65),
+ chr(196) => chr( 65),
+ chr(197) => chr( 65),
+ chr(198) => chr( 65),
+ chr(199) => chr( 67),
+ chr(200) => chr( 69),
+ chr(201) => chr( 69),
+ chr(202) => chr( 69),
+ chr(203) => chr( 69),
+ chr(204) => chr( 73),
+ chr(205) => chr( 73),
+ chr(206) => chr( 73),
+ chr(207) => chr( 73),
+ chr(208) => chr( 68),
+ chr(209) => chr( 78),
+ chr(210) => chr( 79),
+ chr(211) => chr( 79),
+ chr(212) => chr( 79),
+ chr(213) => chr( 79),
+ chr(214) => chr( 79),
+ chr(215) => chr( 42),
+ chr(216) => chr( 48),
+ chr(217) => chr( 85),
+ chr(218) => chr( 85),
+ chr(219) => chr( 85),
+ chr(220) => chr( 85),
+ chr(221) => chr( 89),
+ chr(222) => chr( 80),
+ chr(223) => chr( 66),
+ chr(224) => chr( 97),
+ chr(225) => chr( 97),
+ chr(226) => chr( 97),
+ chr(227) => chr( 97),
+ chr(228) => chr( 97),
+ chr(229) => chr( 97),
+ chr(230) => chr( 97),
+ chr(231) => chr( 99),
+ chr(232) => chr(101),
+ chr(233) => chr(101),
+ chr(234) => chr(101),
+ chr(235) => chr(101),
+ chr(236) => chr(105),
+ chr(237) => chr(105),
+ chr(238) => chr(105),
+ chr(239) => chr(105),
+ chr(240) => chr( 97),
+ chr(241) => chr(110),
+ chr(242) => chr(111),
+ chr(243) => chr(111),
+ chr(244) => chr(111),
+ chr(245) => chr(111),
+ chr(246) => chr(111),
+ chr(247) => chr( 47),
+ chr(248) => chr( 48),
+ chr(249) => chr(117),
+ chr(250) => chr(117),
+ chr(251) => chr(117),
+ chr(252) => chr(117),
+ chr(253) => chr(117),
+ chr(254) => chr( 98),
+ chr(255) => chr(121)
+);
$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (rated %d times, standard deviation = %.2f)';
$lang['%d Kb'] = '%d Kb';
@@ -574,7 +574,7 @@ $lang['searched words : %s'] = 'searched words : %s';
$lang['send_mail'] = 'Contact';
$lang['set as category representative'] = 'set as category representative';
$lang['show_nb_comments'] = 'Show number of comments';
-$lang['show_nb_hits'] = 'Show hits count';
+$lang['show_nb_hits'] = 'Show number of hits';
$lang['slideshow'] = 'slideshow';
$lang['slideshow_stop'] = 'stop the slideshow';
$lang['special_categories'] = 'Specials';
diff --git a/services/recent.php b/services/recent.php
deleted file mode 100644
index 808b5a165..000000000
--- a/services/recent.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-
-$where =
- get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'ic.category_id',
- 'visible_categories' => 'ic.category_id',
- 'visible_images' => 'i.id'
- ),
- ''
- );
-$list = implode(',', $final);
-if ( $where !== '' and $list !== '' )
-{
- $where .= ' AND ';
-}
-$where .= ( $list == '') ? '' :
- 'i.`id` IN ('. $list .')';
-$query='
- SELECT DISTINCT (i.`id`),
- i.`path` , i.`file` , i.`date_available` ,
- i.`date_creation`, i.`tn_ext` , i.`name` ,
- i.`filesize` , i.`storage_category_id` , i.`average_rate`,
- i.`comment` , i.`author` , i.`hit` ,i.`width` ,
- i.`height`
- FROM `'.IMAGES_TABLE.'` AS i
- INNER JOIN `'.IMAGE_CATEGORY_TABLE.'`
- AS ic ON i.`id` = ic.`image_id`
- WHERE '. $where .'
-';
-/* recent = Date_available desc order */
-$query .= ' ORDER BY i.`date_available` DESC, RAND() DESC ';
-$query .= ' LIMIT 0 , '. $limit .';';
-// echo $query . '<br />';
-$result = pwg_query( $query );
-
-$template->assign_vars(
- array(
- 'TITLE' => 'recent',
- )
- );
-$template->assign_block_vars(
- 'row', array()
- );
-$template->assign_block_vars(
- 'row.Normal',
- array(
- 'WIDTH'=> 682,
- 'HEIGH'=> 682,
- 'URL'=> 'http://www.monsite.com/pwg/galleries/shared/cat/image.jpg',
- )
- );
-$template->assign_block_vars(
- 'row',
- array(
- 'ID'=> 22,
- 'CAPTION'=> 'L\'image que je veux',
- 'DATE'=> '18/12/2006',
- 'COMMENT'=> 'Voila voili voilou ! Voila voili voilou !',
- )
- );
-?>
diff --git a/template/yoga/admin.tpl b/template/yoga/admin.tpl
index 9da560996..3dca4cbf6 100644
--- a/template/yoga/admin.tpl
+++ b/template/yoga/admin.tpl
@@ -15,7 +15,7 @@
<ul>
<li><a href="{U_FAQ}">{lang:instructions}</a></li>
<li><a href="{U_SITE_MANAGER}">{lang:Site manager}</a></li>
-
+ <li><a href="{U_CAT_UPDATE}">{lang:update}</a></li>
<li>
{lang:history}
<ul>
@@ -23,8 +23,6 @@
<li><a href="{U_HISTORY_SEARCH}">{lang:Search}</a></li>
</ul>
</li>
-
- <li><a href="{U_CAT_UPDATE}">{lang:update}</a></li>
</ul>
</dd>
</dl>
diff --git a/template/yoga/comments.tpl b/template/yoga/comments.tpl
index 4812d6fa4..c175224b6 100644
--- a/template/yoga/comments.tpl
+++ b/template/yoga/comments.tpl
@@ -21,7 +21,7 @@
{lang:Category}
<select name="cat">
<!-- BEGIN category -->
- <option class="{category.CLASS}" {category.SELECTED} value="{category.VALUE}">{category.OPTION}</option>
+ <option {category.SELECTED} value="{category.VALUE}">{category.OPTION}</option>
<!-- END category -->
</select>
</label>
diff --git a/template/yoga/rating.js b/template/yoga/rating.js
index e934bb858..a4f8f86b8 100644
--- a/template/yoga/rating.js
+++ b/template/yoga/rating.js
@@ -1,86 +1,90 @@
-makeNiceRatingForm();
-
-function makeNiceRatingForm()
-{
- var form = document.getElementById('rateForm');
- if (!form) return; //? template changed
- gRatingButtons = form.getElementsByTagName('input');
-
- gUserRating = "";
- for (var i=0; i<gRatingButtons.length; i++)
- {
- if ( gRatingButtons[i].type=="button" )
- {
- gUserRating = gRatingButtons[i].value;
- break;
- }
- }
-
- for (var i=0; i<gRatingButtons.length; i++)
- {
- var rateButton = gRatingButtons[i];
- rateButton.initialRateValue = rateButton.value; // save it as a property
-
- rateButton.value = ""; //hide the text IE/Opera
- rateButton.style.textIndent = "-50px"; //hide the text FF
-
- if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
- rateButton.parentNode.removeChild(rateButton.nextSibling);
- if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
- rateButton.parentNode.removeChild(rateButton.previousSibling);
-
- if(window.addEventListener){ // Mozilla, Netscape, Firefox
- rateButton.addEventListener("click", updateRating, false );
- rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
- rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
- }
- else if(window.attachEvent) { // IE
- rateButton.attachEvent("onclick", updateRating);
- rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
- rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
- }
- }
- resetRatingStarDisplay();
-}
-
-function resetRatingStarDisplay()
-{
- updateRatingStarDisplay( gUserRating );
-}
-
-function updateRatingStarDisplay(userRating)
-{
- for (i=0; i<gRatingButtons.length; i++)
- {
- var rateButton = gRatingButtons[i];
- if (userRating!=="" && userRating>=rateButton.initialRateValue )
- {
- rateButton.className = "rateButtonStarFull";
- }
- else
- {
- rateButton.className = "rateButtonStarEmpty";
- }
- }
-}
-
-function updateRatingStarDisplayEvt(e)
-{
- if (e.target)
- updateRatingStarDisplay(e.target.initialRateValue);
- else //IE
- updateRatingStarDisplay(e.srcElement.initialRateValue);
-}
-
-function updateRating(e)
-{
- if (e.target)
- var rateButton = e.target;
- else //IE
- var rateButton = e.srcElement;
- if (rateButton.initialRateValue == gUserRating)
- return false; //nothing to do
- // some ajax here one day would be nice
- rateButton.value = rateButton.initialRateValue; // put back real value
- return true;
+makeNiceRatingForm();
+
+function makeNiceRatingForm()
+{
+ var form = document.getElementById('rateForm');
+ if (!form) return; //? template changed
+ gRatingButtons = form.getElementsByTagName('input');
+
+ gUserRating = "";
+ for (var i=0; i<gRatingButtons.length; i++)
+ {
+ if ( gRatingButtons[i].type=="button" )
+ {
+ gUserRating = gRatingButtons[i].value;
+ break;
+ }
+ }
+
+ for (var i=0; i<gRatingButtons.length; i++)
+ {
+ var rateButton = gRatingButtons[i];
+ rateButton.initialRateValue = rateButton.value; // save it as a property
+
+ rateButton.value = ""; //hide the text IE/Opera
+ with (rateButton.style)
+ {
+ textIndent = "-50px"; //hide the text FF
+ marginLeft = marginRight = 0;
+ }
+
+ if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
+ rateButton.parentNode.removeChild(rateButton.nextSibling);
+ if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
+ rateButton.parentNode.removeChild(rateButton.previousSibling);
+
+ if(window.addEventListener){ // Mozilla, Netscape, Firefox
+ rateButton.addEventListener("click", updateRating, false );
+ rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
+ rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
+ }
+ else if(window.attachEvent) { // IE
+ rateButton.attachEvent("onclick", updateRating);
+ rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
+ rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
+ }
+ }
+ resetRatingStarDisplay();
+}
+
+function resetRatingStarDisplay()
+{
+ updateRatingStarDisplay( gUserRating );
+}
+
+function updateRatingStarDisplay(userRating)
+{
+ for (i=0; i<gRatingButtons.length; i++)
+ {
+ var rateButton = gRatingButtons[i];
+ if (userRating!=="" && userRating>=rateButton.initialRateValue )
+ {
+ rateButton.className = "rateButtonStarFull";
+ }
+ else
+ {
+ rateButton.className = "rateButtonStarEmpty";
+ }
+ }
+}
+
+function updateRatingStarDisplayEvt(e)
+{
+ if (e.target)
+ updateRatingStarDisplay(e.target.initialRateValue);
+ else //IE
+ updateRatingStarDisplay(e.srcElement.initialRateValue);
+}
+
+function updateRating(e)
+{
+ if (e.target)
+ var rateButton = e.target;
+ else //IE
+ var rateButton = e.srcElement;
+ if (rateButton.initialRateValue == gUserRating)
+ return false; //nothing to do
+ // some ajax here one day would be nice
+ rateButton.value = rateButton.initialRateValue; // put back real value
+ return true;
} \ No newline at end of file