Advertisement:

Me again ^^ How to show buddy list on index page

Aloittaja ittiphol, heinäkuu 21, 2014, 02:18:41 AP

« edellinen - seuraava »

ittiphol

Me again ^^ How to show buddy list on index page

i try this code


function template_editBuddies()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;

// Now loop through each buddy showing info on each.
$alternate = false;
foreach ($context['buddies'] as $buddy)
{
echo '
<tr class="', $alternate ? 'windowbg' : 'windowbg2', '">
<td>', $buddy['link'], '</td>
<td align="center"><a href="', $buddy['online']['href'], '"><img src="', $buddy['online']['image_href'], '" alt="', $buddy['online']['label'], '" title="', $buddy['online']['label'], '" /></a></td>
<td align="center">', ($buddy['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $buddy['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $buddy['name'] . '" /></a>'), '</td>
<td align="center">', $buddy['icq']['link'], '</td>
<td align="center">', $buddy['aim']['link'], '</td>
<td align="center">', $buddy['yim']['link'], '</td>
<td align="center">', $buddy['msn']['link'], '</td>
<td align="center"><a href="', $scripturl, '?action=profile;area=lists;sa=buddies;u=', $context['id_member'], ';remove=', $buddy['id'], ';', $context['session_var'], '=', $context['session_id'], '"><img src="', $settings['images_url'], '/icons/delete.gif" alt="', $txt['buddy_remove'], '" title="', $txt['buddy_remove'], '" /></a></td>
</tr>';

$alternate = !$alternate;
}

echo '
</table>';

}


insert to index.template.php it's not work


Hj Ahmad Rasyid Hj Ismail

There are various mods available regarding buddy/ies. Search the mod site for budd and will list them all. All you need to do is to learn how they are calling buddies to certain page and you try to do the same in index page. Note that boardindex page also call for buddy/ies in its template:


if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);

ittiphol

Lainaus käyttäjältä: ahrasis - heinäkuu 22, 2014, 02:48:18 AP
There are various mods available regarding buddy/ies. Search the mod site for budd and will list them all. All you need to do is to learn how they are calling buddies to certain page and you try to do the same in index page. Note that boardindex page also call for buddy/ies in its template:


if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);


Thank you ahrasis i'll try  ;D

ittiphol




ittiphol

now i can't find way out
how to show buddy on index page  :-\

samborabora

Lainaus käyttäjältä: ittiphol - heinäkuu 24, 2014, 11:23:50 AP
now i can't find way out
how to show buddy on index page  :-\

Install simple portal and add the code I reposted on this thread:http://www.simplemachines.org/community/index.php?topic=505334.msg3725573#msg3725573

It shows only online buddies, is that what's needed?

ittiphol

Lainaus käyttäjältä: samborabora - elokuu 04, 2014, 03:47:37 AP
Lainaus käyttäjältä: ittiphol - heinäkuu 24, 2014, 11:23:50 AP
now i can't find way out
how to show buddy on index page  :-\

Install simple portal and add the code I reposted on this thread:http://www.simplemachines.org/community/index.php?topic=505334.msg3725573#msg3725573

It shows only online buddies, is that what's needed?

Thank you

What file to edit  ???

Advertisement: