Exemplo n.º 1
0
function plugin_qhmsetting_default()
{
    global $script, $other_plugins;
    $qt = get_qt();
    $scrt = $script . '?plugin=qhmsetting&mode=form&phase=';
    $setlist = array('design' => array('help' => 'ChangeDesign', 'url' => $scrt . 'design', 'img' => IMAGE_DIR . 'settings_design.png', 'title' => 'デザインの変更', 'subtitle' => 'ロゴ画像の設定、ロゴ部分の文字、テンプレートの設定を行います。', 'limited' => false), 'info' => array('help' => 'SiteConfig', 'url' => $scrt . 'info', 'img' => IMAGE_DIR . 'settings_site.png', 'title' => 'サイト情報の設定', 'subtitle' => 'キーワード、サイト説明、ヘッダー、フッター、アクセス解析タグなどの設定を行います。', 'limited' => false), 'admin' => array('help' => 'SetPassword', 'url' => $scrt . 'admin', 'img' => IMAGE_DIR . 'settings_user.png', 'title' => 'ユーザー名、パスワードの変更', 'subtitle' => '編集用のユーザー名、パスワードの設定を行います。', 'limited' => false), 'qblog' => array('help' => 'QBlogSetting', 'url' => $script . '?cmd=qblog', 'img' => IMAGE_DIR . 'settings_blog.png', 'title' => 'ブログ設定', 'subtitle' => 'QHMブログの設定を行います。', 'limited' => false), 'useradmin' => array('help' => 'UserAuthSetting', 'url' => $scrt . 'user', 'img' => IMAGE_DIR . 'settings_access.png', 'title' => 'アクセス権限設定', 'subtitle' => '特定のページにアクセス権限を設定し、アクセスできるユーザーを追加設定できます。', 'limited' => true), 'clear' => array('help' => 'SettingCache', 'url' => $scrt . 'clear', 'img' => IMAGE_DIR . 'settings_cache.png', 'title' => '高速化設定、キャッシュの初期化', 'subtitle' => '表示を高速化するためのキャッシュ機能を設定、キャッシュの初期化、テンプレートを初期化を行います。', 'limited' => false), 'back' => array('help' => 'EasyBackup', 'url' => $script . '?cmd=dump', 'img' => IMAGE_DIR . 'settings_backup.png', 'title' => 'バックアップ', 'subtitle' => 'QHMのバックアップをダウンロードできます。フルバックアップ、重要ファイルのみのバックアップなど可能です。', 'limited' => true), 'counter' => array('help' => 'Counter', 'url' => $scrt . 'counter', 'img' => IMAGE_DIR . 'settings_counter.png', 'title' => 'アクセスカウンター', 'subtitle' => 'アクセスカウンターをリセットします。', 'limited' => false), 'chmod' => array('help' => 'UserAuthSetting', 'url' => $scrt . 'chmod', 'img' => IMAGE_DIR . 'settings_file.png', 'title' => 'ファイル権限設定', 'subtitle' => '削除できない、FTPエラーが起こる原因である「ファイル権限」を設定、チェックします。', 'limited' => true), 'mail' => array('help' => 'MailSetting', 'url' => $scrt . 'mail', 'img' => IMAGE_DIR . 'settings_mail.png', 'title' => 'メール送信設定', 'subtitle' => '送信メールサーバーを設定できます(SMTP送信、GoogleAppsなどの場合)', 'limited' => true), 'close' => array('help' => 'SettingCloseSite', 'url' => $scrt . 'close', 'img' => IMAGE_DIR . 'settings_close.png', 'title' => 'サイトの閉鎖/公開', 'subtitle' => 'QHMで作成された全ページを閉鎖します。閉鎖後は、管理者権限でログインすることで編集、閲覧が可能です。', 'limited' => true), 'mobile' => array('help' => 'RedirectMobile', 'url' => $scrt . 'mobile', 'img' => IMAGE_DIR . 'settings_mobile.png', 'title' => '携帯アクセス転送', 'subtitle' => '携帯端末からのアクセスを携帯専用サイトなどに転送します。', 'limited' => false), 'sns' => array('help' => 'SettingOGP', 'url' => $scrt . 'sns', 'img' => IMAGE_DIR . 'settings_sns.png', 'title' => 'ソーシャル連携', 'subtitle' => 'QHMとSNSの連携設定をします。', 'limited' => true), 'update' => array('help' => 'HowToUseUpdatePlugin', 'url' => $script . '?cmd=system_updater', 'img' => IMAGE_DIR . 'settings_update.png', 'title' => 'アップデート', 'subtitle' => 'QHMのアップデートを行います。', 'limited' => true));
    foreach ($setlist as $setname => $set) {
        $setlist[$setname]['help'] = '';
        //--<LimitedSetting>--
        if ($set['limited']) {
            $setlist[$setname]['limited'] = false;
        }
        //--</LimitedSetting>--
    }
    //--<UnlimitBackup>--
    //--</UnlimitBackup>--
    $html = '';
    // !commu がインストールされていたらバージョンを調べる
    // v2.5 未満の場合、SWFUなどが正常に動かないと警告を出す
    $idx_php = file_get_contents('index.php');
    if (preg_match_all('/require/', $idx_php, $mts) > 1) {
        if (file_exists('commu/config.php') && preg_match("/COMMU_VERSION[\"'], '(.*?)'/", file_get_contents('commu/config.php'), $mts) && $mts[1] < 2.5) {
            $html .= <<<EOD
<p class="warning" style="background:#fff6bf;color:#514721;border-color:#ffd324;">
\tSWFUなどが正常に動作しない場合は、
\tご利用中の<strong>Quick Commu</strong>を最新版にバージョンアップすることで問題が解決されます。
</p>
EOD;
        }
    }
    $update_showcase = '';
    if (get_qhm_option('banner')) {
        $update_list_url = h('//ensmall.net/update/index.php?cmd=hkn_upinfo&cat=openqhm');
        $update_showcase = <<<EOD
\t\t\t<style>
\t\t\t.qhmsetting-update-showcase {
\t\t\t\twidth: 100%;
\t\t\t\tmargin: 10px auto 50px;
\t\t\t\tpadding: 0 40px;
\t\t\t}
\t\t\t</style>
\t\t\t<h3>お知らせ</h3>
\t\t\t<div class="qhmsetting-update-showcase">
\t\t\t\t<div class="fb-page" data-href="https://www.facebook.com/open.qhm" data-width="500" data-height="300" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="false" data-show-posts="true"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/open.qhm"><a href="https://www.facebook.com/open.qhm">Open QHM</a></blockquote></div></div>
\t\t\t</div>
EOD;
        $fb_init = <<<EOD
\t\t\t<div id="fb-root"></div>
\t\t\t<script>(function(d, s, id) {
\t\t\tvar js, fjs = d.getElementsByTagName(s)[0];
\t\t\tif (d.getElementById(id)) return;
\t\t\tjs = d.createElement(s); js.id = id;
\t\t\tjs.src = "//connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v2.4&appId=182764055138172";
\t\t\tfjs.parentNode.insertBefore(js, fjs);
\t\t\t}(document, 'script', 'facebook-jssdk'));</script>
EOD;
        $qt->setv('fb_init', $fb_init);
    }
    // HTML生成
    $html .= <<<EOD
<p>QHMの設定を行います。<br />
以下の項目から、変更したいものをクリックしてください。</p>

{$update_showcase}

<table class="table table-bordered">
EOD;
    $scnt = 0;
    foreach ($setlist as $set) {
        if ($scnt % 2 == 0) {
            $html .= '
	<tr>';
        }
        if ($set['limited']) {
            $html .= '
		<td style="background-color:#e0e0e0;"><p>
			<img src="' . $set['img'] . '" alt="' . $set['title'] . '" title="' . $set['title'] . '" style="vertical-align:top;" />
			<span style="font-weight:bold;color:#666;">' . $set['title'] . '</span>
		</p><span style="color:#888;">' . $set['subtitle'] . '</span></td>';
        } else {
            $html .= '
		<td><p>
			<img src="' . $set['img'] . '" alt="' . $set['title'] . '" title="' . $set['title'] . '" style="vertical-align:top;" />
			<a href="' . $set['url'] . '" style="font-weight:bold;">' . $set['title'] . '</a>' . $set['help'] . '
		</p>' . $set['subtitle'] . '</td>';
        }
        if ($scnt % 2 == 1) {
            $html .= '
	</tr>';
        }
        $scnt++;
    }
    $html .= '
</table>
';
    return $html;
}
Exemplo n.º 2
0
         unset($tools['helplink']);
     }
     if (isset($tools['haiklink'])) {
         unset($tools['haiklink']);
     }
 } else {
     if (isset($tools['passwordlink'])) {
         unset($tools['passwordlink']);
     }
 }
 if ($_page === $defaultpage) {
     if (isset($tools['pagelink']['sub']['dellink'])) {
         unset($tools['pagelink']['sub']['dellink']);
     }
 }
 if (!isset($_COOKIE['QHM_VERSION']) || $_COOKIE['QHM_VERSION'] <= QHM_VERSION || get_qhm_option('update') !== 'vendor') {
     unset($tools['updatelink']);
 }
 if (is_qblog()) {
     if (isset($tools['pagelink']['sub']['renamelink'])) {
         unset($tools['pagelink']['sub']['renamelink']);
     }
 }
 if (!is_page($qblog_defaultpage)) {
     if (isset($tools['qbloglink'])) {
         unset($tools['qbloglink']);
     }
 }
 // レイアウトページの時の管理ウィンドウの制御
 if ($no_toolmenu) {
     if (!is_bootstrap_skin()) {