- $conf['meta_ref'] is a new configuration parameter (Default true)

Meta tags for description, author, and keywords are generated,
except if meta robots "noindex" is forced (with some pages like search, recent cats, etc.).

In addition, $conf['meta_ref'] = false is forcing "noindex, nofollow".

git-svn-id: http://piwigo.org/svn/branches/2.0@3040 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
vdigital
2009-01-03 21:03:46 +00:00
parent 7aecaf7774
commit d51c92831b
4 changed files with 32 additions and 4 deletions
+3
View File
@@ -154,6 +154,9 @@ $conf['tn_height'] = 128;
// bottom of each page ?
$conf['show_version'] = true;
// meta_ref to reference multiple sets of incorporated pages or elements
// Set it false to avoid referencing in google, and other search engines.
$conf['meta_ref'] = true;
// links : list of external links to add in the menu. An example is the best
// than a long explanation :
+11
View File
@@ -56,6 +56,13 @@ if ( !empty($header_notes) )
$template->assign('header_notes',$header_notes);
}
// No referencing is required
if ( !$conf['meta_ref'] )
{
$page['meta_robots']['noindex'] = 1;
$page['meta_robots']['nofollow'] = 1;
}
if ( !empty($page['meta_robots']) )
{
$template->append('head_elements',
@@ -64,6 +71,10 @@ if ( !empty($page['meta_robots']) )
.'">'
);
}
if ( !isset($page['meta_robots']['noindex']) )
{
$template->assign('meta_ref',1);
}
// refresh
if ( isset( $refresh ) and intval($refresh) >= 0
+17 -3
View File
@@ -1,10 +1,23 @@
{* $Id$ *}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
{if isset($meta_ref) }
{if isset($INFO_AUTHOR)}
<meta name="author" content="{$INFO_AUTHOR|replace:'"':' '}">
{/if}
{if isset($related_tags)}
<meta name="keywords" content="{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}{$tag.name}{/foreach}">
{/if}
{if isset($COMMENT_IMG)}
<meta name="description" content="{$COMMENT_IMG|strip_tags:false|replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
{else}
<meta name="description" content="{$PAGE_TITLE}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
{/if}
{/if}
<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico">
@@ -49,7 +62,8 @@
<![endif]-->
{if not empty($head_elements)}
{foreach from=$head_elements item=elt}{$elt}{/foreach}
{foreach from=$head_elements item=elt}{$elt}
{/foreach}
{/if}
</head>
+1 -1
View File
@@ -4,7 +4,7 @@
{/if}
<img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
{if isset($COMMENT_IMG)}
title="{$COMMENT_IMG|replace:'"':' '}" {else} title="{$current.TITLE|replace:'"':' '} - {$ALT_IMG}"
title="{$COMMENT_IMG|strip_tags:false|replace:'"':' '}" {else} title="{$current.TITLE|replace:'"':' '} - {$ALT_IMG}"
{/if}>
{if isset($high) }
</a>