Page 2 of 2

Posted: Sun Nov 11, 2007 3:16 am
by bz£
Okay! Apparently it only takes a few minor changes to make this all work. Above, where I said to do this (to includes/functions_post.php):

Code: Select all

	/* bzl: start of what to add */
	/* Here, the post has updated successfully.  I think.  So it should be a good place to update RSS */
	if ($topic_type == POST_ANNOUNCE) {
	  include ($phpbb_root_path . 'includes/rss.' . $phpEx);
	  output_rss();
	}
/* end of what to add */

	add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));

	//
	// Add poll
	// 
	if (($mode == 'newtopic' || ($mode == 'editpost' && $post_data['edit_poll'])) && !empty($poll_title) && count($poll_options) >= 2)
	{
Instead of the stuff I told you to add, put in this code instead:

Code: Select all

    /* bzl: start of what to add */
	$sql = "SELECT topic_type "
	     . "FROM " . TOPICS_TABLE
	     . "WHERE topic_id = " . $topic_id;
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, "SQL error in RSS generation.", '', __LINE__, __FILE__, $sql);
	}

	$row = $db->sql_fetchrow($result);
	$db->sql_freeresult($result);
	if ($row['topic_type'] == POST_ANNOUNCE) {
	  include ($phpbb_root_path . 'includes/rss.' . $phpEx);
	  output_rss();
	}
/* end of what to add */
This explicitly checks to see if you've just posted a reply to an announcement, instead of relying on phpbb to tell you (because phpbb lies. Don't expect your promised flying car from those jackasses either).

Then go into the rss.php file. There are two SQL statements at the top. One is commented out and the other is not-- switch the two.

The end result is that all replies to announcements will also end up in the feed, as soon as they are posted.

Also, the permissions check for who can mark a post "Best Of" looks for moderator rights. I think it applies to where the actual Best Of thread is, though, and not to what post they are trying to mark. So Glenn might not be able to mark posts, depending on where the best-of thread is, even if the button is there for him to click on (in other forums). Honestly I'm not sure how this will work.