MyBB Community Forums

Full Version: Instant Messenger links on Forumteam Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello
How can I put instant messenger (msn, icq, yahoo, aim) links of every forumteam members on Forumteam Page?

Thank you.
Do you want only to show them or provide a link to the web IM ?
zaher1988, it's really nice to hear from you again Smile Always so kind and helpful.

Peace
zaher1988 Wrote:Do you want only to show them or provide a link to the web IM ?

I want them as icons with link to web IM please.
Thank you.
Hello

Open showteam.php

Find
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, displaygroup, usergroup, ignorelist, hideemail, receivepms", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));

replace with
$query = $db->simple_select(TABLE_PREFIX."users", "uid, aim, msn, yahoo, icq, username, displaygroup, usergroup, ignorelist, hideemail, receivepms", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));

find
//If the current group is a moderator group
		if($usergroup['gid'] == 6)
		{
Above it add
if($user['aim'] !=	'')
		{
			$aim = "<a href=\"javascript:;\" onclick=\"MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=aim&amp;uid=".$user['uid']."', 'imcenter', 450, 300);\"><img src=\"aim_image\" /></a>";
		}
		if($user['yahoo'] != '')
		{
			$yahoo = "<a href=\"javascript:;\" onclick=\"MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=yahoo&amp;uid=".$user['uid']."', 'imcenter', 450, 300);\"><img src=\"yahoo_image\" /></a>";
		}
		if($user['msn'] != '')
		{
			$msn = "<a href=\"javascript:;\" onclick=\"MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=msn&amp;uid=".$user['uid']."', 'imcenter', 450, 300);\"><img src=\"msn_image\" /></a>";
		}
		if($user['icq'] != 0)
		{
			$icq = "<a href=\"javascript:;\" onclick=\"MyBB.popupWindow('misc.php?action=imcenter&amp;imtype=icq&amp;uid=".$user['uid']."', 'imcenter', 450, 300);\"><img src=\"icq_image\" /></a>";
		}

You will need to modify the source of the images.

Now the templates work....

In the templates manager go to showteam_usergroup_user template

find
<td width="80%" class="{$bgcolor}"><a href="member.php?action=profile&amp;uid={$user['uid']}"><strong>{$user['username']}</strong></a></td>

change 80% to 70%
after the line  add
<td width="10%" class="{$bgcolor}">{$aim} {$yahoo} {$msn} {$icq}</td>

now go to showteam_usergroup template
find
<td class="tcat"><span class="smalltext"><strong>{$lang->uname}</strong></span></td>
after it add
<td class="tcat"><span class="smalltext"><strong>IMs</strong></span></td>

Apply the same respectively for showteam_moderators_mod and showteam_moderators templates.

Theman80.. you have previously applied the avatar on show team page.. for that reason take note that some search terms that i have provided will be different in your case (such as the 1st template and the 1st php search term).. but im leaving them for other people who havent applied any modification.
Thank you very much. You are great.
But this line:

$aim = $icq = $yahoo = $msn = '';

must add above that line:

if($user['aim'] !=    '')

Thanks again.
And I want to ask a question about this topic:

How can I add any userfield (fidx) to Forumteam Page? (For that, which query must I add to showteam.php?)
Quote:Post: #6RE: Instant Messenger links on Forumteam Page

Thank you very much. You are great.
But this line:



Code:

$aim = $icq = $yahoo = $msn = '';

must add above that line:



Code:

if($user['aim'] !=    '')


I dont find a need for it..... I didn't have duplicated run on variables from one user to another...



Anyway for the fields... in the same file.. find
//If the current group is a moderator group
		if($usergroup['gid'] == 6)

Above it add

$fields_query = $db->query("SELECT * FROM ".TABLE_PREFIX."userfields WHERE ufid='".$user['uid']."'");
		$fields = $db->fetch_array($fields_query);
Now in the templates add

{$fields['fidX']}
of course you change X

regards
zaher1988 Wrote:
Quote:Post: #6RE: Instant Messenger links on Forumteam Page

Thank you very much. You are great.
But this line:



Code:

$aim = $icq = $yahoo = $msn = '';

must add above that line:



Code:

if($user['aim'] != '')


I dont find a need for it..... I didn't have duplicated run on variables from one user to another...

Err, think about it man. If a user has a aim it sets $aim as something. If another user then does not have aim, it will show the $aim of the other user.
Oh yeah i already know that... i just realized why it didn't do such behaviour with me which surprized me tooToungue... it is that the last in the list only had valid inputs LOL ... i feel ashamedToungue
[quote=zaher1988]
Quote:Post: #6RE: Instant Messenger links on Forumteam Page

Anyway for the fields... in the same file.. find
//If the current group is a moderator group
		if($usergroup['gid'] == 6)

Above it add

$fields_query = $db->query("SELECT * FROM ".TABLE_PREFIX."userfields WHERE ufid='".$user['uid']."'");
		$fields = $db->fetch_array($fields_query);
Now in the templates add

{$fields['fidX']}
of course you change X

regards

This didn't work. I can't show any userfield (fidx) to Forumteam Page.
Can you please fix it?
Pages: 1 2