vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Twitter Search Widget BB code (https://vborg.vbsupport.ru/showthread.php?t=236711)

nitra1000 02-22-2010 10:00 PM

Twitter Search Widget BB code
 
1 Attachment(s)
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

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:
Code:

<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: [tweet]leicestertalk[/tweet]
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:
Code:

<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: [tweet=Leicester]leicestertalk[/tweet]
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 . You can change height/width/colors of the mod as required (pretty obvious how)

As ever PayPal donations excepted... As are follows @leicestertalk and the odd post on my forums

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

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 [tweet]searchterm[/tweet]
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:

Quote:

Originally Posted by caciocode (Post 2081121)
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

1 Attachment(s)
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

Quote:

Originally Posted by OldSchoolDSL (Post 2145754)
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?


All times are GMT. The time now is 01:47 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.01078 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete