SimplePortal
Customization => Custom Coding => Topic started by: bmac on January 07, 2009, 01:47:35 PM
-
Is there a way to modify the Who's Online Block to allow clicking on the useron icon (http://simpleportal.net/Themes/novelty11/images/useron.gif) next to the username to send them a PM as you can do on within the SMF forum threads? I would like to see this option added if possible.
-
This can be done if you change something in SPortal.php, but think if you change this it could be possible that you can not upgrade ;).
But first i need to know which smf version?
Bye
DIN1031
-
But first i need to know which smf version?
SMF 1.1.7, heavily modded default theme. Thanks for any help on this.
-
Any additional info on this request?
-
Try this
in Sources/SPortal1-1.php find
echo '<tr>
<td colspan="4" style="padding-left: 15px;"><img src="' . $settings['images_url'] . '/useron.gif" alt="', $txt['user'], '" /> ',$user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'],'</td>
</tr>';
replace with :
$mem11=$user['id'];
echo "<tr>
<td colspan='4' style='padding-left: 15px;'><a href='index.php?action=pm;sa=send;u=$mem11' border='0'>"; echo'<img src="' . $settings['images_url'] . '/useron.gif" alt="', $txt['user'], '" /></a> ',$user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'],'</td>
</tr>';
-
That worked, ........ but this seems to have changed the Who's Online block so that it only show one member online regardless how many are really online.
Ideas Nabil?
-
Take that change back.
In the same file:
Find:
<td colspan="4" style="padding-left: 15px;"><img src="' . $settings['images_url'] . '/useron.gif" alt="', $txt['user'], '" /> ',$user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'],'</td>
Replace:
<td colspan="4" style="padding-left: 15px;"><a href="', $scripturl, '?action=pm;sa=send;u=', $user['id'], '"><img src="', $settings['images_url'], '/useron.gif" alt="', $txt['user'], '" /></a> ', $user['hidden'] ? '<i>' . $user['link'] . '</i>' : $user['link'],'</td>