PDA

View Full Version : Mini Mods - Twitter Search Widget BB code


nitra1000
02-22-2010, 10:00 PM
Hi all, this little bit of code, will allow your members to use twitter widgets on your site...

As seen At my Leicester Talk Forum (http://leicestertalk.net/comments-suggestions/7782-testing-tweets.html)

Theres no products to upload, or templates to edit.. Just follow these steps.

Creating the basic Widget
Go To "Admin CP --> Custom BB Codes --> Add New BB Code"

Enter the following...

Title: twitter
BB Code Tag Name: tweet
Replacement:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: '{param}',
interval: 6000,
title: '',
subject: 'Tweets',
width: 'auto',
height: 100,
theme: {
shell: {
background: '#8ec1da',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: true,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
behavior: 'default'
}
}).render().start();
</script>

Example: leicestertalk
Description: This will insert a twitter widget onto the post, you can use hashtags and searches.
Use {option}: No
Button Image (Optional): whatever 20x20 image you want, I've dropped a few links at the bottom and I'm sure someone will post one...
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: Yes

To create one with editable titles
Go To "Admin CP --> Custom BB Codes --> Add New BB Code"

Enter the following...

Title: twitter2
BB Code Tag Name: tweet
Replacement:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'search',
search: '{param}',
interval: 6000,
title: '',
subject: '{option}',
width: 'auto',
height: 100,
theme: {
shell: {
background: '#8ec1da',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#444444',
links: '#1985b5'
}
},
features: {
scrollbar: true,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: true,
behavior: 'default'
}
}).render().start();
</script>

Example: leicestertalk
Description: This will insert a twitter widget onto the post, you can use hashtags and searches.
Use {option}: Yes
Remove Tag If Empty: Yes
Disable BB Code Within This BB Code: Yes
Disable Smilies Within This BB Code: Yes
Disable Word Wrapping Within This BB Code: Yes

Thats It Folks..
If you wish to use usernames instead of searches, please check out my other mod (https://vborg.vbsupport.ru/showthread.php?t=236712). You can change height/width/colors of the mod as required (pretty obvious how)

As ever PayPal donations excepted... As are follows @leicestertalk (http://twitter.com/leicestertalk) and the odd post on my forums (http://leicestertalk.net)

But i'd prefer a donation, because that means mooo monies :p

Twitter Icons (http://www.webdesignerdepot.com/2009/07/50-free-and-exclusive-twitter-icons/)

p.s I have only briefly tested this... So no responsibility if you don't stage your installs... (dev > test > live)

sqzdog
02-23-2010, 08:11 PM
So, can the user click anywhere in that widget to take them to the post on my vbulletin site?

sqzdog
02-23-2010, 08:34 PM
I guess what I mean is, I could use this to show all of the recent posts on my site. Is there anywhere for them to click to take them to the individual posts listed in this widget? This is a nice widget.

nitra1000
02-23-2010, 09:15 PM
The widget is twitters own, your users can post it on your site...

Say to keep up with an event, or for a discussion on a subject thats very active on twitter.

It treats the tweets as if they were on twitter themselfs.. I.E click a #hashtag and it will take you to that, click an avatar and it will take them to the user... etc.

Best advice I can give is try it out... see if it works the way you want it. If it doesn't it's a good way to learn about BB code anyway (the google maps mod posted a month or so, taught me how to make this)

hoadiem
04-24-2010, 03:59 PM
does it work with vb 4.0.3

nitra1000
04-25-2010, 06:56 PM
yes

caciocode
08-09-2010, 01:44 AM
I don't see how this is useful... :)

bposner
10-25-2010, 03:31 PM
SOLVED mmm looks nice, but can't get it to work, I've added bb code before, but this is on a new system so maybe a setting is out of whack. I followed your suggestions above (very straighforward) but all a get is the forum with the actual bb code listed, i.e searchterm
Using 4.07
Thanks!!

Edit: Nevermind, my fault (usually is) had Option to yes

Nice

Brandon Sheley
10-25-2010, 03:34 PM
I like it, I'm going to test it out right now on our forum

thanks for the mod and thanks for sharing. :up:

I don't see how this is useful... :)

Very useful post there ;) :down:

works on 4.0.8 :)

http://general-forums.com/t83971/

OldSchoolDSL
01-08-2011, 01:43 AM
Installed & Working

4.1 PL2

Comment: Added my own twitter button to which others are free to use here or else where. (open sourced)

COL NIL SATIS
01-08-2011, 01:59 PM
Installed & Working

4.1 PL2

Comment: Added my own twitter button to which others are free to use here or else where. (open sourced)

Thanks :up:

COL NIL SATIS
01-08-2011, 02:25 PM
spot on ,this is working well on 4.0.6..cheers

Kingdombuilder
03-09-2011, 06:47 AM
This is awesome!! Great mod... I do have a request. Is it possible for someone to make this script refresh after so x amount of time?