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)

Gemma 12-20-2011 05:18 PM

Quote:

Originally Posted by Bluefin221 (Post 2279468)
Gemma -

Everything works perfectly when using the basic version.

On the with CSS version it shows up like the basic version so you cannot see any recent updates on the profile.

I'm using CSS version check here: http://www.fpcforums.com/forums/members/1-FPC-Admin

I tried messing around with the code but got no where fast so put it back to the way you had it using CSS version. Do you have any ideas?

Checking your source code it doesn't look like the callback is set; firstly did you follow all the action is step 2 of the instructions? And did you change this part of the code to match up to your twitter profilefield#

Code:

<script text="text/javascript" src="http://twitter.com/statuses/user_timeline/{vb:raw userinfo.fieldXX}.json?callback=twitterCallback2&count=5"></script>
I've just checked your Twitter username on my own site and it is working so I think you may have missed a step somewhere.

Bluefin221 12-20-2011 06:07 PM

Quote:

Originally Posted by Gemma (Post 2279480)
Checking your source code it doesn't look like the callback is set; firstly did you follow all the action is step 2 of the instructions? And did you change this part of the code to match up to your twitter profilefield#

Code:

<script text="text/javascript" src="http://twitter.com/statuses/user_timeline/{vb:raw userinfo.fieldXX}.json?callback=twitterCallback2&count=5"></script>
I've just checked your Twitter username on my own site and it is working so I think you may have missed a step somewhere.

I missed the first field ID, because I edited the file 3/4 times must have rushed it the last time as the other two fields were completely properly.

Also I have to put read/write and access on the app for it to work correctly, but confirmed working perfectly on 4.1.8

LuDawgs 12-22-2011 03:38 AM

So close. I'm running 4.1.7 but unfortunately my members most recent tweets are not appearing in their section. Everything else looks good. I've read through this section end to end.

Gemma 12-22-2011 12:12 PM

Quote:

Originally Posted by LuDawgs (Post 2279955)
but unfortunately my members most recent tweets are not appearing in their section

I'll assume no tweets are showing, not just recent tweets?

Please make sure you have correctly setup steps 1 & 2

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

Agree to the rules, recaptcha and create your application. You will then be taken to your application details. Take note of your consumer key (21 alphanumerical characters)
The Application must be set to Read and Write.

Also make sure you have added you profilefield numbers into the template where required.

LuDawgs 12-22-2011 01:02 PM

Yep, did all of those things and checked them several times...not sure what I'm missing. :(

Gemma 12-22-2011 01:20 PM

Quote:

Originally Posted by LuDawgs (Post 2280067)
Yep, did all of those things and checked them several times...not sure what I'm missing. :(

PM me a link to your site and I'll have a look.

LuDawgs 12-22-2011 04:29 PM

I think it probably has something to do with me using a custom style. I've removed the files and the code for now until I can figure out where to place them. PM coming...

Gemma 12-22-2011 05:09 PM

Quote:

Originally Posted by LuDawgs (Post 2280111)
I think it probably has something to do with me using a custom style. I've removed the files and the code for now until I can figure out where to place them. PM coming...

www.yourdomain.com/twitter/

And inside the twitter folder should be the blogger.js, jquery.twitter.js and twitter.css files

LuDawgs 12-22-2011 06:24 PM

I'm an idiot. I uploaded the files to my root, but not in a twitter folder. Doh. All is good! Thank you!

LuDawgs 12-23-2011 01:00 AM

Crazy. I use the MGC Evo chat solution. It has the ability to respond to someone and it puts the @ symbol in front of who you're responding to. The Twitter pop up causes people's names to get underlined and the twitter pop up appears! LOL

If I put @tray...and I mouse over the name, some guy named "tray" has his twitter pop up LOL

Gemma 12-23-2011 08:51 AM

Quote:

Originally Posted by LuDawgs (Post 2280257)
Crazy. I use the MGC Evo chat solution. It has the ability to respond to someone and it puts the @ symbol in front of who you're responding to. The Twitter pop up causes people's names to get underlined and the twitter pop up appears! LOL

If I put @tray...and I mouse over the name, some guy named "tray" has his twitter pop up LOL

In your headinclude template try adding <vb:if condition="THIS_SCRIPT == 'member'"> </vb:if> to the edit you made.

