+ if (is_object($post->retweeted_status)) {
+
+ $_REQUEST['body'] = $post->retweeted_status->text;
+
+ // media
+ if (is_array($post->retweeted_status->entities->media)) {
+ foreach($post->retweeted_status->entities->media AS $media) {
+ switch($media->type) {
+ case 'photo':
+ $_REQUEST['body'] = str_replace($media->url, "\n[img]".$media->media_url_https."[/img]\n", $_REQUEST['body']);
+ break;
+ }
+ }
+ }
+
+ $converted = twitter_convertmsg($a, $_REQUEST['body'], true);
+ $_REQUEST['body'] = $converted["body"];
+
+ $_REQUEST['body'] = "[share author='".$post->retweeted_status->user->name.
+ "' profile='https://twitter.com/".$post->retweeted_status->user->screen_name.
+ "' avatar='".$post->retweeted_status->user->profile_image_url_https.
+ "' link='https://twitter.com/".$post->retweeted_status->user->screen_name."/status/".$post->retweeted_status->id_str."']".
+ $_REQUEST['body'];
+ $_REQUEST['body'] .= "[/share]";
+ } else {
+ $_REQUEST["body"] = $post->text;
+
+ if (is_array($post->entities->media)) {
+ foreach($post->entities->media AS $media) {
+ switch($media->type) {
+ case 'photo':
+ $_REQUEST['body'] = str_replace($media->url, "\n[img]".$media->media_url_https."[/img]\n", $_REQUEST['body']);
+ break;
+ }
+ }
+ }
+
+ $converted = twitter_convertmsg($a, $_REQUEST["body"], true);
+ $_REQUEST['body'] = $converted["body"];
+ }
+