Hi,

I was wondering if there's any way to add moderation to published tweets, ie, tweets fetched by the cron will only be displayed after an admin/authorized user approves them.
If not, how should I address this (I am a Drupal noob, so any help is welcome)

cheers

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juampynr’s picture

Version: 7.x-5.4 » 7.x-5.x-dev

This issue could lead to some sort of moderation #1850542: Add ability to retrieve favorite tweets from a Twitter account, but it has not been implemented yet.

If you really want to be able to moderate each tweet (or been able to delete tweets), at the moment there is no such feature. I wonder if adding a Delete link would help.

tiagojsag’s picture

This patch should do the trick. This is my first time contributing to a Drupal module, so please be gentle when pointing out all the noob mistakes I made ;)

tiagojsag’s picture

Status: Active » Needs review
leewillis77’s picture

This patch applied (With some offsets, but otherwise cleanly), and works perfectly for our needs.

leewillis77’s picture

The attached patch is a re-roll of tiagojsag's patch against current dev.

It removes some trailing whitespace errors, and also renames the permission from "moderate posts" to "moderate tweets" which seems more appropriate.

DamienMcKenna’s picture

Issue summary: View changes
Status: Needs review » Needs work

Triggering the testbot.

DamienMcKenna’s picture

Status: Needs work » Needs review

Triggering the testbot.

The last submitted patch, 2: tweet-moderation-1916366-2.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 5: tweet-moderation-1916366-5.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
15.63 KB

Rerolled.

Status: Needs review » Needs work

The last submitted patch, 10: twitter-n1916366-10.patch, failed testing.

DamienMcKenna’s picture

Status: Needs work » Needs review
FileSize
15.63 KB

Fixed the dupe update script.

Status: Needs review » Needs work

The last submitted patch, 12: twitter-n1916366-12.patch, failed testing.

leewillis77’s picture

Status: Needs work » Needs review
FileSize
14.82 KB

Re-rolled the patch against current dev. since the previous patch no longer applies. Fairly manual process - so would be good to get some more eyes on this although it is working for me so far.

dani3lr0se’s picture

The patch applies for me locally. What is happening for me is, no tweets are publishing unless I check the "publish" box next to the tweets, which I see even if the "moderated" box is checked. Is this normal? So no matter if the "Moderated" box is checked after I add my twitter account, I still need to check a publish box to publish tweets. Sorry if I have misunderstood this.

My process:

1) Added my twitter account/creds, etc.
2) checked "tweets", "mentions" and "moderated"
3) viewed the "tweets" tab to see tweets after running cron
4) needed to check the "publish" box next to a tweet/s in order for tweets to publish. I had to do this regardless of whether or not "moderated" was checked.

Also, I realize this is 2 years old and may need to be updated/rerolled.

Thanks for other thoughts, etc. I'll continue to play around with it and make sure I'm doing things correctly.

oadaeh’s picture

The patch still applies cleanly, though it does add an extra line at the end of twitter.install. I did not test functionality or look at the code changes.

oadaeh’s picture

Status: Needs review » Needs work

Okay, I ran into some PHP notices that are a result of the patch, so more work needs to be done with it:

Notice: Undefined index: moderated in twitter_account_load() (line 122 of /srv/vcs/git/drupal/modules/twitter/7.x-5.x/twitter.inc).

oadaeh’s picture

Those PHP notices might be because I didn't run any updates. So feel free to revert the status, if updating is needed.