I've customized the template.php file to call a custom template when adding a new forum topic phptemplate_forum_node_form($form), but it doesn't work when editing it. Both are using the $form_id forum_node_form, but unfortunately this doesn't seem to work consistently.

I've spit out $form arrays in og, og_forum & og_user_roles to see at what point the hook_form_alter() function could possibly be hijacking the output. It seems to work as expected right up until the template.php file (which completely ignores the call to phptemplate_forum_node_form($form) when editing the form.

Any thoughts on this would be appreciated. Would be nice to be able to have a consistent (and much simpler) user interface for users to add new forum topics.

Comments

rconstantine’s picture

Category: bug » support

I don't see any bug here. This is a support request.

I don't have the code in front of me, but you should make sure that any function you try to override from forum is not already being overridden by og_forum. In other words, you may need to write a phptemplate_og_forum_node_form, so check the code.

mgifford’s picture

Maybe it's a support request, but I don't think so.. og_forum_form_alter() is altering the form, but I've been through the form here pretty extensively and examining the $form array at all points in that function. I tried adding in a phptemplate_og_forum_node_form into the template.php & a og_forum_node_form.tpl.php file, but this didn't seem to result in any changes either.

I did spend a lot of time walking through the og_forum module and also the og_user_role module to see if I could track down the changes between the edit & add features. Unfortunately I wasn't able to find it. Grepping wasn't all that useful either.

For the phptemplate_og_forum_node_form to work I should be able to look for a theme_og_forum_node_form function, right?

Let me know what code you want.

Mike.

btw. Like the commented footer on the functions!

rconstantine’s picture

Status: Active » Postponed (maintainer needs more info)

I'm going to have to put you off for now, but I'm making a note to myself to brush up on the theme engine etc.

mgifford’s picture

Thanks..

Anonymous’s picture

@Ryan

Not a problem with OG Forum , so i am going to leave this one

rconstantine’s picture

Status: Postponed (maintainer needs more info) » Fixed

@Paul

I'm marking as fixed, but the original poster can change back to active if still interested in our help.

Anonymous’s picture

Status: Fixed » Postponed
Anonymous’s picture

Status: Postponed » Fixed

sorry, this should be marked as fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)