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)

is_it_me 02-09-2010 08:52 AM

This looks like what I was looking for; once I get vB 4.02 installed I am going to get my techie helper to install this ? being a numpty myself! :D

thisgeek 02-09-2010 09:39 AM

Quote:

Originally Posted by tenjinzan (Post 1972143)
Is there a way to include the Poster's name in the tweet? I'm not sure what the syntax would be for the tweet line.

Basically, I just want it to say "Thread name" by "Poster" ... bit.ly/url I can see WHERE to put it, but I'm not sure of the variable that refers to the poster of a thread.

Quote:

Originally Posted by thisgeek (Post 1975213)
I'd also like to do this - just not sure what variable to use (if it's available).

Just bumping this. Got my users after me to add the poster to the tweets, but I have no idea what variables are available to the plugin.

Is this possible with the plugin as it is right now?

TyPenn613 02-09-2010 05:17 PM

I looked briefly and didn't see anything related to this. I'm getting the following error:

Parse error: syntax error, unexpected $end in /home/sboards/public_html/forums/newthread.php(262) : eval()'d code on line 27

Bob_R 02-09-2010 05:20 PM

Looks like I'll be installing this. Too bad there's not a vBulletin to Facebook as well.

redhawk89 02-09-2010 05:38 PM

not working with vbseo

Bob_R 02-09-2010 06:16 PM

Quote:

Originally Posted by redhawk89 (Post 1978455)
not working with vbseo

I guess I won't be installing it afterall. :(

kall 02-09-2010 07:27 PM

Quote:

Originally Posted by redhawk89 (Post 1978455)
not working with vbseo

Yes it is.

http://www.twitter.com/nzboards

Boosted Panda 02-09-2010 08:07 PM

Im getting a Parse error, syntax error, unexpected T_Variable in ****newthread.php(262) eval()"d code on line 6

boromir86 02-10-2010 07:02 AM

Quote:

Originally Posted by Boosted Panda (Post 1978603)
Im getting a Parse error, syntax error, unexpected T_Variable in ****newthread.php(262) eval()"d code on line 6

I have the same problem. I guess it's because our forums are not in root folder...

wolfyman 02-10-2010 05:43 PM

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

My url is being tweeted as

mysite.com/forums/showthread.php?t=

I am using custom url in vb 4.0.1, so my thread SHOULD look like:

mysite.com/forums/showthread.php?9833-test-tweet-thread-3

bit.ly seems to be working.. what do I do?

Bob_R 02-10-2010 06:55 PM

Curiousity question:

Any reason to have this hack and Tweetboard?

Lore Master 02-10-2010 10:03 PM

Very good mod. Works quickly. I made one thread for testing, and two seconds later 14 guests were reading it. SEO indeed!

wolfyman 02-11-2010 01:35 AM

checked out tweetboard tonight - very cool, if you're into that type of thing.

Boosted Panda 02-11-2010 01:40 AM

Quote:

Originally Posted by boromir86 (Post 1978924)
I have the same problem. I guess it's because our forums are not in root folder...

Id like to see if there is a fix though

Florida13 02-11-2010 01:53 AM

i think someone installed this on mine, but it doesnt tweet for like 5 minutes or so right?

wolfyman 02-11-2010 10:18 AM

Quote:

Originally Posted by Florida13 (Post 1979658)
i think someone installed this on mine, but it doesnt tweet for like 5 minutes or so right?

mine tweets the instant the thread is posted, it's just not linking the correct thread.

thisgeek 02-11-2010 12:03 PM

Quote:

Originally Posted by thisgeek (Post 1978161)
Just bumping this. Got my users after me to add the poster to the tweets, but I have no idea what variables are available to the plugin.

Is this possible with the plugin as it is right now?

Nevermind, figured out what variable to use:

Change the line:
PHP Code:

$tweet .= $newpost['title'].' '.$shortUrl

to
PHP Code:

$tweet .= $newpost['title'].' by '.$vbulletin->userinfo['username'].' '.$shortUrl

Simple enough.

Videx 02-11-2010 12:34 PM

Quote:

Simple enough.
Sure, for those that have bitly working (not me).

wolfyman 02-11-2010 05:59 PM

anyone understand this better than I do? Why are my tweets coming up with no thread id?

Tweets link to:

mysite.com/forums/showthread.php?t=(NOTHING-HERE!!!!)

SHOULD link to:

mysite.com/forums/showthread.php?9833-test-tweet-thread-3

mabersoft 02-11-2010 06:05 PM

Any one seen any Boosts in there forum with this? like traffic etc.

sqzdog 02-11-2010 07:02 PM

I would like to know if this thing will tweet new posts INSTEAD of new threads......

Bob_R 02-11-2010 08:02 PM

I'm sorry I don't understand. I wish to have this but where do I put the aforementioned PHP code?

In bitly.php or twitter.php or elsewhere?

Bob_R 02-11-2010 08:52 PM

I actually figured out my post above.

New question: I don't get this

The shortUrl line might look like this:
$shortUrl = 'http://www.vbulletin.com/forum/showthread.php?t='.$newpost[threadid];

How do I know what to put?

Bob_R 02-12-2010 02:02 AM

My forums are not in my forum root folder. How do I proceed?

This is my error:

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

Fatal error: require_once() [function.require]: Failed opening required 'bitly.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/dumontnjforum.com/forums/newthread.php(262) : eval()'d code on line 12


