Project

General

Profile

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

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

Added by Kousuke Ebihara about 13 years ago. Updated almost 13 years ago.

Status:
Invalid(無効)
Priority:
Low(低め)
Assignee:
-
Target version:
-
Start date:
2009-08-31
Due date:
% Done:

0%


Description

以前のチケットは 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) 
}}}


Related issues

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

History

#1 Updated by Rimpei Ogawa almost 13 years ago

  • Project changed from OpenPNE 3 to opDiaryPlugin

#2 Updated by Rimpei Ogawa almost 13 years ago

  • Status changed from New(新規) to Invalid(無効)

#109 で対応済みです。

Also available in: Atom PDF