Changeset 2288 for trunk/bp-groups.php
- Timestamp:
- 01/10/2010 09:55:51 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r2285 r2288 2082 2082 return false; 2083 2083 2084 $post_text = apply_filters( 'group_forum_post_text_before_save', $post_text ); 2085 $topic_id = apply_filters( 'group_forum_post_topic_id_before_save', $topic_id ); 2086 2084 2087 if ( $forum_post = bp_forums_insert_post( array( 'post_text' => $post_text, 'topic_id' => $topic_id ) ) ) { 2085 2088 $topic = bp_forums_get_topic_details( $topic_id ); 2086 2089 2087 2090 $activity_content = sprintf( __( '%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2088 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $post_text )) . '</blockquote>';2091 $activity_content .= '<blockquote>' . bp_create_excerpt( $post_text ) . '</blockquote>'; 2089 2092 2090 2093 /* Record this in activity streams */ … … 2111 2114 return false; 2112 2115 2116 $topic_title = apply_filters( 'group_forum_topic_title_before_save', $topic_title ); 2117 $topic_text = apply_filters( 'group_forum_topic_text_before_save', $topic_text ); 2118 $topic_tags = apply_filters( 'group_forum_topic_tags_before_save', $topic_tags ); 2119 $forum_id = apply_filters( 'group_forum_topic_forum_id_before_save', $forum_id ); 2120 2113 2121 if ( $topic_id = bp_forums_new_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_tags' => $topic_tags, 'forum_id' => $forum_id ) ) ) { 2114 2122 $topic = bp_forums_get_topic_details( $topic_id ); 2115 2123 2116 2124 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2117 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $topic_text )) . '</blockquote>';2125 $activity_content .= '<blockquote>' . bp_create_excerpt( $topic_text ) . '</blockquote>'; 2118 2126 2119 2127 /* Record this in activity streams */ … … 2137 2145 global $bp; 2138 2146 2147 $topic_title = apply_filters( 'group_forum_topic_title_before_save', $topic_title ); 2148 $topic_text = apply_filters( 'group_forum_topic_text_before_save', $topic_text ); 2149 2139 2150 if ( $topic = bp_forums_update_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_id' => $topic_id ) ) ) { 2140 2151 /* Update the activity stream item */ … … 2143 2154 2144 2155 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $topic->topic_poster ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2145 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $topic_text )) . '</blockquote>';2156 $activity_content .= '<blockquote>' . bp_create_excerpt( $topic_text ) . '</blockquote>'; 2146 2157 2147 2158 /* Record this in activity streams */ … … 2167 2178 global $bp; 2168 2179 2180 $post_text = apply_filters( 'group_forum_post_text_before_save', $post_text ); 2181 $topic_id = apply_filters( 'group_forum_post_topic_id_before_save', $topic_id ); 2182 2169 2183 $post = bp_forums_get_post( $post_id ); 2170 2184 … … 2177 2191 2178 2192 $activity_content = sprintf( __( '%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $post->poster_id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2179 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $post_text )) . '</blockquote>';2193 $activity_content .= '<blockquote>' . bp_create_excerpt( $post_text ) . '</blockquote>'; 2180 2194 2181 2195 /* Record this in activity streams */
Note: See TracChangeset
for help on using the changeset viewer.