Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
default category undefined?
codegrunt
New
Howdy. A quick peek at the code (after importing a test RSS feed) seems to suggest that there is currently no way to have auto-created discussions funnel into a specific category. Right now articles are getting placed into a category but it appears to have been chosen randomly. . .
Is fixing this as simple as adding a line like the following to the FeedDiscussionsPlugin::PollFeed method?
$DiscussionData[$DiscussionModel->CategoryID] = 123456;
If so, a suggestion would be to add an option to the admin interface to associate a feed with a specific category. I will likely do this myself anyway once I get up to speed with Vanilla's internals a bit more but thought I should mention it as it seems like a needed function.
Cheers
Is fixing this as simple as adding a line like the following to the FeedDiscussionsPlugin::PollFeed method?
$DiscussionData[$DiscussionModel->CategoryID] = 123456;
If so, a suggestion would be to add an option to the admin interface to associate a feed with a specific category. I will likely do this myself anyway once I get up to speed with Vanilla's internals a bit more but thought I should mention it as it seems like a needed function.
Cheers
Tagged:
4
Comments
I was also wondering, the feeds seem to be posting a summary. I have my feeds set to display full text, it shows full text from feedburner, but only displays an excerpt in the forums when posted. I'd like to show the full post, is this possible?
$StoryBody = (string)GetValue('description', $Item);
The only change is that it wraps the contents in a DIV a bit further down. So there should be no truncation or anything like that happening as far as I can see. I would try viewing the source for your RSS feed and make sure the contents are what you think they are.
Cheers
When I ran the test feed on this, all the posts came up under my account. It makes it a little unclear to the reader where the information is coming from (plus it conflicts with interest in my own posts).
I could create a new account (NicheBot, for example, or, in my case TeaBot) and assign the RSS Feed posts to that. Nice and clear for the users to look at and understand where the wealth of posts and information is coming from.
$InsertUserID = $DiscussionModel->SQL->Select('UserID')->From('User')->Where('Admin',1)->Get()->FirstRow()->UserID;
Cheers
@codegrunt I'm not a coder but I'm not afraid to get my hands dirty. Can you give me a better idea about how to edit that line if, for example, the username was Bot and the account ID was 12?
@leafboxtea: that would be simply
$InsertUserID = '12';
$DiscussionData[$DiscussionModel->CategoryID] = 1234;
where "1234" is the id of the category you want the articles to show up under.
Cheers
- I need to pick which categories + user the Feeds are posted.
- I need the whole RSS post to be posted, not just an intro, as well as the pictures. My feed is set up to show the whole thing.
- It'd be great to have the direct link to the original article posted too
Original last two lines in function PollFeed: Inserted lines:
Change Cat2 to the name of the category you want to insert the post into.
$InsertUserID = $DiscussionModel->SQL->Select('UserID')->From('User')->Where('Name','PaulRevere')->Get()->FirstRow()->UserID;
Where "PaulRevere" is the name of the userid you want to use for the insert.
The rss does contain the entire post. When I was playing around with it, I tried switching it so it inserted the entire post into VF, but I didn't like the results, and didn't want to work on that area.
In other words, if you want to hack the code it would be easy to do.