OpenPNE 技術サポートの坂田です。
2012年6月21日、新たに追加されたテクニカルガイドをご紹介いたします。
本日の更新は OpenPNE3 に関するガイドを2つ追加いたしました。
追加した記事全文を以下にご紹介いたしますので、よろしければご覧ください。
OpenPNE3.6とOpenPNE3.8では、データベースのスキーマの変更はありません。
しかし、OpenPNE3.8ではスマートフォン用のナビゲーションとガジェットが追加されています。
OpenPNE3.6からOpenPNE3.8にアップグレードする際のマイグレーション時に、以下のデータを追加します。(2012/06/12現在)
Navigation:
smartphone_default_navigation_home:
type: "smartphone_default"
uri: "@homepage"
sort_order: 0
Translation:
ja_JP:
caption: "マイホーム"
en:
caption: "My Home"
smartphone_default_navigation_profile_confirm:
type: "smartphone_default"
uri: "@member_profile_mine"
sort_order: 10
Translation:
ja_JP:
caption: "プロフィール確認"
en:
caption: "Profile"
smartphone_default_navigation_member_search:
type: "smartphone_default"
uri: "@member_search"
sort_order: 20
Translation:
ja_JP:
caption: "メンバー検索"
en:
caption: "Member Search"
smartphone_default_navigation_community_search:
type: "smartphone_default"
uri: "@community_search"
sort_order: 30
Translation:
ja_JP:
caption: "コミュニティ検索"
en:
caption: "Community Search"
smartphone_default_navigation_logout:
type: "smartphone_default"
uri: "@member_logout"
sort_order: 40
Translation:
ja_JP:
caption: "ログアウト"
en:
caption: "Logout"
smartphone_insecure_navigation_privacy_policy:
type: "smartphone_insecure"
uri: "@global_privacy_policy"
sort_order: 30
Translation:
ja_JP:
caption: "プライバシーポリシー"
en:
caption: "Privacy Policy"
smartphone_insecure_navigation_user_agreement:
type: "smartphone_insecure"
uri: "@global_user_agreement"
sort_order: 40
Translation:
ja_JP:
caption: "利用規約"
en:
caption: "User Agreement"
Gadget:
smartphone_profile_gadget_profile:
type: "smartphoneProfileContents"
name: "profileListBox"
sort_order: 10
smartphone_profile_member_list:
type: "smartphoneProfileContents"
name: "memberFriendListBox"
sort_order: 100
smartphone_profile_join_community_list:
type: "smartphoneProfileContents"
name: "memberJoinCommunityListBox"
sort_order: 110
smartphone_community_gadget_community:
type: "smartphoneCommunityContents"
name: "communityListBox"
sort_order: 10
smartphone_community_gadget_join_member_list:
type: "smartphoneCommunityContents"
name: "communityMemberJoinListBox"
sort_order: 100
smartphone_login_gadget_login_form_box:
type: "smartphoneLoginContents"
name: "loginForm"
sort_order: 10
また、具体的なレコードは下記のようになります。
mysql> select * from navigation where type like 'smartphone_%'; +----+---------------------+------------------------+------------+---------------------+---------------------+ | id | type | uri | sort_order | created_at | updated_at | +----+---------------------+------------------------+------------+---------------------+---------------------+ | 31 | smartphone_default | @homepage | 0 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 32 | smartphone_default | @member_profile_mine | 10 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 33 | smartphone_default | @member_search | 20 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 34 | smartphone_default | @community_search | 30 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 35 | smartphone_default | @member_logout | 40 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 36 | smartphone_insecure | @global_privacy_policy | 30 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 37 | smartphone_insecure | @global_user_agreement | 40 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | +----+---------------------+------------------------+------------+---------------------+---------------------+ 7 rows in set (0.00 sec) mysql> select * from gadget where type like 'smartphone%'; +----+-----------------------------+----------------------------+------------+---------------------+---------------------+ | id | type | name | sort_order | created_at | updated_at | +----+-----------------------------+----------------------------+------------+---------------------+---------------------+ | 15 | smartphoneProfileContents | profileListBox | 10 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 16 | smartphoneProfileContents | memberFriendListBox | 100 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 17 | smartphoneProfileContents | memberJoinCommunityListBox | 110 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 18 | smartphoneCommunityContents | communityListBox | 10 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | | 19 | smartphoneCommunityContents | communityMemberJoinListBox | 20 | 2012-04-27 19:10:23 | 2012-05-23 17:33:28 | | 20 | smartphoneLoginContents | loginForm | 10 | 2012-04-27 19:10:23 | 2012-04-27 19:10:23 | +----+-----------------------------+----------------------------+------------+---------------------+---------------------+ 6 rows in set (0.02 sec)
OpenPNE3で、メンバーを事前に一括登録する方法をご紹介します。
ユーザ登録に関すデータベースのテーブルは以下の2つです。
これらのテーブルに、下記のINSERTクエリを実行していきます。
※OpenPNE3.6を前提とした説明です。
(1) member レコード
INSERT INTO member
(name, invite_member_id, is_login_rejected, created_at, updated_at, is_active)
VALUES ('OpenPNE君', NULL, 0, NOW(), NOW(), 1);
(2) member_config レコード
member_id = 2 に対するメールアドレスの作成
INSERT INTO member_config (member_id, name, value, value_datetime, name_value_hash, created_at, updated_at) VALUES (2, 'pc_address', 'openpne@example.com', NULL, MD5(CONCAT(name, ',', value)), NOW(), NOW());
member_id = 2 に対する’123456’というパスワードの作成
INSERT INTO member_config
(member_id, name, value, value_datetime, name_value_hash, created_at, updated_at)
VALUES (2, 'password', MD5('123456'), NULL, MD5(CONCAT(name, ',', value)), NOW(), NOW());
今回新たに追加した記事は、以上です。
これからも随時テクニカルガイドの更新を行い、更新情報をブログでお知らせしていく予定です。

OpenPNEの専門家があなたのSNSをサポート