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)

Nordinho 01-27-2010 07:28 PM

Quote:

Originally Posted by buro9 (Post 1968257)
@Nordinho

It appears to be a PHP cURL thing.

Could you try inserting this at line 136 (just after the CURL options) in bitly.php
PHP Code:

         $no_hack_needed = (ini_get('safe_mode') !== '1' && ini_get('open_basedir') === false);
        if (
$no_hack_needed) {
            
$curl_opts[CURLOPT_FOLLOWLOCATION] = true;
        } else {
            
$curl_opts[CURLOPT_FOLLOWLOCATION] = false;
            
$curl_opts[CURLOPT_HEADER] = true;
        } 

IF twitter.php also needs it, then it's line 161 of that (after the options) where it will need to be inserted.

Try just putting it in bitly.php to start with and let me know how it goes.

Hey buro,

Tried adding it in both files, unfortunately it doesn't make a difference though. Getting the same error.

buro9 01-27-2010 07:33 PM

Quote:

Originally Posted by Nordinho (Post 1968286)
Hey buro,

Tried adding it in both files, unfortunately it doesn't make a difference though. Getting the same error.

My fault... it should've been this for bitly.php:

PHP Code:

$no_hack_needed = (ini_get('safe_mode') !== '1' && ini_get('open_basedir') === false);
if (
$no_hack_needed) {
  
$options[CURLOPT_FOLLOWLOCATION] = true;
} else {
  
$options[CURLOPT_FOLLOWLOCATION] = false;
  
$options[CURLOPT_HEADER] = true;



wacnstac 01-27-2010 07:36 PM

Why not just grab the RSS out from the forum in twitter and feed it to your twitter account with twitterfeed? Am I missing something?

buro9 01-27-2010 07:39 PM

Quote:

Originally Posted by wacnstac (Post 1968295)
Why not just grab the RSS out from the forum in twitter and feed it to your twitter account with twitterfeed? Am I missing something?

The live aspect of it.

wacnstac 01-27-2010 07:42 PM

Ah, I get it now :)

esperone 01-27-2010 07:42 PM

I get same error as LbR and i have edited the php code to include my bit.ly username and API key as well as my twitter details.

buro9 01-27-2010 07:45 PM

Quote:

Originally Posted by esperone (Post 1968306)
I get same error as LbR and i have edited the php code to include my bit.ly username and API key as well as my twitter details.

LbR PM'd me... he'd put the username between the < >.

I've just updated the hack instructions to show examples... the details you enter are just PHP strings and should be single-quoted.

esperone 01-27-2010 07:48 PM

oh i see. Thanks.

Nordinho 01-27-2010 07:49 PM

Quote:

Originally Posted by buro9 (Post 1968292)
My fault... it should've been this for bitly.php:

PHP Code:

$no_hack_needed = (ini_get('safe_mode') !== '1' && ini_get('open_basedir') === false);
if (
$no_hack_needed) {
  
$options[CURLOPT_FOLLOWLOCATION] = true;
} else {
  
$options[CURLOPT_FOLLOWLOCATION] = false;
  
$options[CURLOPT_HEADER] = true;



Allrighty, the curl error is gone. Now on to the next one ;)

This one remains:
Quote:

Fatal error: Uncaught exception 'BitlyException' with message 'Invalid JSON-response' in /home/domain.net/public_html/forumdir/bitly.php:204 Stack trace: #0 /home/domain.net/public_html/forumdir/bitly.php(390): Bitly->doCall('shorten', Array) #1 /home/domain.net/public_html/forumdir/newthread.php(273) : eval()'d code(20): Bitly->shorten('http://www.nord...') #2/home/domain.net/public_html/forumdir/newthread.php(273): eval() #3 /home/domain.net/public_html/forumdir/vbseo.php(1440): require('/home/dom...') #4 {main} thrown in /home/domain.net/public_html/forumdir/bitly.php on line 204

LbR 01-27-2010 07:52 PM

The OP me helped me working it out :) thanks man works with charm now


All times are GMT. The time now is 05:56 PM.

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.01319 seconds
  • Memory Usage 1,753KB
  • 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
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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