OSDN Git Service

robots,keywords,descriptoinのmetaタグ設定機能
authorCake <cake_67@users.sourceforge.jp>
Wed, 19 Jan 2011 07:16:28 +0000 (16:16 +0900)
committerCake <cake_67@users.sourceforge.jp>
Wed, 19 Jan 2011 07:16:28 +0000 (16:16 +0900)
app/locale/jpn/LC_MESSAGES/default.po
app/models/site_config.php
app/views/layouts/default.ctp
app/views/site_configs/admin_edit.ctp

index ae4b59a..b28e641 100644 (file)
@@ -2097,6 +2097,12 @@ msgstr "プライバシーポリシー"
 msgid "Site Description"
 msgstr "サイト紹介"
 
+msgid "Keywords"
+msgstr "キーワード設定"
+
+msgid "Access of Search Engines robots"
+msgstr "ロボット型検索エンジンのアクセス設定"
+
 msgid "Allow User Character-sheet"
 msgstr "一般ユーザによるキャラクターシート表示スキン追加"
 
index 65ba56b..9478245 100644 (file)
@@ -24,6 +24,14 @@ class SiteConfig extends AppModel {
                        'id' => null,
                        'value' => ''
                ),
+               'Site.keywords' => array(
+                       'id' => null,
+                       'value' => ''
+               ),
+               'Site.robots' => array(
+                       'id' => null,
+                       'value' => 'NOINDEX,NOFOLLOW'
+               ),
                'Site.adminAddress' => array(
                        'id' => null,
                        'value' => 'admin@example.com'
index 0b97782..9339035 100644 (file)
 <head>
 <?php echo $html->charset('utf-8'); ?>
 <meta http-equiv="X-UA-Compatible" content="IE=7">
+
+<meta name="robots" content="<?php echo $site_configs['Site.robots']['value'] ?>">
+<meta name="keywords" content="<?php echo $site_configs['Site.keywords']['value'] ?>">
+<meta name="description" content="<?php echo str_replace(array("\n", "\r"), '', $site_configs['Site.siteDescription']['value']) ?>">
 <title>
 <?php
 if (isset($site_configs['Site.siteName'])) {
index d0ebd29..e8145e6 100644 (file)
@@ -46,6 +46,25 @@ echo $token->create();
 </td>
 </tr>
 <tr>
+<th><?php echo __('Keywords') ?></th>
+<td id="Site_keywords">
+<input name="data[SiteConfig][Site.keywords][value]" type="text" value="<?php echo $this->data['SiteConfig']['Site.keywords']['value'];?>">
+<input name="data[SiteConfig][Site.keywords][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Site.keywords']['id'];?>">
+</td>
+</tr>
+<tr>
+<th><?php echo __('Access of Search Engines robots') ?></th>
+<td id="Site_robots">
+<div class="input text inline">
+<div><input name="data[SiteConfig][Site.robots][value]" type="radio" value="INDEX,FOLLOW"<?php if ($this->data['SiteConfig']['Site.robots']['value'] == 'INDEX,FOLLOW'): ?> checked="checked"<?php endif; ?>>INDEX,FOLLOW</div>
+<div><input name="data[SiteConfig][Site.robots][value]" type="radio" value="NOINDEX,FOLLOW"<?php if ($this->data['SiteConfig']['Site.robots']['value'] == 'NOINDEX,FOLLOW'): ?> checked="checked"<?php endif; ?>>NOINDEX,FOLLOW</div>
+<div><input name="data[SiteConfig][Site.robots][value]" type="radio" value="INDEX,NOFOLLOW"<?php if ($this->data['SiteConfig']['Site.robots']['value'] == 'INDEX,NOFOLLOW'): ?> checked="checked"<?php endif; ?>>INDEX,NOFOLLOW</div>
+<div><input name="data[SiteConfig][Site.robots][value]" type="radio" value="NOINDEX,NOFOLLOW"<?php if ($this->data['SiteConfig']['Site.robots']['value'] == 'NOINDEX,NOFOLLOW'): ?> checked="checked"<?php endif; ?>>NOINDEX,NOFOLLOW</div>
+</div>
+<input name="data[SiteConfig][Site.robots][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Site.robots']['id'];?>">
+</td>
+</tr>
+<tr>
 <th><?php echo __('Admin Mail Address') ?></th>
 <td id="Site_adminAddress">
 <div class="explanation"><?php __('From Adress of the mail to send users.') ?></div>
@@ -62,7 +81,6 @@ echo $token->create();
 <div><input name="data[SiteConfig][Site.useContact][value]" type="radio" value="0"<?php if (empty($this->data['SiteConfig']['Site.useContact']['value'])): ?> checked="checked"<?php endif; ?>><?php __('No') ?></div>
 </div>
 <input name="data[SiteConfig][Site.useContact][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Site.useContact']['id'];?>">
-<input name="data[SiteConfig][Site.useContact][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Site.useContact']['id'];?>">
 </td>
 </tr>