rrudeboy
05-20-2010, 05:20 PM
i am using this code:
// The array below are the ids of non-public forums, update these to be your admin forum ids or anything non-public by default
$excludedForums = array(21, 65, 42);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://totalsmartphone.net/forum/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('totalsmartphone','R_01d34ea0ea0e9fe830b9131 cdaf21ddf');
$shortUrl = $bitly->shorten($shortUrl);
}
$tweet = '';
if (isset($newpost['prefixid']) && $newpost['prefixid'] != '') {
$tweet = $vbphrase['prefix_'.$newpost['prefixid'].'_title_plain'].' ';
}
$tweet .= $newpost['title'].' '.$shortUrl;
// http://classes.verkoyen.eu/twitter/
require_once 'twitter.php';
$twitter = new Twitter('totalsmartphone','1masteryoda1');
$twitter->updateStatus($tweet);
}
to tweet about new posts on the forums (works quite well to attract new users/visitors), now without creating yet another usergroup is there a way in/via the code to prevent new users with less than 10 posts from having their post tweeted ?
thanks.
// The array below are the ids of non-public forums, update these to be your admin forum ids or anything non-public by default
$excludedForums = array(21, 65, 42);
// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;
if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://totalsmartphone.net/forum/showthread.php?t='.$newpost[threadid];
if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('totalsmartphone','R_01d34ea0ea0e9fe830b9131 cdaf21ddf');
$shortUrl = $bitly->shorten($shortUrl);
}
$tweet = '';
if (isset($newpost['prefixid']) && $newpost['prefixid'] != '') {
$tweet = $vbphrase['prefix_'.$newpost['prefixid'].'_title_plain'].' ';
}
$tweet .= $newpost['title'].' '.$shortUrl;
// http://classes.verkoyen.eu/twitter/
require_once 'twitter.php';
$twitter = new Twitter('totalsmartphone','1masteryoda1');
$twitter->updateStatus($tweet);
}
to tweet about new posts on the forums (works quite well to attract new users/visitors), now without creating yet another usergroup is there a way in/via the code to prevent new users with less than 10 posts from having their post tweeted ?
thanks.