[buddypress-trac] [BuddyPress] #2281: Missing Tags input field in Edit Forum Topic Page
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Sep 10 23:36:45 UTC 2010
#2281: Missing Tags input field in Edit Forum Topic Page
-------------------------+--------------------------------------------------
Reporter: mercime | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.3
Component: Groups | Keywords:
-------------------------+--------------------------------------------------
Comment(by pisanojm):
The above code worked to add the input line in the edit.php:
`<div id="edit-topic">
<?php do_action(
'bp_group_before_edit_forum_topic' ) ?>
<p><strong><?php _e( 'Edit
Topic:', 'buddypress' ) ?></strong></p>
<label for="topic_title"><?php _e(
'Title:', 'buddypress' ) ?></label>
<input type="text"
name="topic_title" id="topic_title" value="<?php bp_the_topic_title() ?>"
/>
<label for="topic_text"><?php _e(
'Content:', 'buddypress' ) ?></label>
<textarea name="topic_text"
id="topic_text"><?php bp_the_topic_text() ?></textarea>
<?php do_action(
'bp_group_after_edit_forum_topic' ) ?>
<!-- HERE IS WHERE I ADDED ABOVE
-->
<label><?php _e( 'Add Additional
Tags (comma separated):', 'buddypress' ) ?></label>
<input type="text" name="topic_tags" id="topic_tags" value="" />`
However, the tags themselves did not save after clicking "save changes".
The following change to, bp-groups.php fixed the issue with saving the new
and newly added tags for me:
`//add this
if(!empty($_POST["topic_tags"]))
bb_add_topic_tags($topic_id,$_POST["topic_tags"]);//add the
new tags
//end add
do_action(
'groups_edit_forum_topic', $topic_id );
bp_core_redirect(
bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' .
$topic_slug . '/' );
}
`
You can see this discussion here:
http://buddypress.org/community/groups/how-to-and-
troubleshooting/forum/topic/adding-topic-tags-after-topic-creation/
Thanks to @r-a-y @mercime and @brajesh
--
Ticket URL: <http://trac.buddypress.org/ticket/2281#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list