Closed (fixed)
Project:
OG Forum
Version:
5.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
7 Jul 2007 at 06:14 UTC
Updated:
28 Aug 2007 at 22:32 UTC
since the curent og_forum_form_alter sets the "Collapsed = true" for only group forum posts, the forum post submit form looks different if you are posting to a group forum and when you are posting to a non-group forum
I suggest the following simple change (4 line changes{move 2 lines})to address the collapsed view on all forum posts
function og_forum_form_alter($form_id, &$form) {
// Auto-select group's forum when adding/editing a forum topic
if ($form_id == 'forum_node_form') {
$group = og_get_group_context();
if ($group->nid) {
$vid = _forum_get_vid();
//set the forum selection drop down box
if (arg(1)=='add'){
$term = arg(3);
$form['taxonomy'][$vid]['#default_value'] = array($term);
}
elseif (arg(2)=='edit'){
$term = $form['taxonomy'][$vid]['#default_value'][0];
}
elseif (arg(1) == 'ognodeadd') {//for og_user_roles compatibility
$term = $_GET['tid'];
$form['taxonomy'][$vid]['#default_value'] = array($term);
}
if (!user_access('administer forums')) {
unset ($form['taxonomy'][$vid]['#default_value']);
//unset ($form['taxonomy'][$vid]['#type']);
$form['taxonomy']['#type'] = 'fieldset';
$form['taxonomy']['#title'] = 'Forum context';//comment this line out to hide the drop down; i couldn't get [#type] = 'hidden' to work
- $form['taxonomy']['#collapsible'] = TRUE;
- $form['taxonomy']['#collapsed'] = TRUE;
$form['taxonomy'][$vid]['#value'] = $term;
$form['taxonomy'][$vid]['#description'] = 'When inside a group forum, changing this value has no effect.';
}
}
+ $form['taxonomy']['#collapsible'] = TRUE;
+ $form['taxonomy']['#collapsed'] = TRUE;
}
}
Comments
Comment #1
rconstantine commentedIf there are no objections, I'll put this in on Monday.
Comment #2
rconstantine commentedMade the change. [Not on Monday, it would seem]
Comment #3
(not verified) commented