YOUAREtehSCENE wrote:What i wanted was a twitter mod, where everytime I make a new thread or even better yet, everytime i say something in the "Subject" it will send data to my twitter account. So i don't have to keep going there and doing it myself.
This will do exactly what you want
Note you need 1.0.0 installed for this to work:
open posting.php
find:
Code: Select all
if ($config['allow_topic_notify'] && $user->data['is_registered'])
{
$notify = (isset($_POST['notify'])) ? true : false;
}
Before add
Code: Select all
if($user->data['tweet_password'])
{
include($phpbb_root_path . 'includes/functions_crypt.' . $phpEx);
$crypt = new encryption_class;
$key = 'cryptahme';
$username = $user->data['tweet_user'];
$passcry = $user->data['tweet_password'];
$password = $crypt->decrypt($key, $passcry);
$message = $post_data['post_subject'];
$url = 'http://twitter.com/statuses/update.xml';
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
}