aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-01-27 01:11:43 +0000
committerrvelices <rv-github@modusoptimus.com>2006-01-27 01:11:43 +0000
commita8fd5ee6cf5cf061ed0ff789d6030290b3418be5 (patch)
tree7c31e61422551c2c0672cd43611729f70202bfae /include
parent10329e517b22671f002bcb2929ebb54a09f22573 (diff)
improvement: got rid of num= _GET param in category.php (use only start=) so
that links to category for search engines are the same as in category pagination feature 77: standard navigation link : HTML Link types improvement: add go to first and last image buttons in picture page improvement: do not increase image hit in picture.php when rating, adding to favorites, caddie, ... improvement: show number of hits in most_visited (as best_rated shows the rate) git-svn-id: http://piwigo.org/svn/trunk@1014 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/category_default.inc.php7
-rw-r--r--include/functions_html.inc.php17
2 files changed, 19 insertions, 5 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 0965b331e..fd04181e9 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -39,7 +39,7 @@ $array_cat_directories = array();
$query = '
SELECT DISTINCT(id),path,file,date_available
- ,tn_ext,name,filesize,storage_category_id,average_rate
+ ,tn_ext,name,filesize,storage_category_id,average_rate,hit
FROM '.IMAGES_TABLE.' AS i
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=ic.image_id
'.$page['where'].'
@@ -108,6 +108,11 @@ while ($row = mysql_fetch_array($result))
{
$name = '('.$row['average_rate'].') '.$name;
}
+ else
+ if ($page['cat'] == 'most_visited')
+ {
+ $name = '('.$row['hit'].') '.$name;
+ }
if ($page['cat'] == 'search')
{
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index 4f41d858c..bff44f620 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -82,7 +82,7 @@ function create_navigation_bar($url, $nb_element, $start,
{
$navbar.= '<a href="';
$navbar.= $url.'&amp;start=0';
- $navbar.= '" class="'.$link_class.'">'.$lang['first_page'];
+ $navbar.= '" class="'.$link_class.'" rel="start">'.$lang['first_page'];
$navbar.= '</a>';
}
else
@@ -96,7 +96,7 @@ function create_navigation_bar($url, $nb_element, $start,
$previous = $start - $nb_element_page;
$navbar.= '<a href="';
$navbar.= $url.'&amp;start='.$previous;
- $navbar.= '" class="'.$link_class.'">'.$lang['previous_page'];
+ $navbar.= '" class="'.$link_class.'" rel="prev">'.$lang['previous_page'];
$navbar.= '</a>';
}
else
@@ -130,7 +130,16 @@ function create_navigation_bar($url, $nb_element, $start,
$temp_start = ($i - 1) * $nb_element_page;
$navbar.= '&nbsp;<a href="';
$navbar.= $url.'&amp;start='.$temp_start;
- $navbar.= '" class="'.$link_class.'">'.$i.'</a>';
+ $navbar.= '" class="'.$link_class.'"';
+ if ($i == $cur_page - 1)
+ {
+ $navbar.= ' rel="prev"';
+ }
+ if ($i == $cur_page + 1)
+ {
+ $navbar.= ' rel="next"';
+ }
+ $navbar.='>'.$i.'</a>';
}
else
{
@@ -159,7 +168,7 @@ function create_navigation_bar($url, $nb_element, $start,
$next = $start + $nb_element_page;
$navbar.= '<a href="';
$navbar.= $url.'&amp;start='.$next;
- $navbar.= '" class="'.$link_class.'">'.$lang['next_page'].'</a>';
+ $navbar.= '" class="'.$link_class.'" rel="next">'.$lang['next_page'].'</a>';
}
else
{