Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Feed Publisher
This discussion has been closed.
Comments
@fysicsluvr. Pagination was fixed in FeedPublisher a long time ago. Unless there's a new bug that I'm not aware of.
As far as the feeds are concerned, it's pretty easy to rewrite FeedPublisher to spit out URLs that actually match the real discussion URL. The problem is what do you do when there is more than one page of a discussion. Right now, FeedPublisher is written to just use the "Focus" parameter that's part of the Vanilla core. It essentially takes you to the right comment no matter what page it's on in a discussion. This is helpful because the Index-level feed is actually running off of the Search results.
But, if you take the Focus parameter out of FeedPublisher, your Feed URLs won't take people to the second or third page where that comment was located. At least I'm not aware of a way to determine the LastComment number (which is necessary to determine the page number) in each search result.
I can see why this would be more desirable to some (even if the subsequent pages get hosed), but I'm not sure everyone will want this functionality. In any case, I noticed this problem awhile back and tried doing just that. I changed default.php (starting near line 264, I think) to:
$Properties[ "Title" ] = FormatHtmlStringInline( ForceString( $Comment->Discussion, "" ) ); $Properties[ "Link" ] = GetUrl( $SearchForm->Context->Configuration, "comments.php", "", "DiscussionID", $Comment->DiscussionID); $Properties["Link"] .= CleanupString(ForceString( $Comment->Discussion, "" )).'/#Comment_'.$Comment->CommentID;
I'm pretty sure that's all I changed in default.php, but it's late and I can't be sure right now. (I can check later if you have issues).
What's nice about that is that it uses the "#Comment_123" anchor to get you to the right comment on page 1. Anchors are ignored by Google and search engines, and aren't considered duplicate URLs.
But, I don't know how to get the feed to know when the comment spills over to page 2. So, if I ever have a discussion that spills over to page 2, the user just gets taken to page 1 and the anchor is ignored. It's a sloppy solution, but it gets the job done.
http://lussumo.com/addons/index.php?PostBackAction=AddOn&AddOnID=364
Using it, you can have a date ordered feed of the blog.
@dan39
Changing the order can be done, there is a delegate in place - look at the bottom of default.php for BlogThis to see how I did it. The same technique could be applied to any of the searches.
1) Don't forget to tweak categories_config.php (see below).
2) You have to install it as a usual extension (see the docs).
3) If you upgrade...
I must admit that categories_config.php is not trivial to set up, since it's php code.
// manual placement for the "all discussions" feed links if ( 0 == ForceIncomingInt( 'CategoryID', 0 ) ) { $content = ' <ul> <li><h2>'.$Context->GetDefinition( 'Feeds' ).'</h2> <ul> <li><a href="/search.php?PostBackAction=Search&Type=Comments&Feed=RSS2" title="All Discussions - RSS Feed" class="RSS2">RSS2</a></li> <li><a href="/search.php?PostBackAction=Search&Type=Comments&Feed=ATOM" title="All Discussions - ATOM Feed" class="ATOM">ATOM</a></li> </ul> </li> </ul>'; // add link to the panel $Panel->AddString( $content, 10 ); // add auto-discovery link to head $Head->AddString( '<link rel="alternate" type="application/rss+xml" href="/search.php?PostBackAction=Search&Advanced=1&Type=Comments&Feed=RSS2" title="All Discussions - RSS Feed" />' ); $Head->AddString( '<link rel="alternate" type="application/atom+xml" href="/search.php?PostBackAction=Search&Advanced=1&Type=Comments&Feed=ATOM" title="All Discussions - ATOM Feed" />' ); }
First you must understand that forum_folder/search.php?PostBackAction=Search&Type=Comments is a blank search in the comments, which is interesting to find all posts, in every category, reverse sorted by date. &Feed=RSS2 triggers FP for it to output the xml feed.
This is interesting for what you need: the index of your forum. That's why we make it appear in the index, where no category is specified (0 == ForceIncomingInt( 'CategoryID', 0 )).
The first 0 can be replaced by the id of the category in which you want FP to work. Then, the search url must be slightly changed...
Here's the code I used in BlogThis: As you can see, really simple - Feed Publisher (or yourself) could integrate something similar (or the same), so that order could be added to the feeds.
$Context->Configuration[ 'AUTHENTICATE_USER_FOR_FEED_PUBLISHER' ] = 1;
?yes
@manusevil
In functions.php, just tweak the function ReturnFeedItem().
But what do you mean by "or replaced in the main extension code"?