public function PostController_Render_Before($Sender, $Args) { $Form = $Sender->Form; //new Gdn_Form(); $QuestionButton = !C('Plugins.QnA.UseBigButtons') || GetValue('Type', $_GET) == 'Question'; if (!$Form->IsPostBack()) { //if (!property_exists($Sender, 'Discussion')) { if (!property_exists($Sender, 'Question')) { //$Form->SetValue('Type', 'Question'); $Form->SetValue('Type', 'Discussion'); } elseif (!$Form->GetValue('Type')) { $Form->SetValue('Type', 'Question'); //$Form->SetValue('Type', 'Discussion'); } } if ($Form->GetValue('Type') == 'Question' && $QuestionButton) { $Sender->SetData('Title', T('Ask a Question')); } }
《vanillaforums 修改QnA插件默认显示提问问题的顺序》留言数:0