In memberlist.template.php how can I change the following code to static links with my own icons
Quote
// ICQ?
if (!isset($context['disabled_fields']['icq']))
echo '
<td class="windowbg2">', $member['icq']['link'], '</td>';
// AIM?
if (!isset($context['disabled_fields']['aim']))
echo '
<td class="windowbg2">', $member['aim']['link'], '</td>';
// YIM?
if (!isset($context['disabled_fields']['yim']))
echo '
<td class="windowbg2">', $member['yim']['link'], '</td>';
// MSN?
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2">', $member['msn']['link'], '</td>';
like this TIP I have used for display template http://www.simplemachines.org/community/index.php?topic=50765.0 (http://www.simplemachines.org/community/index.php?topic=50765.0)
See this thread (http://www.simplemachines.org/community/index.php?topic=50765.0).
Quote from: Arantor on August 02, 2009, 02:44:03 PM
See this thread (http://www.simplemachines.org/community/index.php?topic=50765.0).
Thats the one I alredy posted above
Sorry, I misread that.
The tip should be explaining it. You just upload the icons you want to use into the theme's images directory and apply the edits to Display.template.php as it says.
You may find you get better support by replying in that thread if you need further advice.
Quote from: Arantor on August 02, 2009, 03:14:21 PM
Sorry, I misread that.
The tip should be explaining it. You just upload the icons you want to use into the theme's images directory and apply the edits to Display.template.php as it says.
You may find you get better support by replying in that thread if you need further advice.
You miss read me againe I alredy did it for display template I want the same thing in memberlist.template.php not display template.php
Sorry - been very hectic.
That said it's almost identical. The block in question is:
// ICQ?
if (!isset($context['disabled_fields']['icq']))
echo '
<td class="windowbg2">', $member['icq']['link'], '</td>';
// AIM?
if (!isset($context['disabled_fields']['aim']))
echo '
<td class="windowbg2">', $member['aim']['link'], '</td>';
// YIM?
if (!isset($context['disabled_fields']['yim']))
echo '
<td class="windowbg2">', $member['yim']['link'], '</td>';
// MSN?
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2">', $member['msn']['link'], '</td>';
Just replace with:
// ICQ?
if (!isset($context['disabled_fields']['icq']))
echo '
<td class="windowbg2"><a href="'. $message['member']['icq']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/icq.gif" border="0" /></a></td>';
// AIM?
if (!isset($context['disabled_fields']['aim']))
echo '
<td class="windowbg2"><a href="'. $message['member']['msn']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/msn.gif" border="0" /></a></td>';
// YIM?
if (!isset($context['disabled_fields']['yim']))
echo '
<td class="windowbg2"><a href="'. $message['member']['aim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/aim.gif" border="0" /></a></td>';
// MSN?
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2"><a href="'. $message['member']['yim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a></td>';
thanks so much for the help
Does this solve the topic? Please mark it if it does.
sorry nope it has replaced the icons well but when I click any of them it just opens a blank page called about blank
My bad, I did it in a bit of a hurry.
// ICQ?
if (!isset($context['disabled_fields']['icq']))
echo '
<td class="windowbg2"><a href="'. $member['icq']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/icq.gif" border="0" /></a></td>';
// AIM?
if (!isset($context['disabled_fields']['aim']))
echo '
<td class="windowbg2"><a href="'. $member['msn']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/msn.gif" border="0" /></a></td>';
// YIM?
if (!isset($context['disabled_fields']['yim']))
echo '
<td class="windowbg2"><a href="'. $member['aim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/aim.gif" border="0" /></a></td>';
// MSN?
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2"><a href="'. $member['yim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a></td>';
Great thanks worked a treat just had to rearange the msn aim and stuff as the code you suplied was like this in places. Anyway thanks very much for the help on this
if (!isset($context['disabled_fields']['msn']))
echo '
<td class="windowbg2"><a href="'. $member['yim']['href']. '" target="_blank"><img src="' . $settings['images_url'] . '/yim.gif" border="0" /></a></td>';
Sorry about that. It's in a different order and I just must have copied in wrongly. Good to see it's sorted though.