MyBB Community Forums

Full Version: Need a little help finishing off Tweet to Twitter plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I had to leave for a little while, but am installing it now. Will report back shortly.
Works perfect!

Can we add a setting to prevent threads in private forums from posting?

And maybe line breaks between the dataline, subject, username and url?

I tried ading the line breaks, both with <br /> tags and /r/n syntax, but Twitter seems to ignore them.

Ok, so I tried everything to get the line breaks in, only to find that Twitter strips them out. Dodgy

I'm also thinking that it would be cool to display the first 100 or 200 letters of the message now, and am going to see if I can make it work.

I don't have a clue how to prevent threads in private forums from being tweeted though, so if you can make that happen, I think we've got a killer plugin.

Well, I tried inserting a querie to the posts table for the tid, pid and message, and tweeting the message too, but I got a white space error. I'm thinking it probably requires a table join? Which is beyond me. Dang it! I was hoping I could at least make something work. Blush

Lastly, I realized that the dateline really isn't neccessary, since Twitter inserts when the tweet was place, and have removed it.
Figured out how to block threads in private forums from tweeting myself!
How did you do the check?
if (empty($new_thread['fid']))
return;

if (empty($mybb->settings['privateforums']))
return;

$private = explode(",", $mybb->settings['privateforums']);
$forum = $new_thread['fid'];

if (in_array($forum,$private))
{
return;
}
Pages: 1 2 3