So it would be something like this (depending on which headinclude template edits you made)

Code:

<vb:if condition="THIS_SCRIPT == 'member'">
<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>
</vb:if>


tidus78 12-27-2011 12:12 AM

Installed,4.1.8. seems like working but when I roll-on my tweeter account in profile it says "Sorry, this does not appear to be an active Twitter account"

My account is here : https://twitter.com/#!/Console_Planet

Gemma 12-27-2011 03:05 AM

Do you have a link to your site so I can see what you mean?

Did you add Console_Planet or http://twitter.com/#!/Console_Planet in the profilefield?

tidus78 12-27-2011 10:51 AM

http://www.console-planet.it/members/tidus.html

Added http://twitter.com/#!/Console_Planet mmm

Gemma 12-27-2011 11:09 AM

You only need to add your username - Console_Planet

tidus78 12-27-2011 12:06 PM

:eek::p

Thanks Gemma

tidus78 12-27-2011 12:18 PM

Edit

Just last question : can I modify colour of link blue in orange?

Gemma 12-27-2011 12:27 PM

In the twitter.css file change:
Code:

#twitter_update_list li span a {
    /* links in tweet */
    color: #00f;
}

To something like this:
Code:

#twitter_update_list li span a {
    /* links in tweet */
    color: #fbb715;
}

If you want a different shade of orange change #fbb715

Abhik 01-01-2012 05:49 PM

Hi,
Do I have to put the codes in "memberinfo_block_statistics" template?
I tried to put this on a custom tab template, but nothing showing up.

http://www.getassisted.com/member.php?u=1

EDIT: Okay, I needed to register the userinfo variable. Now the plugin partially working.
It seems the embedded javascripts aren't working. Any solution?

Gemma 01-02-2012 02:20 PM

I've not tried it with a custom tab. Trying adding both template edits to your custom tab template (where the raw content code should go) so it looks like this:
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"/>
<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>


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.

Emeralda 03-05-2012 10:28 AM

Ok, I had an idea of putting it above the code in member info statistics template and it works now without bugging out usertagging.

Gemma 03-08-2012 01:19 PM

Quote:

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

Updated to v.1.0.5

If you wish to upgrade please upload the twitter folder to your server, remove the old template edits and apply the new edits in the opening post.

Naijasite 03-08-2012 10:22 PM

Please i am lost at step 5...How do i find this 5. Open headinclude and add the following to the end ?

Please someone tell me where i can find headinclude in Admin CP

Gemma 03-08-2012 10:41 PM

Quote:

Originally Posted by felixkomo (Post 2307670)
Please i am lost at step 5...How do i find this 5. Open headinclude and add the following to the end ?

Please someone tell me where i can find headinclude in Admin CP

It is a template. AdminCP > Styles and Templates > Style Manager > Choose the style to edit and from the dropdown options choose Edit Templates and click Go

Scroll down the list until you find headinclude, add the template edit as instructed then do the same for memberinfo_block_statistics.

Gemma 08-30-2012 07:44 AM

Finally got around to adding some of my own mods to my new site....I forgot how much I like this one :)

AndrewSimm 12-05-2012 05:03 AM

I can see friends and I can tweet from my profile but my tweets don't show up on my profile.

Gemma 12-05-2012 10:12 PM

Probably needs an update since Twitter stopped some of its API.

I've got a different version running on my site I'll see if I can find the edits and post them up.

Gemma 12-05-2012 11:09 PM

Updated the OP to fix problems with twitter feeds not showing in Member Profile.

To update to v 1.0.6


If you wish to upgrade please upload the twitter folder to your server, remove the old template edits (headinclude and memberinfo_block_statistics) and apply the new edits in the opening post.

AndrewSimm 09-16-2013 05:30 AM

Anyone wanting to use this needs to read this
https://dev.twitter.com/docs/embedde...line-selection

THis is how to use the new 1.1 API released by twitter some months back.

Replicators 04-17-2014 05:30 PM

Nice hack, but it needs fixed! Also the twitter feed should have it's own tab in the profile.


All times are GMT. The time now is 01:04 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.01429 seconds
  • Memory Usage 1,878KB
  • 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
  • (10)bbcode_code_printable
  • (2)bbcode_php_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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