Changeset 3041


Ignore:
Timestamp:
Jan 3, 2009, 10:08:22 PM (15 years ago)
Author:
vdigital
Message:
  • $confmeta_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, $confmeta_ref = false is forcing "noindex, nofollow".
merge -c3040 from branch 2.0 to trunk

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/config_default.inc.php

    r2859 r3041  
    155155$conf['show_version'] = true;
    156156
     157// meta_ref to reference multiple sets of incorporated pages or elements
     158// Set it false to avoid referencing in google, and other search engines.
     159$conf['meta_ref'] = true;
    157160
    158161// links : list of external links to add in the menu. An example is the best
  • trunk/include/page_header.php

    r2651 r3041  
    5757}
    5858
     59// No referencing is required
     60if ( !$conf['meta_ref'] )
     61{
     62  $page['meta_robots']['noindex'] = 1;
     63  $page['meta_robots']['nofollow'] = 1;
     64}
     65
    5966if ( !empty($page['meta_robots']) )
    6067{
     
    6471        .'">'
    6572    );
     73}
     74if ( !isset($page['meta_robots']['noindex']) )
     75{
     76  $template->assign('meta_ref',1);
    6677}
    6778
  • trunk/template/yoga/header.tpl

    r2651 r3041  
    11{* $Id$ *}
    2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    3 "http://www.w3.org/TR/html4/strict.dtd">
     2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    43<html lang="{$lang_info.code}" dir="{$lang_info.direction}">
    54<head>
    65<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
    76<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
     7{if isset($meta_ref) }
     8{if isset($INFO_AUTHOR)}
     9<meta name="author" content="{$INFO_AUTHOR|replace:'"':' '}">
     10{/if}
     11{if isset($related_tags)}
     12<meta name="keywords" content="{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}{$tag.name}{/foreach}">
     13{/if}
     14{if isset($COMMENT_IMG)}
     15<meta name="description" content="{$COMMENT_IMG|strip_tags:false|replace:'"':' '}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
     16{else}
     17<meta name="description" content="{$PAGE_TITLE}{if isset($INFO_FILE)} - {$INFO_FILE}{/if}">
     18{/if}
     19{/if}
     20
    821<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
    922<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico">
     
    5063
    5164{if not empty($head_elements)}
    52         {foreach from=$head_elements item=elt}{$elt}{/foreach}
     65        {foreach from=$head_elements item=elt}{$elt}
     66        {/foreach}
    5367{/if}
    5468
  • trunk/template/yoga/picture_content.tpl

    r3032 r3041  
    55  <img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}"
    66        {if isset($COMMENT_IMG)}
    7                 title="{$COMMENT_IMG|replace:'"':' '}" {else} title="{$current.TITLE|replace:'"':' '} - {$ALT_IMG}"
     7                title="{$COMMENT_IMG|strip_tags:false|replace:'"':' '}" {else} title="{$current.TITLE|replace:'"':' '} - {$ALT_IMG}"
    88        {/if}>
    99{if isset($high) }
Note: See TracChangeset for help on using the changeset viewer.