The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Tweet button for every post?
Has anyone done a simple plugin or mod to add a tweet button for every post? Basically a button that open a new window so user's can tweet that post's URL and tread title from their own twitter account.
I need something that works with VB3.8 I don't want to start from scratch if this is already available. Thanks, James |
#2
|
|||
|
|||
<a href="https://vborg.vbsupport.ru/showthread.php?t=248568" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=248568</a> came up in similar threads, this is dated back to 2012 so can imagine it is out of date, but using the correct twitter URL/if conditions can imagine this is easily done.
|
Благодарность от: | ||
blind-eddie |
#3
|
|||
|
|||
Thanks. That's a good start, however Twitter has changed their API so now I need to make some adjustments.
I guess fist I need to find a plugin location where I can grab the thread title and post URL and make these two variables URL encoded. Then I can form a valid URL to link to create a Twitter Tweet Web Intent link to place in the postbit template. Any suggestions for the best place to create these two URL encoded variables? |
Благодарность от: | ||
greigeh |
#4
|
|||
|
|||
Ok so this is what I got...
Code:
<a href="https://twitter.com/share?url=$vboptions[bburl]/showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]&text=$thread[title]" target="_blank">Tweet</a> Add anywhere in postbit/postbit_legacy template should work. Breakdown The single post page link: Code:
$vboptions[bburl]/showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount] Code:
$thread[title] Code:
target="_blank" |
Благодарность от: | ||
greigeh |
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
No the above code is for individual posts, for a single link to showthread page you would need something like this:
Code:
<a href="https://twitter.com/share?url=$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]&text=$thread[title]" target="_blank">Tweet</a> Code:
<if condition="THIS_SCRIPT == 'SHOWTHREAD'"> <a href="https://twitter.com/share?url=$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]&text=$thread[title]" target="_blank">Tweet</a> </if> Update: Just re-read you post and sounds more like you just want a basic tweet button this would be done using: Code:
<a href="https://twitter.com/share?url=$vboptions[bburl]/&text=$vboptions[bbtitle]" target="_blank">Tweet</a> |
Благодарность от: | ||
blind-eddie |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|