And here's my PHP:

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(20);

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

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

    if (
$useBitly) {
      
// http://classes.verkoyen.eu/bitly
      
require_once 'bitly.php';
      
$bitly = new Bitly('bitly username''bitly API KEY');
$shortUrl $bitly->shorten('http://www.dumontnjforum.com/forums/showthread.php?t='.$newpost[threadid]);

    }

    
$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('twitter username''twitter password');
    
$twitter->updateStatus($tweet);


Can someone please give me a hand?

Bob_R 02-12-2010 02:29 AM

Actually I'm getting closer. This is what I got now. How do I fix this?
PHP code is in post above this one.

You must be authenticated to access shorten on line 193 in /home/xxxxxxx/public_html/dumontnjforum.com/forums/bitly.php
#0 /home/xxxxxxx/public_html/dumontnjforum.com/forums/bitly.php(382): Bitly->doCall('shorten', Array)
#1 /home/xxxxxxx/public_html/dumontnjforum.com/forums/newthread.php(262) : eval()'d code(14): Bitly->shorten('http://www.dumo...')
#2 /home/xxxxxxx/public_html/dumontnjforum.com/forums/newthread.php(262): eval()
#3 /home/xxxxxxx/public_html/dumontnjforum.com/forums/vbseo.php(1804): require('/home/bobbyrag/...')
#4 {main}

Warning: Invalid error type specified in [path]/vb/vb.php on line 284

Videx 02-12-2010 02:40 AM

Hey, if you get bit.ly working, let me know how!

{offtopic}
But an off topic comment from another community forum admin: You've got way too much junk on that forum. A custom theme, vbseo, even a gd arcade! All three of these by themselves can wreak havoc on vb. Not that long time admins haven't gotten them all working together (well, not in vb4 yet), but how many in your community do you really expect to hang out to play in the arcade? Are you making a forum for kids? Asking for trouble, especially if you're on a shared server.
{/offtopic}

Bob_R 02-12-2010 10:39 AM

Thanks for answering w/o an answer. :confused: Duly noted but not taken seriously because as per another community forum admin you're a shit-stirrer.

Now. Is there an answer in our future? :)

TrailRecon 02-12-2010 11:01 AM

Thanks for this mod. Easy install and workin perfectly!

My site
http://www.trail-recon.com/vforum/forum.php

The auto twitter updates
https://twitter.com/TrailRecon

thanks again!

kall 02-12-2010 01:26 PM

Quote:

Originally Posted by Bob_R (Post 1980686)
Thanks for answering w/o an answer. :confused: Duly noted but not taken seriously because as per another community forum admin you're a shit-stirrer.

Now. Is there an answer in our future? :)

Hey Bob,

Are you 100% certain that your bit.ly credentials are correct?

I thought mine were, but bit.ly for some reason carries a space with the key when you copy/paste it into the box.

(If you want, fire me a PM with your full plugin code, I won't share it with anyone, and might be able to figure it out.)

Bob_R 02-12-2010 01:58 PM

Quote:

Originally Posted by kall (Post 1980773)
Hey Bob,

Are you 100% certain that your bit.ly credentials are correct?

I thought mine were, but bit.ly for some reason carries a space with the key when you copy/paste it into the box.

(If you want, fire me a PM with your full plugin code, I won't share it with anyone, and might be able to figure it out.)

Thanks so much bro. You actually gave me an idea/something to look out for and now it works perfectly. :up:

Again, thanks for taking the time to answer. :)

wolfyman 02-12-2010 02:14 PM

is the space supposed to be there or not?

wolfyman 02-12-2010 02:14 PM

Quote:

Originally Posted by Bob_R (Post 1980802)
Thanks so much bro. You actually gave me an idea/something to look out for and now it works perfectly. :up:

Again, thanks for taking the time to answer. :)

what was it?

Bob_R 02-12-2010 03:35 PM

Quote:

Originally Posted by wolfyman (Post 1980810)
what was it?

Check your API key very closely.

kall 02-12-2010 04:14 PM

Quote:

Originally Posted by wolfyman (Post 1980809)
is the space supposed to be there or not?

No.

TyPenn613 02-12-2010 05:23 PM

Anyone have any clue why I would get this error?

Parse error: syntax error, unexpected $end in /home/sboards/public_html/forums/newthread.php(262) : eval()'d code on line 27

wolfyman 02-12-2010 06:05 PM

Quote:

Originally Posted by Bob_R (Post 1980862)
Check your API key very closely.

Quote:

Originally Posted by kall (Post 1980882)
No.

meh. No help here, but thanks. I've tried it with the API key and without, I'm just not getting the thread id in my urls.

Boosted Panda 02-12-2010 07:16 PM

Quote:

Originally Posted by TyPenn613 (Post 1980929)
Anyone have any clue why I would get this error?

Parse error: syntax error, unexpected $end in /home/sboards/public_html/forums/newthread.php(262) : eval()'d code on line 27

im getting the same error just a different line of code.

kefallon 02-13-2010 04:57 AM

Anyone got a fix for an error message like this yet???

Double checked my twitter deatils at bitly and in PHP code all correct still getting following error message.

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}

Videx 02-13-2010 08:46 AM

Maybe what we need to track down these auth errors is some breakpoints in the code. Switch 'debug' mode on, and instead of submitting the code to Twitter and bitly, the app just emails us the results, or prints it out or something.

Majora 02-13-2010 01:39 PM

Your hack https://vborg.vbsupport.ru/showthrea...hlight=twitter has problems with vowel letters ?, ?, ?
This will not display correctly for me:
http://twitter.com/feuerwehr_alarm
How can I fix this problem?


All times are GMT. The time now is 12:40 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.03072 seconds
  • Memory Usage 1,846KB
  • 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
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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