有料クローズドサイト&SNSへの道:「会員以外見れないよ」入り口での部外者振り分け
1:ログインかったらリダイレクト
こういうことかな?
任意ページへリダイレクト
2:ポップアップという手もあるな!
モーダルウィンドウのほうが適切かも
追記:ひとまず入り口ではWordPopupを選んだ
登録しないとPOPUPが消えないようにしたかったので、「×」の閉じるアクションを出したくなかったのです。
※事前にダッシュボードの設定でここにチェックしてました
なので「×」マークと閉じるアクションを消しました♪
ファイルの場所:wp-content/plugins/wordpress-popup/css/tpl/simple/template.php
デフォルトがsimpleのテンプレートだったのでそのままの設定でした。
34行目の「 <a href="#" class="wdpu-close" title="<?php _e( 'Close this box', 'popover' ); ?>"></a>」を隠したら消えた!
よかった!ミッション一つクリア!
ポップアップの内容に、注意書きやら進んで欲しいリンクなどをいれるだけさ〜
BuddyPress:プロフィールで見せる値を変えたい!
GianismでFacebookから会員登録を促すと、IDが自動でつくられている。
そうすると、長ったらしい数字列になってしまうんだけどそれが「@123456789」とかでプロフィール画面に見えてきちゃう。
カッコ悪いよ〜〜
見せたくないよ〜〜〜
ということで、初めは自動生成のIDをなんとかカッコよくできないかと思ったんだけど、絶対被らないIDが作られてるからそれを変えると後々面倒になりそうだと思い。
表示する値を変えたほうがいいんじゃないかと、ファイルを解読しているところ。
今のところ有力そうなのが見つかった。
1:場所:wp-content/plugins/buddypress/bp-themes/bp-default/functions.php
809行~
* Ensure that multiselect boxes have trailing brackets in their 'id' and 'name' attributes.
*
* These brackets are required for an array of values to be sent in the POST
* request. Previously, bp_get_the_profile_field_input_name() contained the
* necessary logic, but since BP 2.0 that logic has been moved into
* BP_XProfile_Field_Type_Multiselectbox. Since bp-default does not use the
* BP_XProfile_Field_Type classes to build its markup, it did not inherit
* the brackets from their new location. Thus this workaround.
「 bp_get_the_profile_field_input_name()」から引っ張ってきてるのか?
「 BP_XProfile_Field_Type_Multiselectbox」というのも。
BP_XProfileってファイルあったな。そこにあるの?
2:場所:wp-content/plugins/buddypress/bp-xprofile/bp-xprofile-functions.php(ここもメモ)
〜〜追記〜〜
Webページで検証してみたらこの部分かと思うものが!
<div id="item-header" role="complementary">
<div id="cover-image-container">
<a id="header-cover-image" href="http://blueoceanz.biz/member/saito01/"></a><div id="item-header-cover-image">
<div id="item-header-avatar">
<a href="http://blueoceanz.biz/member/saito01/"><img src="http://blueoceanz.biz/wp-content/uploads/avatars/1/5804c2db36f24-bpfull.jpg" class="avatar user-1-avatar avatar-150 photo" width="150" height="150" alt="自分 さんのプロフィール写真">
</a>
</div><!-- #item-header-avatar --><div id="item-header-content">
<h2 class="user-nicename">@saito01</h2>
<div id="item-buttons"></div><!-- #item-buttons --><span class="activity">6時間前</span>
<div id="item-meta">
<div id="latest-update">アクティブ内容
<a href="http://blueoceanz.biz/activity/p/6/" rel="nofollow">表示</a>
</div>
</div><!-- #item-meta --></div><!-- #item-header-content -->
</div><!-- #item-header-cover-image -->
</div><!-- #cover-image-container -->
<div id="template-notices" role="alert" aria-atomic="true">
</div></div>
読み込んでるファイルの場所がわかった。
wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress-functions.php
s2member:使い方メモ
1:翻訳
翻訳されたもの今のところなさそうね。
ちまちま自分でやるしかないようね。
2:使い方
トピック: [解決済] BuddypressでのクローズドSNSの構築について « サポートフォーラム — WordPress