Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Can't edit group forum topics.

@unknownterritory20

Participant

Ok. I played around with it until I found out the issue, but I don’t know how to solve it.

In groups > forum > topics > My New Topic … when I inspect the element for the href for the modify link (and others) are as follows…

href=”http://mysite.com/groups/Sailing/forum/topic/edit?_wpnonce=xxx”. This gives me a blank page, or bbpress edit form.

If I slightly modify the url to href=”http://mysite.com/groups/Sailing/forum/topic/my-new topic/edit?_wpnonce=xxx” then I see things exactly how they are supposed to be. So the modify link was taking me to the wrong page.

I have no idea how to modify the url to insert the topic title. This would completely resolve my issue

The modify link is embedded in the bp_the_topic_admin_links function.

function bp_the_topic_admin_links( $args = '' ) {
	echo bp_get_the_topic_admin_links( $args );
}
	function bp_get_the_topic_admin_links( $args = '' ) {
		global $forum_template;

		$defaults = array(
			'seperator' => '|'
		);

		$r = wp_parse_args( $args, $defaults );
		extract( $r, EXTR_SKIP );

		$links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>';

		if ( bp_is_item_admin() || bp_is_item_mod() || bp_current_user_can( 'bp_moderate' ) ) {
			if ( 0 == (int) $forum_template->topic->topic_sticky )
				$links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>';
			else
				$links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'unstick', 'bp_forums_unstick_topic' ) . '">' . __( 'Un-stick Topic', 'buddypress' ) . '</a>';

			if ( 0 == (int) $forum_template->topic->topic_open )
				$links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'open', 'bp_forums_open_topic' ) . '">' . __( 'Open Topic', 'buddypress' ) . '</a>';
			else
				$links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'close', 'bp_forums_close_topic' ) . '">' . __( 'Close Topic', 'buddypress' ) . '</a>';

			$links[] = '<a class="confirm" id="topic-delete-link" href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'delete', 'bp_forums_delete_topic' ) . '">' . __( 'Delete Topic', 'buddypress' ) . '</a>';
		}

		return implode( ' ' . $seperator . ' ', (array) $links );
	}

ALSO, is there a way to disable bbpress user profiles, completely? I only want bp profiles active.

Skip to toolbar