vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vBulletin to Twitter, live tweets of new threads (https://vborg.vbsupport.ru/showthread.php?t=234288)

Videx 04-30-2010 02:44 AM

Quote:

Originally Posted by Bob_R (Post 2029352)
Same here.

Assuming you aren't on dedicated servers, I hope you both immediately opened tickets with your hosts asking this same question? We need to know exactly what they're doing to break things and how to fix it.

Bob_R 05-01-2010 11:56 AM

Quote:

Originally Posted by Videx (Post 2029355)
Assuming you aren't on dedicated servers, I hope you both immediately opened tickets with your hosts asking this same question? We need to know exactly what they're doing to break things and how to fix it.

I did submit a ticket yesterday morning.

In the meantime I can tell you this. I switched web hosts this week. Since then this vbulletin to twitter, live tweets of new threads hasn't worked.

Any other suggestions?

ukiya006 05-02-2010 10:26 AM

Quote:

Originally Posted by Xeon3D (Post 2024183)
I'm getting the word "Array" appended to the end of each message and no link to the thread as you can check here:

http://twitter.com/xeon3dinfo/

here's my plugin contents:

PHP 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(5,6);

// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly true;

if (!
in_array($foruminfo[forumid], $excludedForums)) {
    
$shortUrl 'http://www.xeon3d.info/forums/showthread.php?t='.$newpost[threadid];

    if (
$useBitly) {
      
// http://classes.verkoyen.eu/bitly
      
require_once 'bitly.php';
      
$bitly = new Bitly('realusernamehere''realAPIkeyhere');
      
$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('realusernamehere','realpasswordhere');
    
$twitter->updateStatus($tweet);



I am having the same problem as him =(
Any solutions so far?

I came across tis error a few mins ago..
it seems related..

Quote:

Status is a duplicate. on line 204 in /home/cbnoobco/public_html/thesgmall/twitter.php
#0 /home/cbnoobco/public_html/thesgmall/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/cbnoobco/public_html/thesgmall/newthread.php(514) : eval()'d code(26): Twitter->updateStatus(' Array')
#2 /home/cbnoobco/public_html/thesgmall/newthread.php(514): eval()
#3 {main}


Fatal error: Status is a duplicate. on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287

ukiya006 05-02-2010 10:46 AM

Quote:

Status is a duplicate. on line 204 in /home/cbnoobco/public_html/thesgmall/twitter.php
#0 /home/cbnoobco/public_html/thesgmall/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /home/cbnoobco/public_html/thesgmall/newthread.php(514) : eval()'d code(26): Twitter->updateStatus(' Array')
#2 /home/cbnoobco/public_html/thesgmall/newthread.php(514): eval()
#3 {main}


Fatal error: Status is a duplicate. on line 204 in [path]/twitter.php in [path]/vb/vb.php on line 287
Ok.. Manage to solve that.. Realised that I hooked it to the wrong location..

Hmm.. but now still got the word "Array" instead of the short url it's suppose to be showing.

ukiya006 05-02-2010 11:54 AM

Quote:

Originally Posted by ukiya006 (Post 2030515)
Ok.. Manage to solve that.. Realised that I hooked it to the wrong location..

Hmm.. but now still got the word "Array" instead of the short url it's suppose to be showing.

Solved.. by uploading the bitly.php that's available here instead of the one in the main website.

your24hourstore 05-02-2010 02:23 PM

Quote:

Originally Posted by Videx (Post 1979953)
Sure, for those that have bitly working (not me).

man i have tried everything , to getthis hack to work its just not working i have had all the error did all the fixs and still cant use it :confused:

Even though i get the errors , when i refreshed the error page it sent the tweets through, so its almost kinda working



NOT installed

SlackerAPM 05-07-2010 07:32 PM

I apologise if this has been asked before, I did look through the thread but couldn't find anything...

Is it possible to specify forums to include rather than exclude as I only want to include 2 forums. It would easier for me do that rather than exclude 35 other forums.

Thanks.

your24hourstore 05-07-2010 07:37 PM

Quote:

Originally Posted by SlackerAPM (Post 2033344)
I apologise if this has been asked before, I did look through the thread but couldn't find anything...

Is it possible to specify forums to include rather than exclude as I only want to include 2 forums. It would easier for me do that rather than exclude 35 other forums.

Thanks.

really live up to your name dont you :)

SlackerAPM 05-07-2010 07:41 PM

I should maybe change to EfficientAPM ;)

Videx 05-07-2010 07:45 PM

Near the first line there's a !. Take it out to make it an inclusion list.
Quote:

if (!in_array

Bob_R 05-12-2010 02:38 AM

Quote:

Originally Posted by Videx (Post 2029355)
Assuming you aren't on dedicated servers, I hope you both immediately opened tickets with your hosts asking this same question? We need to know exactly what they're doing to break things and how to fix it.

They've never given a definite answer. Everyone's passing the buck. But the mod doesn't work for me.

safe_mode is disabled. I have Json and Curl compiled.

What else can it be?????????

Bob_R 05-12-2010 03:12 PM

OK here's the latest. I submitted a test thread and it went thru with no errors and is on my site.

But, it didn't tweet to twitter?

It's supposed to be instanteneous (sp?) right?

I wouldn't even have to wait any amount of time?

Thanks!!

Execution Order Use this field to enter the order in which code at the same hook will be executed. What should this number be?

clubplanet 05-12-2010 07:01 PM

Great mod, thanks!

A couple of things to note:

1. Make sure you download all the PHP code. I missed the bracket at the end and got the error:
PHP Parse error: syntax error, unexpected $end in

2. Download the bitly.php file from this thread not from the URL linked in the post. The link is newer and does not work properly. It gives you the word "Array" rather than the bit.ly URL.

Bob_R 05-12-2010 11:29 PM

Quote:

Originally Posted by clubplanet (Post 2035917)
Great mod, thanks!

A couple of things to note:

1. Make sure you download all the PHP code. I missed the bracket at the end and got the error:
PHP Parse error: syntax error, unexpected $end in

2. Download the bitly.php file from this thread not from the URL linked in the post. The link is newer and does not work properly. It gives you the word "Array" rather than the bit.ly URL.

Got all of that. Still doesn't work. See post 372

Now it's not even going to my bit.ly.

Sparrow-Sean 05-13-2010 12:38 AM

Seems to work fine with the latest vBulletin and I followed the correct procedures ;)

Bob_R 05-13-2010 03:37 PM

Actually the only thing I did find out is that the actual server software my webhost uses is LiteSpeed instead of Apache, in most cases this will not cause an issue since LiteSpeed is far superior than Apache.

I followed all directions, do not get errors, but do not see the post happening on Twitter.

Posted several tests then deleted them.

YouTubeVZ 05-14-2010 12:13 AM

Dont work ?!?!?!?!?!?! :(

betts02 05-16-2010 11:14 AM

Had to uninstall

Put everything in the correct place but when i activate the forumblock i get fatal errors

iguano 05-16-2010 12:20 PM

Turn off, i get errores every new thread :-(

betts02 05-16-2010 02:30 PM

Quote:

Originally Posted by iguano (Post 2037886)
Turn off, i get errores every new thread :-(

Exactly the same mate, looked good but had to turn it off

melbo 05-21-2010 12:08 AM

Works perfectly on my 3.8.5 forum. Is there a way I can make the regular twitter social bookmark button in every thread use my bit.ly? Also, do you have a 'post to Facebook' option??? Would be very cool.

tommac3 05-21-2010 01:15 AM

I would love to install if it works

stoute 05-22-2010 10:33 PM

I seem to have done something wrong here. I receive the error code below;

Warning: require_once(bitly.php) [function.require-once]: failed to open stream: No such file or directory in [path]/newthread.php(273) : eval()'d code on line 125

Fatal error: require_once() [function.require]: Failed opening required 'bitly.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tttsndcx/public_html/home/newthread.php(273) : eval()'d code on line 125

Any assistance with this would be great! I am using 4.0.3 if that makes a difference.

Videx 05-22-2010 11:43 PM

Quote:

Originally Posted by stoute (Post 2042028)
I seem to have done something wrong here. I receive the error code below;
Warning: require_once(bitly.php)

Can we assume you have already read back through all the pages in this thread and haven't found anyone else having the same error?

Hint: Forget bitly; you can't use it on your server.

jbd 05-23-2010 10:20 PM

I get the following error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'http://www.forum.com/newthread.php?do=postthread&...

</hash>

HipHopStan.com 05-23-2010 11:03 PM

i just installed. I'm on PHP 5.2.13 -- using vbSEO 3.3.2 -- and its working great so far for me. I'm also on vB 3.8.2

:up:

rrudeboy 05-24-2010 01:36 PM

works great, only thing i'm looking for is a way to have only posts made by users with an X amount of posts tweeted... you know, to prevent spam tweets.

thanks.

momon 05-25-2010 06:07 AM

Quote:

Originally Posted by imported_nimbus (Post 1970242)
Let me share my solution.

bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;

and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;

Then all error messages gone! :)

This is for ppl reporting problems with json still, after reading through the thread, this post in particular finally solved things for me and the plugin is working wonderfully now.

https://vborg.vbsupport.ru/showthrea...=234288&page=7

jahna 05-26-2010 08:13 AM

Mine is not working!
can anyone check the my code here please, thanks a lot:

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(3,6);

// If you are having trouble getting bitly URL shortening to work... disable it!
$useBitly = true;

if (!in_array($foruminfo[forumid], $excludedForums)) {
$shortUrl = 'http://www.mymarketingforum.ch/forum/showthread.php?t='.$newpost[threadid];

if ($useBitly) {
// http://classes.verkoyen.eu/bitly
require_once 'bitly.php';
$bitly = new Bitly('mymafo','http://bit.ly/a6LdSx');
$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('mymafo','xxxxxxxxxx');
$twitter->updateStatus($tweet);

EconomicVoice 05-29-2010 08:51 AM

Quote:

Originally Posted by imported_nimbus (Post 1970242)
Let me share my solution.

bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;

and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;

Then all error messages gone! :)

This is the solution that worked for me too (like many others).

Although I didn't seem to have a 'CURLOPT_HEADER' in the bitly php, just changing the other two did the job.

Bob_R 05-29-2010 01:11 PM

Quote:

Originally Posted by momon (Post 2043036)
This is for ppl reporting problems with json still, after reading through the thread, this post in particular finally solved things for me and the plugin is working wonderfully now.

https://vborg.vbsupport.ru/showthrea...=234288&page=7

Where? After line 136?

carrlos 05-29-2010 09:32 PM

Installed. Works perfectly.

An "include" forums option would be great for those of us who have less forums we'd like to include than exclude. ;)

Bob_R 05-29-2010 10:42 PM

I actually got it to work except for one little thing.

When you click the shortened link (is.gd) on Twitter you're directed to my site and and get this message:

No Thread specified. If you followed a valid link, please notify the administrator

Videx 05-30-2010 12:08 AM

Quote:

Originally Posted by carrlos (Post 2045278)
An "include" forums option would be great for those of us who have less forums we'd like to include than exclude. ;)

Simply remove the bang (! - exclamation point) from the line near the beginning to make it an inclusion list.
Quote:

if (!in_array($foruminfo[forumid...

jbd 05-31-2010 06:58 AM

Still getting the error "cannot view XML input using xsl stylesheet"... Sounds like something simple. Any ideas?

Videx 05-31-2010 07:28 AM

Quote:

Originally Posted by jbd (Post 2045905)
Still getting the error "cannot view XML input using xsl stylesheet"... Sounds like something simple. Any ideas?

I believe that's a viewer problem. Can you verify you've tried viewing the feed in several different browsers? Do they all give you the same error?

kefallon 05-31-2010 08:17 AM

Look i know i should check the preceding 27 pages but could someone in the know tell me if this issue is fixed yet??
Quote:

statuses/update.xml Could not authenticate you. Unauthorized on line 229 in /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/twitter.php
#0 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/twitter.php(648): Twitter->doCall('statuses/update...', Array, true)
#1 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/newthread.php(262) : eval()'d code(26): Twitter->updateStatus('test http://www...')
#2 /var/www/vhosts/ionian-island.co.uk/httpdocs/forums/newthread.php(262): eval()
#3 {main}
if not any other suggestions i would really like to get the ability to tweet messages from my board working.

jbd 05-31-2010 08:55 AM

was using IE... I didn't try in another browser. Obv it would be useless if it only worked in Firefox anyway. But I am sure it is supposed to work in IE and there is something else going on here. I am using a custom skin on my forum, but then most of us probably are. Maybe it is something to do with the doctype specified in some of the CSS templates, or something similar? Just a guess. Any ideas welcomed...

Videx 05-31-2010 11:43 AM

Quote:

Originally Posted by jbd (Post 2045929)
was using IE... I didn't try in another browser. Obv it would be useless if it only worked in Firefox anyway.

Clearly you missed my point entirely, and apparently you aren't used to testing things in different browsers. Sorry, but that's not how forum administration works. You need to immediately install Firefox, Chrome, Safari, and Opera and get used to trying things out in a few of them, both logged in and not logged in.

In this particular case you would have immediately seen that the problem is not with vb or this mod. OTOH, if you saw this in every reader you tried, I'd say we need a link to try it for ourselves.

And to kefallon: No, I don't think there has ever been a good solution to Twitter "could not authenticate" errors. But I wouldn't take my word for it and would slog through all the pages anyway.

Bob_R 05-31-2010 10:22 PM

Quote:

Originally Posted by imported_nimbus (Post 1970242)
Let me share my solution.

bitly.php:
I set the following Curl options:
$options[CURLOPT_FOLLOWLOCATION] = false;
$options[CURLOPT_HEADER] = false;

and for twitter.php:
$options[CURLOPT_FOLLOWLOCATION] = false;

Then all error messages gone! :)

Sure it's not true for the first and third one?

Still doesn't work. :down:


All times are GMT. The time now is 04:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03067 seconds
  • Memory Usage 1,859KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete