PDA

View Full Version : Mini Mods - Twitter Username 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) (last post)

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: twitterUsername
BB Code Tag Name: @me
Replacement:
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 30,
interval: 4000,
width: 'auto',
height: 100,
theme: {
shell: {
background: '#382f57',
color: '#ffffff'
},
tweets: {
background: '#ffffff',
color: '#000000',
links: '#0013e8'
}
},
features: {
scrollbar: true,
loop: true,
live: true,
hashtags: true,
timestamp: true,
avatars: false,
behavior: 'default'
}
}).render().setUser('{param}').start();
</script>

Example: [@me]leicestertalk[/@me]
Description: Shows a twitter profile widget for the selected user.
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

Thats It Folks..
If you wish to use searches instead of username, please check out my other mod (https://vborg.vbsupport.ru/showthread.php?p=1989873#post1989873). 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)

valerieu
02-24-2010, 01:15 AM
I've just installed it and now looking at your icons......trying to find little one.

valerieu
02-24-2010, 01:29 AM
WoW, that is really cool!

I am just wondering if there is a way it could be a widget that would display in the sidebar and on the blogs?

I tested it in the posting and it works great...would be cool if it would go on the sidebar column and in blogs.

Thank you very much.

nitra1000
02-24-2010, 04:18 PM
It can go where ever you can put BB code (using the syntax [@me]username[/@me] so your users can use it in blog posts/custom pages/custom side bar).

It can also be used anywhere you can use HTML. Create a new "custom PHP/HTML" in your forum block for example, pasting in the replacement code (changing {param} for your username).

alvin_mx
03-05-2010, 09:48 PM
nice job! installed!

ndut
03-06-2010, 01:18 AM
cool...

ndut
03-06-2010, 01:58 AM
after i put this code ... why not directly show in posts?
i have to click thread that i've put this code 1st, to display it?

nitra1000
03-07-2010, 01:17 PM
after i put this code ... why not directly show in posts?
i have to click thread that i've put this code 1st, to display it?

I'm not sure what you mean?

But if you mean it doesn't show in the editor, this is down to limitations in VB (and my knowledge of modding it).

ndut
03-20-2010, 01:09 AM
after i post the twitter code, doesnt show in forum.
so i have to view the post with twitter code by : clicking the thread again?

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

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

stoute
05-22-2010, 11:59 PM
this works great. not quite what i expected it to be but it works well.

BirdOPrey5
09-19-2010, 11:25 AM
after i put this code ... why not directly show in posts?
i have to click thread that i've put this code 1st, to display it?

I'm not sure what you mean?

But if you mean it doesn't show in the editor, this is down to limitations in VB (and my knowledge of modding it).

after i post the twitter code, doesnt show in forum.
so i have to view the post with twitter code by : clicking the thread again?

It doesn't show immediately because as you can see it's JavaScript based. JavaScripts are loaded when the page loads... when you add a new post the page doesn't re-load it just gets added via AJAX so you will need to reload the page to see it... this isn't a big deal since anyone else viewing the page will had to have reloaded it before seeing this. All JavaScript based BB Codes have the same limitation.

That said, looks good... tagged for now. :cool:

Here is a 20x20 icon for this:

ku-med
01-15-2014, 03:42 PM
Unfortunately, it doesn't work on 4.2.1 :\