Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 12 Years, 11 Months ago Twitter widget on user profile
#1
Solved: 12 Years, 11 Months ago
Hi,

Is there any plugin available that allow user from usercp to add twitter profile link and this will be display it on user profile?

Please give me the link of plugin that you think closely matches this requirement, I will make modifications in it.

Thanks in advance.
#2
Solved: 12 Years, 11 Months ago
http://www.mybbcentral.com/thread-3954.html
No longer involved in the MyBB project.
#3
Solved: 12 Years, 11 Months ago
This link is not working.

(2012-02-06, 07:57 AM)Nathan Malcolm Wrote: http://www.mybbcentral.com/thread-3954.html

#4
Solved: 12 Years, 11 Months ago
see profile twitter plugin
#5
Solved: 12 Years, 11 Months ago
That is really helpful most of the requirements are covered by this plugin, now I have to show user twitter widget in place of showing twitter link on user profile.

(2012-02-06, 08:02 AM)ranjani Wrote: see profile twitter plugin

#6
Solved: 12 Years, 11 Months ago
^ may be you can add required widget code in member_profile template ...
#7
Solved: 12 Years, 11 Months ago
I have modified the plugin and now using twitter api to show user's twitter profile on user profile section.
#8
Solved: 12 Years, 11 Months ago
^ fine Smile would you like to share the trick (i.e. required editing) here ..
#9
Solved: 12 Years, 11 Months ago
(2012-02-06, 12:41 PM)ranjani Wrote: ^ fine Smile would you like to share the trick (i.e. required editing) here ..

Please...

Whenever I try to hook a plugin into a different location, I manage to wipe the template completely...
PGP Key (Fingerprint: 23B6 F4C0 FE2D 45AA 61A0 1E86 DB87 09DC DD87 6E40)
#10
Solved: 12 Years, 11 Months ago
Here is what I have modified with profile twitter plugin:

1. On plugin activation, in member_profile template I have added {$twitter_widget}

 find_replace_templatesets('member_profile','#{\$memprofile\[\'msn\'\]\}</a></td>#',
        '{$memprofile[\'msn\']}</a></td>
</tr>
<tr>
<td class="trow2"><strong>Twitter:</strong></td>
<td class="trow2">{$twitter_widget}</td>
</tr>');

2. On member_profile_start hook I set {$twitter_widget} with twitter api script (to show user twitter profile).

$plugins->add_hook("member_profile_start", "profiletwitter_check");

function profiletwitter_check(){
	global $mybb, $db, $twitter_widget;

	$query  = $db->query('SELECT twitter FROM ' . TABLE_PREFIX . 'users WHERE uid='.$mybb->input['uid']);
	$row	=	$db->fetch_array($query);
	if(!empty($row['twitter'])){
		$twitter_widget	=	"<script charset=\"utf-8\" src=\"http://widgets.twimg.com/j/2/widget.js\"></script>
		<script>
		new TWTR.Widget({
  version: 2,
  type: 'profile',
  rpp: 4,
  interval: 30000,
  width: 320,
  height: 150,
  theme: {
    shell: {
      background: '#696b8a',
      color: '#ffffff'
    },
    tweets: {
      background: '#ffffff',
      color: '#474247',
      links: '#2207eb'
    }
  },
  features: {
    scrollbar: false,
    loop: false,
    live: false,
    behavior: 'all'
  }
}).render().setUser('".$row['twitter']."').start();</script>";
	}
	else{
		$twitter_widget	=	"N/A";
	}

See twitter.png for the final results. Hope this will be helpful for you Smile


Attached Files Thumbnail(s)
   
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)