aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-10-16 01:45:26 +0000
committerrvelices <rv-github@modusoptimus.com>2007-10-16 01:45:26 +0000
commit0fea35029516c679836ff72d3f8474fbc45b8dc6 (patch)
tree03014c5ae6a5b7b1e753c14eecc70ab160152896
parent26d336bd3b8027ec67f30e92c6fc5309060adb3a (diff)
- fix plugin menu link broken with xamp (realpath behaves differently) (merge from trunk to branch 1_7)
- added some meta_robots (noindex and nofollow) on popuphelp, search_rules and search seaction (googlebot gets crazy) git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2137 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/include/functions_plugins.inc.php3
-rw-r--r--include/section_init.inc.php8
-rw-r--r--popuphelp.php8
-rw-r--r--search_rules.php4
-rw-r--r--template/yoga/index.tpl2
5 files changed, 15 insertions, 10 deletions
diff --git a/admin/include/functions_plugins.inc.php b/admin/include/functions_plugins.inc.php
index dfbfbb8a3..f73a78d80 100644
--- a/admin/include/functions_plugins.inc.php
+++ b/admin/include/functions_plugins.inc.php
@@ -3,7 +3,6 @@
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
-// | branch : BSF (Best So Far)
// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
@@ -95,7 +94,7 @@ function get_admin_plugin_menu_link($file)
$url = get_root_url().'admin.php?page=plugin';
if (false!==$real_file)
{
- $real_plugin_path = realpath(PHPWG_PLUGINS_PATH);
+ $real_plugin_path = rtrim(realpath(PHPWG_PLUGINS_PATH), '\\/');
$file = substr($real_file, strlen($real_plugin_path)+1);
$file = str_replace('\\', '/', $file);//Windows
$url .= '&amp;section='.urlencode($file);
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index 05bc60f29..f80b321a1 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -520,7 +520,8 @@ SELECT id,file
// add meta robots noindex, nofollow to avoid unnecesary robot crawls
$page['meta_robots']=array();
-if ( isset($page['chronology_field']) or isset($page['flat'])
+if ( isset($page['chronology_field'])
+ or ( isset($page['flat']) and isset($page['category']) )
or 'list'==$page['section'] or 'recent_pics'==$page['section'] )
{
$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
@@ -534,8 +535,13 @@ elseif ('tags' == $page['section'])
}
elseif ('recent_cats'==$page['section'])
{
+ $page['meta_robots']['noindex']=1;
+}
+elseif ('search'==$page['section'])
+{
$page['meta_robots']['nofollow']=1;
}
+
if ( $filter['enabled'] )
{
$page['meta_robots']['noindex']=1;
diff --git a/popuphelp.php b/popuphelp.php
index 39abd3596..fdb9a9b5c 100644
--- a/popuphelp.php
+++ b/popuphelp.php
@@ -2,10 +2,9 @@
// +-----------------------------------------------------------------------+
// | 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$
@@ -40,9 +39,10 @@ check_status(ACCESS_GUEST);
$page['body_id'] = 'thePopuphelpPage';
$title = l10n('PhpWebGallery Help');
$page['page_banner'] = '<h1>'.$title.'</h1>';
+$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
include(PHPWG_ROOT_PATH.'include/page_header.php');
-if
+if
(
isset($_GET['page'])
and preg_match('/^[a-z_]*$/', $_GET['page'])
diff --git a/search_rules.php b/search_rules.php
index b3b213352..3ab6825b1 100644
--- a/search_rules.php
+++ b/search_rules.php
@@ -2,9 +2,8 @@
// +-----------------------------------------------------------------------+
// | 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 : $Id$
// | last update : $Date$
// | last modifier : $Author$
@@ -49,6 +48,7 @@ include_once( PHPWG_ROOT_PATH.'include/functions_search.inc.php' );
$page['body_id'] = 'thePopuphelpPage';
$title = l10n('PhpWebGallery Help');
$page['page_banner'] = '<h1>'.$title.'</h1>';
+$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
include(PHPWG_ROOT_PATH.'include/page_header.php');
$template->set_filenames(array('search_rules' => 'search_rules.tpl'));
diff --git a/template/yoga/index.tpl b/template/yoga/index.tpl
index 1224e0bf2..f8fe1b192 100644
--- a/template/yoga/index.tpl
+++ b/template/yoga/index.tpl
@@ -24,7 +24,7 @@
<!-- END edit -->
<!-- BEGIN search_rules -->
- <li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
+ <li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}" rel="nofollow"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
<!-- END search_rules -->
<!-- BEGIN mode_normal -->