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 Username Widget BB code (https://vborg.vbsupport.ru/showthread.php?t=236712)

nitra1000 02-22-2010 10:00 PM

Twitter Username 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 (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:
Code:

<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. 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)

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

Quote:

Originally Posted by ndut (Post 1998168)
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

1 Attachment(s)
Quote:

Originally Posted by ndut (Post 1998168)
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?

Quote:

Originally Posted by nitra1000 (Post 1999080)
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).

Quote:

Originally Posted by ndut (Post 2006842)
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 :\


All times are GMT. The time now is 06:16 PM.

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.01104 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)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