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)
-   -   Profile Enhancements - Twitter Updates in Members Profile (https://vborg.vbsupport.ru/showthread.php?t=265541)

ewebdesigner 01-03-2012 04:41 PM

I don't understand what I did wrong because it only shows:
Quote:

twitter

Recent Updates:


You can follow me on Twitter, my username is (LINK TO TWITTER)
what I did:
Quote:

1. Go to https://dev.twitter.com/apps/new
2. Fill out the app details, how to fill it out:
Application Name - Your Website Name
Description - Something relevant to your site
Application Website - Your Forum URL
Callback URL - Your Forum URL
Application Type - Read and Write
did

Quote:

Add a Single-Line Text Box via the User Profile Field Manager and give it a title and a description so users know what it is for.
Set the Maximum length and Field length to your liking
Field Required: NO
Field Editable by User: YES
Private Field: NO
Field Searchable on Members List: NO
Show on Members List: NO
Regular Expression: Leave Blank
did:

Quote:

Twitter Updates in Member Profile (with CSS)

Follow steps 1, 2, 3 and 4 above.

5. Open headinclude and add the following to the end
Code:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="twitter/jquery.twitter.js"></script>
<script src="http://platform.twitter.com/anywhere.js?id=consumer_key&amp;v=1">
</script>
<script type="text/javascript">
twttr.anywhere(function(twitter) {
twitter.hovercards({ expanded: true });
});
</script>
<link rel="stylesheet" type="text/css" href="twitter/twitter.css"/>

Replace consumer_key with the key you noted from step 2. Save

6. As above

You can alter the dimensions and colours of the Twitter Feed Box in the twitter/twitter.css file

did:

Quote:

With
Code:

<img src="clear.gif" height="10" /><br />
<vb:if condition="$userinfo[fieldXX]">
<div class="blocksubhead subsectionhead userprof_headers userprof_headers_border" >
<h4 id="view-statistics" class="subsectionhead-understate" style="width:100%">Twitter</h4><br />
</div>
<div class="blockbody subsection userprof_content userprof_content_border">
<h5 class="subblocksubhead subsubsectionhead"><u>Recent Updates:</u></h5>
<div id="twitter_div">
<ul id="twitter_update_list"></ul></div>
<script type="text/javascript" src="twitter/blogger.js"></script>
<script text="text/javascript" src="http://twitter.com/statuses/user_timeline/{vb:raw userinfo.fieldXX}.json?callback=twitterCallback2&c ount=5"></script>
<br><dt class="smallfont">You can follow me on Twitter, my username is <a class="twitter-anywhere-user" href="http://twitter.com/{vb:raw userinfo.fieldXX}">{vb:raw userinfo.fieldXX}</a></dt>
</div></div>
</vb:if>

Remember change the 3 instances of XX to correspond with the profile field number.

I replaced xx with 5 because it was 5 for me. Added my consumer key as well.

For the consumer key, was I suppose to replace the 1 with the code?

<script src="http://platform.twitter.com/anywhere.js?id=consumer_key&amp;v=1">
</script>

I did the CSS and 1.0.3 CSS part, is that what I was suppose to do?

in step 5 for 1.0.3 CSS, it says

5. Open memberinfo_block_statistics

It is asking me to replace something with another code, but I can't even find the first code that you told me to replace so I just copied the With code and put it at the end of memeberinfo_block_Statistics

Gemma 01-03-2012 08:12 PM

Quote:

I replaced xx with 5 because it was 5 for me. Added my consumer key as well.
Did you replace all the XX's with 5? (there are 3 of them)

Quote:

For the consumer key, was I suppose to replace the 1 with the code?
Code:

<script src="http://platform.twitter.com/anywhere.js?id=consumer_key&amp;v=1">
  </script>

No, replace consumer_key with the 21 key consumer code

Quote:

5. Open memberinfo_block_statistics

It is asking me to replace something with another code, but I can't even find the first code that you told me to replace so I just copied the With code and put it at the end of memeberinfo_block_Statistics
Place this code above <!-- view-statistics --> in your memberinfo_block_statistics template

Code:

<img src="clear.gif" height="10" /><br />
<vb:if condition="$userinfo[fieldXX]">
<div class="blocksubhead subsectionhead userprof_headers userprof_headers_border" >
<h4 id="view-statistics" class="subsectionhead-understate"  style="width:100%">Twitter</h4><br />
</div>
<div class="blockbody subsection userprof_content userprof_content_border">
<h5 class="subblocksubhead subsubsectionhead"><u>Recent Updates:</u></h5>
<div id="twitter_div">
<ul id="twitter_update_list"></ul></div>
<script type="text/javascript" src="twitter/blogger.js"></script>
<script text="text/javascript" src="http://twitter.com/statuses/user_timeline/{vb:raw userinfo.fieldXX}.json?callback=twitterCallback2&count=5"></script>
<br><dt class="smallfont">You can follow me on Twitter, my username is <a class="twitter-anywhere-user" href="http://twitter.com/{vb:raw userinfo.fieldXX}">{vb:raw userinfo.fieldXX}</a></dt>
</div></div>
</vb:if>

Remember and replace the XX (3 times)

ewebdesigner 01-03-2012 09:29 PM

Quote:

Originally Posted by Gemma (Post 2283485)
Did you replace all the XX's with 5? (there are 3 of them)

Code:

<script src="http://platform.twitter.com/anywhere.js?id=consumer_key&amp;v=1">
  </script>

No, replace consumer_key with the 21 key consumer code

Place this code above <!-- view-statistics --> in your memberinfo_block_statistics template

Code:

<img src="clear.gif" height="10" /><br />
<vb:if condition="$userinfo[fieldXX]">
<div class="blocksubhead subsectionhead userprof_headers userprof_headers_border" >
<h4 id="view-statistics" class="subsectionhead-understate"  style="width:100%">Twitter</h4><br />
</div>
<div class="blockbody subsection userprof_content userprof_content_border">
<h5 class="subblocksubhead subsubsectionhead"><u>Recent Updates:</u></h5>
<div id="twitter_div">
<ul id="twitter_update_list"></ul></div>
<script type="text/javascript" src="twitter/blogger.js"></script>
<script text="text/javascript" src="http://twitter.com/statuses/user_timeline/{vb:raw userinfo.fieldXX}.json?callback=twitterCallback2&count=5"></script>
<br><dt class="smallfont">You can follow me on Twitter, my username is <a class="twitter-anywhere-user" href="http://twitter.com/{vb:raw userinfo.fieldXX}">{vb:raw userinfo.fieldXX}</a></dt>
</div></div>
</vb:if>

Remember and replace the XX (3 times)



Yup I replaced all 3 XX with the number 5. I am not sure if there has to be a space between field and the number 5. But I put no space.

I believe the memberinfo is correct, but not sure about the headinclude.

This is what I put in the headinclude:

Quote:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="twitter/jquery.twitter.js"></script>
<script src="http://platform.twitter.com/anywhere.js?id=CODE GOES HERE&amp;v=1">
</script>
<script type="text/javascript">
twttr.anywhere(function(twitter) {
twitter.hovercards({ expanded: true });
});
</script>
<link rel="stylesheet" type="text/css" href="twitter/twitter.css"/>



But I added the code where it says "CODE GOES HERE"
I put the code at the very end

Gemma 01-03-2012 10:20 PM

Can you link me to the site where you are trying to use it?

Gemma 02-07-2012 11:16 PM

I've removed the non-CSS version and merged all the other edits together (hovercards and tweetbox) to make one version.

tortuga2 02-09-2012 12:51 AM

thx works great

Gemma 03-02-2012 11:21 PM

1 Attachment(s)
Working on an updated version of this :)

ProFifaLeagues 03-03-2012 06:08 AM

Quote:

Originally Posted by Gemma (Post 2305518)
Working on an updated version of this :)


Great news Gemma,Cant wait for the update

Emeralda 03-04-2012 10:59 PM

PHP Code:

  <script type="text/javascript">
     
twttr.anywhere(function(twitter) {
     
twitter.hovercards({ expandedtrue });
});
  
twttr.anywhere(function (twitter) {
  
twitter("#tbox").tweetBox({
  
counttrue,
  
height100,
  
width400,
  
label"Send a tweet",
      });
  });
        </
script

This has an unintended bug I think, it conflicts hard with DBTech's user tagging/mentions. Whenever I mentioned someone, instead of actually mentioning the member in a thread, it was trying to show a Twitter account with a similar name.

Gemma 03-04-2012 11:48 PM

Quote:

Originally Posted by Emeralda (Post 2306235)
PHP Code:

  <script type="text/javascript">
     
twttr.anywhere(function(twitter) {
     
twitter.hovercards({ expandedtrue });
});
  
twttr.anywhere(function (twitter) {
  
twitter("#tbox").tweetBox({
  
counttrue,
  
height100,
  
width400,
  
label"Send a tweet",
      });
  });
        </
script

This has an unintended bug I think, it conflicts hard with DBTech's user tagging/mentions. Whenever I mentioned someone, instead of actually mentioning the member in a thread, it was trying to show a Twitter account with a similar name.

If they are both using the @ function, then there could be a conflict. Hmmm, DBTech vs Twitter. That would be an amazing court case. Don't you think?

Um, my mind was a wandering. Sorry nothing I can do about the conflict in mods.


All times are GMT. The time now is 08:10 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.01281 seconds
  • Memory Usage 1,783KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete