Changeset 3040


Ignore:
Timestamp:
Jan 3, 2009, 10:03:46 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".

Location:
branches/2.0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/config_default.inc.php

    r2858 r3040  
    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
  • branches/2.0/include/page_header.php

    r2651 r3040  
    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
  • branches/2.0/template/yoga/header.tpl

    r2651 r3040  
    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
  • branches/2.0/template/yoga/picture_content.tpl

    r3031 r3040  
    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.