Commit 09f749d3 authored by pkdille's avatar pkdille

[MOD] lesser magic deployment to metatag admin template

parent 8568b2b3
......@@ -2105,6 +2105,7 @@ lib/prefs/mail.php -text
lib/prefs/map.php -text
lib/prefs/menus.php -text
lib/prefs/messu.php -text
lib/prefs/metatag.php -text
lib/prefs/multidomain.php -text
lib/prefs/page.php -text
lib/prefs/poll.php -text
......
<?php
function prefs_metatag_list() {
return array(
'metatag_keywords' => array(
'name' => tra('Keywords'),
'type' => 'textarea',
'size' => '4',
),
'metatag_freetags' => array(
'name' => tra('Include freetags'),
'type' => 'flag',
'dependencies' => array(
'feature_freetags',
),
),
'metatag_threadtitle' => array(
'name' => tra('Use thread title instead'),
'type' => 'flag',
'dependencies' => array(
'feature_forums',
),
),
'metatag_imagetitle' => array(
'name' => tra('Use image title instead'),
'type' => 'flag',
'dependencies' => array(
'feature_galleries',
),
),
'metatag_description' => array(
'name' => tra('Description'),
'type' => 'textarea',
'size' => '5',
),
'metatag_pagedesc' => array(
'name' => tra('Use individual page description for Wiki pages instead'),
'type' => 'flag',
),
'metatag_author' => array(
'name' => tra('Author'),
'type' => 'text',
'size' => '50',
),
'metatag_geoposition' => array(
'name' => tra('geo.position'),
'type' => 'text',
'size' => '50',
),
'metatag_georegion' => array(
'name' => tra('geo.region'),
'type' => 'text',
'size' => '50',
),
'metatag_geoplacename' => array(
'name' => tra('geo.placename'),
'type' => 'text',
'size' => '50',
),
'metatag_robots' => array(
'name' => tra('Meta robots'),
'type' => 'text',
'size' => '50',
),
'metatag_revisitafter' => array(
'name' => tra('Revisit after'),
'type' => 'text',
'size' => '50',
),
);
}
......@@ -3,65 +3,37 @@
<input type="submit" name="metatags" value="{tr}Change preferences{/tr}" />
</div>
<fieldset>
<legend>{tr}Meta tags{/tr}{if $prefs.feature_help eq 'y'} {help url="Meta+Tags+Config"}{/if}</legend>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_keywords">{tr}Keywords{/tr}:</label><br /> <textarea rows="5" cols="40" id="metatag_keywords" name="metatag_keywords" style="width:95%;">{$prefs.metatag_keywords}</textarea></div>
<legend>
{tr}Meta tags{/tr}{if $prefs.feature_help eq 'y'} {help url="Meta+Tags+Config"}{/if}
</legend>
<div class="adminoptionboxchild">
<div class="adminoptionbox">
<div class="adminoption"><input type="checkbox" id="metatag_freetags" name="metatag_freetags" {if $prefs.metatag_freetags eq 'y'} checked="checked" {/if} /></div>
<div class="adminoptionlabel"><label for="metatag_freetags">{tr}Include freetags{/tr}.</label>
{if $prefs.feature_freetags ne 'y'}<br />{icon _id=information}{tr}Feature is disabled{/tr}. <a href="tiki-admin.php?page=features" title="{tr}Features{/tr}">{tr}Enable now{/tr}</a>.{/if}
</div>
</div>
<div class="adminoptionbox">
<div class="adminoption"><input type="checkbox" id="metatag_threadtitle" name="metatag_threadtitle" {if $prefs.metatag_threadtitle eq 'y'}checked="checked"{/if} /></div>
<div class="adminoptionlabel"><label for="metatag_threadtitle">{tr}Use thread title instead{/tr}.</label>
{if $prefs.feature_forums ne 'y'}<br />{icon _id=information}{tr}Feature is disabled{/tr}. <a href="tiki-admin.php?page=features" title="{tr}Features{/tr}">{tr}Enable now{/tr}</a>.{/if}
</div>
</div>
<div class="adminoptionbox">
<div class="adminoption"><input type="checkbox" id="metatag_imagetitle" name="metatag_imagetitle" {if $prefs.metatag_imagetitle eq 'y'}checked="checked"{/if} /></div>
<div class="adminoptionlabel"><label for="metatag_imagetitle">{tr}Use image title instead{/tr}.</label>
{if $prefs.feature_galleries ne 'y'}<br />{icon _id=information}{tr}Feature is disabled{/tr}. <a href="tiki-admin.php?page=features" title="{tr}Features{/tr}">{tr}Enable now{/tr}</a>.{/if}
</div>
</div>
</div>
</div>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_description">{tr}Description{/tr}:</label><br /> <textarea id="metatag_description" name="metatag_description" rows="5" cols="40" style="width:95%">{$prefs.metatag_description}</textarea></div>
</div>
<div class="adminoption"><input type="checkbox" id="metatag_pagedesc" name="metatag_pagedesc" {if $prefs.metatag_pagedesc eq 'y'}checked="checked"{/if} /></div>
<div class="adminoptionlabel"><label for="metatag_pagedesc">{tr}Use individual page description for Wiki pages instead{/tr}.</label>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_author">{tr}Author{/tr}:</label> <input id="metatag_author" type="text" name="metatag_author" value="{$prefs.metatag_author}" size="50" /></div>
{preference name=metatag_keywords}
{preference name=metatag_freetags}
{preference name=metatag_threadtitle}
{preference name=metatag_imagetitle}
{preference name=metatag_description}
{preference name=metatag_pagedesc}
{preference name=metatag_author}
</div>
</div>
</fieldset>
</fieldset>
<fieldset>
<legend>{tr}Geo URL{/tr} {if $prefs.feature_help eq 'y'}<a target="_blank" href="http://www.geourl.org/">{icon _id='help'}</a>{/if}</legend>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_geoposition">{tr}geo.position{/tr}:</label> <input type="text" name="metatag_geoposition" id="metatag_geoposition" value="{$prefs.metatag_geoposition}" size="50" /></div>
</div>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_georegion">{tr}geo.region{/tr}:</label> <input id="metatag_georegion" type="text" name="metatag_georegion" value="{$prefs.metatag_georegion}" size="50" /></div>
</div>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_geoplacename">{tr}geo.placename{/tr}:</label> <input id="metatag_geoplacename" type="text" name="metatag_geoplacename" value="{$prefs.metatag_geoplacename}" size="50" /></div>
</div>
</fieldset>
<fieldset>
<legend>
{tr}Geo URL{/tr} {if $prefs.feature_help eq 'y'}<a target="_blank" href="http://www.geourl.org/">{icon _id='help'}</a>{/if}
</legend>
{preference name=metatag_geoposition}
{preference name=metatag_georegion}
{preference name=metatag_geoplacename}
</fieldset>
<fieldset>
<legend>{tr}Robots{/tr}</legend>
{* Need to show site_metatag_robots as real metatags are overridden at runtime *}
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_robots">{tr}Meta robots{/tr}:</label> <input id="metatag_robots" type="text" name="metatag_robots" value="{$prefs.site_metatag_robots}" size="50" /></div>
</div>
<div class="adminoptionbox">
<div class="adminoptionlabel"><label for="metatag_revisitafter">{tr}Revisit after{/tr}:</label> <input id="metatag_revisitafter" type="text" name="metatag_revisitafter" value="{$prefs.metatag_revisitafter}" size="50" /></div>
</div>
</fieldset>
<fieldset>
<legend>{tr}Robots{/tr}</legend>
{* Need to show site_metatag_robots as real metatags are overridden at runtime *}
{preference name=metatag_robots}
{preference name=metatag_revisitafter}
</fieldset>
<div class="heading input_submit_container" style="text-align: center">
<input type="submit" name="metatags" value="{tr}Change preferences{/tr}" />
</div>
......
......@@ -3,7 +3,7 @@
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id: /cvsroot/tikiwiki/tiki/tiki-admin_include_metatags.php,v 1.8 2007-03-06 19:29:45 sylvieg Exp $
//this script may only be included - so its better to die if called directly.
if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
header("location: index.php");
......@@ -11,17 +11,5 @@ if (strpos($_SERVER["SCRIPT_NAME"], basename(__FILE__)) !== false) {
}
if (isset($_REQUEST["metatags"])) {
check_ticket('admin-inc-metatags');
simple_set_value('metatag_keywords');
simple_set_toggle('metatag_threadtitle');
simple_set_toggle('metatag_imagetitle');
simple_set_toggle('metatag_freetags');
simple_set_value('metatag_description');
simple_set_toggle('metatag_pagedesc');
simple_set_value('metatag_author');
simple_set_value('metatag_geoposition');
simple_set_value('metatag_georegion');
simple_set_value('metatag_geoplacename');
simple_set_value('metatag_robots');
simple_set_value('metatag_revisitafter');
}
ask_ticket('admin-inc-metatags');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment