プロジェクト

全般

プロフィール

Enhancement(機能追加・改善) #217

OpenPNE3.1.1の日記公開範囲の初期設定

Kousuke Ebihara14年以上前に追加. 約14年前に更新.

ステータス:
Invalid(無効)
優先度:
Low(低め)
担当者:
-
対象バージョン:
-
開始日:
2009-08-31
期日:
進捗率:

0%


説明

以前のチケットは http://trac.openpne.jp/ticket/4298 です

http://sns.openpne.jp/?m=pc&a=page_fh_diary&target_c_diary_id=21586より転記

{{{
こんな感じだとうれしいです。

config/member_config.yml

# category_name:
# setting_name:
# Name: "sample" 
# Caption: "Sample" 
# FormType: "input" 
# ValueType: "string" 
# IsRegist: true
# IsConfig: true
# IsRequired: true

diaryPublic:
_attributes:
caption: "日記公開範囲設定" 
enable_pc: true
enable_mobile: true
diary_public_flag:
Name: "diary_public_flag" 
Caption: "新規に日記を作成した時に、標準で指定される公開範囲です" 
FormType: "radio" 
ValueType: "int" 
Default: "1" 
Choices: {1: "全員に公開", 2: "マイフレンドまで公開", 3: "公開しない"}
IsRegist: false
IsConfig: true
IsRequired: true
IsUnique: false
IsConfirm: false

lib/form/MemberConfigyDiaryPublicForm.class.php

class MemberConfigDiaryPublicForm extends MemberConfigForm
{
protected $category = 'diaryPublic';

public function saveConfig($name, $value)
{
parent::saveConfig($name, $value);
}
}

diff lib/action/opDiaryPluginActions.class.php
@@ -60,7 +60,13 @@

public function executeNew(sfWebRequest $request)
{
- $this->form = new DiaryForm();
+ $diary = new Diary();
+ if ($public_flag = Doctrine::getTable('MemberConfig')->retrieveByNameAndMemberId('diary_public_flag', $this->getUser()->getMemberId()))
+ $public_flag = $public_flag->value;
+ else
+ $public_flag = 1;
+ $diary->setPublicFlag($public_flag);
+ $this->form = new DiaryForm($diary);
}

public function executeCreate(sfWebRequest $request) 
}}}


関連するチケット

次のチケットと重複 opDiaryPlugin - Enhancement(機能追加・改善) #109: 日記公開範囲のデフォルト値をメンバーごとに設定できるようにする Fixed(完了) 2009-10-19

履歴

#1 Rimpei Ogawa約14年前に更新

  • プロジェクトOpenPNE 3 から opDiaryPlugin に変更

#2 Rimpei Ogawa約14年前に更新

  • ステータスNew(新規) から Invalid(無効) に変更

#109 で対応済みです。

他の形式にエクスポート: Atom PDF