New Articles Category



  • I miss the old Articles category. I understand @apapadimoulis doesn't want two comment threads for each article, but I think it would be nice to at least have links to the articles from the forum.

    I started a NodeBB plugin that pulls links from the front page RSS feed and posts them to the forum. They go in a category that only admin, mods, authors, and PaulaBean can post to.

    0_1464784125230_Capture.PNG

    Would anyone else like to see something like this?



  • I think it should have a setting for specifying the category. It would be kind of cool, maybe, if we could link authors to their forum accounts if they exist. I haven't looked at the RSS feed to know how feasible that is. Then another setting to specify the default user to use to post.

    We can set permissions on the category so only certain users can post, and we can definitely set it up like One Post so that replies aren't allowed.



  • @boomzilla said in New Articles Category:

    setting for specifying the category

    Yes, that's already a setting.

    @boomzilla said in New Articles Category:

    if we could link authors to their forum accounts

    I get the author's full name: <dc:creator>Remy Porter</dc:creator>. Maybe the admin settings page could have a "map" of full names to user names?

    @boomzilla said in New Articles Category:

    setting to specify the default user to use to post

    Yes, that's already a setting.



  • This post is deleted!


  • Here's what I've got so far:

    Here's all the stuff you can change from the admin settings page:

    0_1464975696429_Capture2.PNG

    It won't check the RSS feed or post any articles unless "Enable RSS Feed" is checked. This is unchecked by default because the default values for some of the other settings aren't sane enough.

    I added a little more information to the posts:

    0_1464975662940_Capture.PNG

    Still on my todo list:

    • Add the author's forum account (if it exists) to the post content.
    • Write lots more tests.
    • Test using the official test environment.

    Feedback and criticism are welcome...



  • @NedFodder said in New Articles Category:

    • Add the author's forum account (if it exists) to the post content.

    Here's the settings page (with user name autocomplete):

    0_1465313883879_Capture.PNG

    Here's an author that has a user name:

    0_1465313917059_Capture2.PNG

    And an author without a user name:

    0_1465313939982_Capture3.PNG

    Still on my todo list:

    • Tag the post with the front page article category (with a setting to enable/disable this tag).
    • Write lots more tests.
    • Test using the official test environment.


  • @NedFodder said in New Articles Category:

    Test using the official test environment.

    I swear I still mean to test this. Been spending time trying to figure out cooties, though.



  • @boomzilla That's more important!


  • mod

    @NedFodder said in New Articles Category:

    Write lots more tests.

    +1 just for that



  • @boomzilla said in New Articles Category:

    It would be kind of cool, maybe, if we could link authors to their forum accounts if they exist.

    Wait, did you mean it should create the post as the author? And if the author doesn't have an account, post as the default user (a.k.a. PaluaBean)? I just made that change to the repo, I'll screenshot it later if I feel like it...



  • @NedFodder Yep, that's what I was thinking. I think.


  • Discourse touched me in a no-no place

    @NedFodder said in New Articles Category:

    . I understand @apapadimoulis doesn't want two comment threads for each article

    I may have missed it but I never saw an explanation of why the article comments aren't just here, like they used to be.



  • @FrostCat said in New Articles Category:

    @NedFodder said in New Articles Category:

    . I understand @apapadimoulis doesn't want two comment threads for each article

    I may have missed it but I never saw an explanation of why the article comments aren't just here, like they used to be.

    Yeah! We got @aliceif that way! :)



  • @FrostCat said in New Articles Category:

    @NedFodder said in New Articles Category:

    . I understand @apapadimoulis doesn't want two comment threads for each article

    I may have missed it but I never saw an explanation of why the article comments aren't just here, like they used to be.

    https://what.thedailywtf.com/post/797208


  • area_deu

    @DogsB The likes thread was the other major reason why I joined. It seemed like fun!



  • @NedFodder said in New Articles Category:

    Still on my todo list:

    • Tag the post with the front page article category (with a setting to enable/disable this tag).
    • Write lots more tests.
    • Test using the official test environment.

    Here it is creating tags from the front page category:

    0_1465580395587_Capture.PNG

    Here's an article by someone with a forum account:

    0_1465580408227_Capture2.PNG

    Here's an article by someone without a forum account:

    0_1465580472704_Capture3.PNG

    @boomzilla version 0.0.2 is published and ready to be tested (by someone other than me).



  • @NedFodder Just got this error:

    10/6 15:11 [11979] - verbose: [nodebb-plugin-tdwtf-articles] Getting articles from RSS feed.
    10/6 15:11 [11979] - error: TypeError: callback is not a function
        at /home/boomzilla/nodebb/node_modules/nodebb-plugin-tdwtf-articles/library.js:179:3
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:52:16
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:269:32
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:44:16
        at /home/boomzilla/nodebb/node_modules/nodebb-plugin-tdwtf-articles/library.js:166:4
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:181:20
        at iterate (/home/boomzilla/nodebb/node_modules/async/lib/async.js:262:13)
        at Object.async.forEachOfSeries.async.eachOfSeries (/home/boomzilla/nodebb/node_modules/async/lib/async.js:281:9)
        at Object.async.forEachSeries.async.eachSeries (/home/boomzilla/nodebb/node_modules/async/lib/async.js:214:22)
        at tdwtfArticles.processYahooEntries (/home/boomzilla/nodebb/node_modules/nodebb-plugin-tdwtf-articles/library.js:163:8)
        at fn (/home/boomzilla/nodebb/node_modules/async/lib/async.js:746:34)
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:1213:16
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:166:37
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:706:43
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:167:37
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:1209:30
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:52:16
        at Immediate._onImmediate (/home/boomzilla/nodebb/node_modules/async/lib/async.js:1206:34)
        at processImmediate [as _immediateCallback] (timers.js:383:17)
    TypeError: callback is not a function
        at /home/boomzilla/nodebb/node_modules/nodebb-plugin-tdwtf-articles/library.js:179:3
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:52:16
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:269:32
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:44:16
        at /home/boomzilla/nodebb/node_modules/nodebb-plugin-tdwtf-articles/library.js:166:4
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:181:20
        at iterate (/home/boomzilla/nodebb/node_modules/async/lib/async.js:262:13)
        at Object.async.forEachOfSeries.async.eachOfSeries (/home/boomzilla/nodebb/node_modules/async/lib/async.js:281:9)
        at Object.async.forEachSeries.async.eachSeries (/home/boomzilla/nodebb/node_modules/async/lib/async.js:214:22)
        at tdwtfArticles.processYahooEntries (/home/boomzilla/nodebb/node_modules/nodebb-plugin-tdwtf-articles/library.js:163:8)
        at fn (/home/boomzilla/nodebb/node_modules/async/lib/async.js:746:34)
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:1213:16
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:166:37
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:706:43
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:167:37
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:1209:30
        at /home/boomzilla/nodebb/node_modules/async/lib/async.js:52:16
        at Immediate._onImmediate (/home/boomzilla/nodebb/node_modules/async/lib/async.js:1206:34)
        at processImmediate [as _immediateCallback] (timers.js:383:17)
    


  • @boomzilla thanks, I can reproduce that. Fixing now...

    On a related note, writing good tests for functions with async.waterfall is harder than I thought...



  • @boomzilla Pushed the fix to github. I'll try to fix the tests this weekend...



  • @NedFodder So....getting back to this finally. On the settings page, what does "# Entries / Interval" mean?



  • @boomzilla That's leftover from baris's rss plugin. The plugin will check for new articles periodically (that's the interval), so it's asking how many articles do you want to pull each time. TDWTF posts at most two articles a day (actually an article and an announcement), so I'd set this to at least 2. If you set it to 2 and there's only one new article, it will only post the one new article, there should be no double posting.



  • @NedFodder Ahhh...I'll probably put it higher at least at first so it pulls in whatever's there.






Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.