こんな事ありませんか? - itnews、格闘技、写真、絵 好きな事を好き放題書いてます -7ページ目

zoxのssl化

http://www.meibinlab.jp/nishijima/archives/54
を参考に
zoxの管理画面のssl化はphpなどはいじらずhtaccess
おこなう

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

xoops cube 新規登録の register.php を ssl化する

xoopsのregister.phpをsslに

固有にsslをもっている条件で下記の対策を



■■ 手順1■■■■■■■■■■■■■■■■

.htaccess


mod_Rewriteの下記の記載をおこない
register.phpはsslへリダイレクト

-----------------------------------------------------------
RewriteEngine on

RewriteCond %{REQUEST_URI} .*/register.php$
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond %{REQUEST_URI} !(.*/register.php$)
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
-----------------------------------------------------------



■■ 手順2■■■■■■■■■■■■■■■■

mainfile.php の
define('XOOPS_URL', 'http://~~~~~');を


register.php
のときは
define('XOOPS_URL', 'http://~~~~~');

define('XOOPS_URL', 'https://~~~~~');

となるようにするため下記にかきかえ

------------------------------------
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
if(preg_match ("/register\.php/", $_SERVER['REQUEST_URI'])) {
define('XOOPS_URL', 'https:~~~~~~~');
} else {
define('XOOPS_URL', 'http:~~~~~~~');
}
} else {
define('XOOPS_URL', 'http:~~~~~~~');
}
------------------------------------
にする


以上


その他

define('XOOPS_URL', 'http://~~~~~'); をまるごと
define('XOOPS_URL', 'https://~~~~~'); 
として、sslひつようないところだけ httpとしちゃうとか

d3foram のテンプレート関連の説明

http://www.xugj.org/modules/xpwiki/?ModuleManuals%2Fd3forum


ロック名 テンプレート 説明 ブロック複製 ブロックオプション
フォーラム一覧 (d3forum)_block_list_forums.html フォーラムの一覧を表示する 可 カテゴリー絞り込み・ブロックテンプレート
トピック一覧 (d3forum)_block_list_topics.html トピック(スレッド)の一覧を表示する 可 表示件数・フルサイズ表示・表示順・優先表示・カテゴリー絞込み・ブロックテンプレート・フォーラム指定
投稿一覧 (d3forum)_block_list_posts.html 投稿の一覧を表示する 可 表示件数・表示順・カテゴリー絞込み・ブロックテンプレート・フォーラム指定
Page Top
テンプレートセット anchor.png

(ブロックと基本の区別は不要)
(テンプレート名) (テンプレートの説明)
d3forum_admin_advanced_admin.html  
d3forum_admin_category_access.html  
d3forum_admin_forum_access.html  
d3forum_admin_post_histories.html  
d3forum_block_list_forums.html  
d3forum_block_list_posts.html  
d3forum_block_list_topics.html  
d3forum_comment_listposts_flat.html  
d3forum_comment_listtopics.html  
d3forum_inc_d3comment_summary.html  
d3forum_inc_eachpost.html 投稿ブロック
d3forum_inc_postorder_links.html 'ツリー構造順で表示'、'投稿の古いものから'のパーツ
d3forum_inc_post_form_quick.html 投稿フォーム
d3forum_inc_topicbar.html ul.d3f_ctrlの設定
d3forum_main.css フォーラムモジュール内のみ適用されるCSS
d3forum_main_category_form.html  
d3forum_main_cutpasteposts.html  
d3forum_main_delete.html  
d3forum_main_forum_form.html  
d3forum_main_listcategories.html フォーラムトップ(カテゴリリスト) index.php
d3forum_main_listforums.html カテゴリトップ(フォーラムリスト) index.php?cat_id=*
d3forum_main_listposts.html トピック詳細 index.php?topic_id=*
d3forum_main_listtopics.html フォーラムトップ(トピックリスト) index.php?forum_id=*
d3forum_main_listtopics_over_categories.​html カテゴリー内トピック一覧 index.php?cat_ids=*
d3forum_main_post_form.html 新規トピック投稿  index.php?page=newtopic&forum_id=*
d3forum_main_search.html 条件検索 index.php?page=search
d3forum_main_topicmanager.html  
d3forum_main_viewpost.html  

weblinks のランダムジャンプなどを消す

modules/weblinks/templates/part/weblinks_guidance.html

を修正する

このぶぶんをまとめてコメントあうとする


-->

xoopsのブロックタイトルを消す

ブロックを表示させるとタイトルが強制的についてしまうのをブロックの中にはタイトルが必要ないものを消すほうほう。


<{if $block.title|regex_replace:"/.*none/":"none" ne "none"}>
<{$block.title}>

<{/if}>
と theme.html内のタイトル表示部分を変な文字列で囲み(笑、ブロックのタイトルに「none」と入れれば表示されなくなる。
ちなみにタイトルはALTSYSのブロックの管理で設定する。
これはなにかと重宝する!
ただ、ブロックに枠線などを設定している場合、枠線は表示されてしまう・・・。