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.
Options

Feed Publisher

12357

Comments

  • Options
    Thanks Dan, this at least solves the problem for FeedPublisher!
  • Options
    We shouldn't want search engines to ignore our URL's though. Example: Lets say I have a feed, and then I use the feed to add Fresh topics to my homepage of my site.. I will want google to follow the links, it will help give my new post a boost in SEO. So using this as a fix will not help me or others. And i really want to get my fresh post on my homepage, but can't until we can smooth out this issue. :P wayne
  • Options
    anyone?
  • Options
    has the pagination been fixed yet? I'm not going to use this addon until then... I would also like the error waynem80 pointed out to be fixed fist as well. I don't want to get bashed by google!
  • Options
    Is there any way of changing the ORDER of the feed? I'm using it for my blog feed, and it ends up out of order if people have commented on an older post for instance.
  • Options
    I wouldn't use this add-on until the Dup content issues have been taking care of, GOOGLE will KIll You!
  • Options
    @Spode. I think you're talking about a "new discussions only feed." (I could be wrong), but nothing like that exists for Vanilla right now.

    @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.
  • Options
    It's a great solution for me, cause my point of using the feed is to be able to display the most recent topics on my homepage of my site" which is outside vanilla" i'll give it a try...
  • Options
    I have added support for Feed Publisher in the latest version of BlogThis:

    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.
  • Options
    I really dont understand all the instructions in the readme file packaged with the extension. Can someone please help me with simple instructions on how to to make this extension work on the forum index? It seems to work fine in other parts except the index.
  • Options
    The readme says
    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...
  • Options
    But "search.php?PostBackAction=Search&Type=Topics" doesnt output sorted data. Having it sorted would be nice because one could easily create a usable "forum blog" with the rss-topic feed e.g. with http://xfruits.com Combined with the "username:" search parameter this can be the basis of a nice, xfruits powered, weblog.
  • Options
    pgauth:

    Here's the code I used in BlogThis:

    //this was added in for compatibility with FeedPublisher
    //The url /search.php?PostBackAction=Search&Type=Comments&BlogSearch=1&Feed=RSS2 is used in FeedPublisher

    function Search_AddQuery(&$CommentManager)
    {
    if (ForceIncomingInt('BlogSearch', 0) == 1)
    {
    $CommentManager->DelegateParameters['SqlBuilder']->AddWhere('c', 'BlogThis', '', '1', '=');
    $CommentManager->DelegateParameters['SqlBuilder']->AddOrderBy('DateCreated', 'c', $SortDirection = 'desc');
    }
    }

    $Context->AddToDelegate("CommentManager", "SearchBuilder_PostWhere", "Search_AddQuery");
    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.
  • Options
    Feed Publisher # 63 says the 0.3.0 version doesn't allow for public feed of private category but that the fix is easy. Is that the same fix of changing the one to zero in $Context->Configuration[ 'AUTHENTICATE_USER_FOR_FEED_PUBLISHER' ] = 1;?
  • Options
    Hey, love the extension, works great for my forum. I'm not technically savvy and I realize this is a stupid question, but is there a way to include the author's name in the *title* of the feed? Internet Explorer and Firefox RSS readers omit the name of the author as does the Mail program on Mac (google reader shows the name fine). Thanks!
  • Options
    @dontodd
    yes

    @manusevil
    In functions.php, just tweak the function ReturnFeedItem().
  • Options
    couldn't the 'tweaking' of categories_config.php be automated (or replaced in the main extension code). You could grab the category id, and plug it into the /search.php?blah=blahblah&blah2=..... format. Or am I sorely mistaken?
  • Options
    fysicluvr - I think you're right. And simple tick boxes to say which categories you don't want to have feeds for would be pretty easy.
  • Options
    In fact Dan39 changed automated thing to manual thing when creating CrudeRSS from the RSS2 extension (from Mark), because of some bad behaviours. Maybe he will give some details here... If you have something working, I'd be glad to put it in the next version. I won't try to investigate here, sorry.
    But what do you mean by "or replaced in the main extension code"?
  • Options
    I assume he means, moving the code into the main default.php, so that you don't need a second file.
This discussion has been closed.