vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - Twitter Widget - Thread topics addin (https://vborg.vbsupport.ru/showthread.php?t=239595)

ericgtr 03-31-2010 09:00 PM

Twitter Widget - Thread topics addin
 
1 Attachment(s)
What this simple modification does is add a Twitter search feed to any thread that automatically searches for the thread title and displays it under the reply box. See here for example http://www.politicalgroove.com/showt...light-New-Moon the thread title is Twilight New Moon and at the bottom of the thread you get a Twitter feed searching just that topic.

In the SHOWTHREAD template find:
Code:

{vb:raw similarthreads}
Add this above it:
Code:

        <!-- Twiiter Comments -->
                <h4 class="threadinfohead"><span class="optiontitle">Twiiter</span></h4>
        <div id="thread_tags_list" class="thread_info_block">
                <div class="inner_block">
                        <div id='tag_list_cell'>
      <script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
  version: 2,
  type: 'search',
  search: '{vb:raw thread.title}',
  interval: 6000,
  title: 'Topic trending...',
  subject: '{vb:raw thread.title}',
  width: 'auto',
  height: 300,
  theme: {
    shell: {
      background: '#104963',
      color: '#ffffff'
    },
    tweets: {
      background: '#ffffff',
      color: '#444444',
      links: '#1985b5'
    }
  },
  features: {
    scrollbar: false,
    loop: true,
    live: true,
    hashtags: true,
    timestamp: true,
    avatars: true,
    behavior: 'default'
  }
}).render().start();
</script>
                        </div>
                </div>
        </div>
        <!-- /Twiiter Comments -->

Additionally, you can go here to customize the look and layout of the twitter widget http://twitter.com/goodies/widget_search However, if you do this make not of the bolded items above, those are the variables that hold pass the thread title into the search.

ericgtr 04-02-2010 02:18 PM

1 Attachment(s)
Unable to edit the mod because the site is having issues, so attempting to add the screenshot and link to the demo (scroll to the bottom) here instead.


All times are GMT. The time now is 01:15 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.01789 seconds
  • Memory Usage 1,715KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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