SimplePortal

Customization => Custom Coding => Topic started by: bmac on January 07, 2009, 01:47:35 PM

Title: Who's Online Block Help
Post 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.
Title: Re: Who's Online Block Help
Post by: ???1031 on January 08, 2009, 02:30:39 AM
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
Title: Re: Who's Online Block Help
Post by: bmac on January 08, 2009, 12:03:58 PM
Quote
But first i need to know which smf version?

SMF 1.1.7, heavily modded default theme. Thanks for any help on this.
Title: Re: Who's Online Block Help
Post by: bmac on January 15, 2009, 08:07:18 AM
Any additional info on this request?
Title: Re: Who's Online Block Help
Post by: Nabil on January 15, 2009, 04:57:29 PM
Try this
in Sources/SPortal1-1.php find
Code: [Select]
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 :
Code: [Select]
$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>';
Title: Re: Who's Online Block Help
Post by: bmac on January 17, 2009, 12:59:36 AM
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?
Title: Re: Who's Online Block Help
Post by: [SiNaN] on February 03, 2009, 06:30:18 AM
Take that change back.

In the same file:

Find:

Code: [Select]
<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:

Code: [Select]
<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>
SimplePortal 2.3.8 © 2008-2024, SimplePortal