News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders

Started by MoreBloodWine, September 23, 2010, 05:25:21 PM

Previous topic - Next topic

Agent 0E

I really like this. I look forward to when this can be set up to update automatically, but for now I have no problems coming back here to look for any updates you make.

Great job and thank you very much for it.

MoreBloodWine

Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


teos55

 I know this topic is not uptodate but I'll try m chance.

Running smf1.1.13  default theme Simple Portal 2.3.3 

  Some of the mods already modified who.template.php, therefor standart package is not applicable in my case.
Being a novice user, I cannot dare to do the manual modifications to this php.

Formarly I was able to use package, bu this was before the other mods applied, and I reinstalled smf .
ref : http://www.simplemachines.org/community/index.php?topic=434341.0
I like this modification alot and find is really usefull.

Any help ? I cannot attach the file to this post. I dont know why, no add file option.

MoreBloodWine

Using the previously posted package that someone made up while I try and work on my own wont work for users with mods that modify the existing file. What you will need to do is uninstall all your mods, upload the new who file then reinstall all your existing mods which should allow them to make the edits they need to but even then it may not work right due to the code changes made to the who file to get it to look the way it does.

Also, I'm still very active with this site and this post, there's just not been much updating to do as I havent come accross any new spiders etc.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


teos55

 Thanks for the reply. My basic concern is mainly it's httpbl mod that modifies the template. Even though I'll be
able to use package inst. for grouped who's on lie then I'm sure httpbl will fail at that moment. And httpbl is a huge package for security and I dont want to miss it.
Thanks anyway.

MoreBloodWine

Quote from: teos55 on May 18, 2011, 06:15:13 PM
Thanks for the reply. My basic concern is mainly it's httpbl mod that modifies the template. Even though I'll be
able to use package inst. for grouped who's on lie then I'm sure httpbl will fail at that moment. And httpbl is a huge package for security and I dont want to miss it.
Thanks anyway.
HTTPbl is a good mod and I dont dare to try and tell people what they should be using but my sites been doing just fine with Stop Spammer.

http://custom.simplemachines.org/mods/index.php?mod=1547

Since the usernames can be funny all you need to do is have it set to check against IP's and emails. Even then if you feel something may be falsely marked you can check it.

Overall Stop Spammer gets an A+ in my book, I use to get hit hard with spam til I installed it.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


teos55


MoreBloodWine

Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


teos55


MoreBloodWine

Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


snoopy_virtual

Quote from: teos55 on May 18, 2011, 06:15:13 PM
Thanks for the reply. My basic concern is mainly it's httpbl mod that modifies the template. Even though I'll be
able to use package inst. for grouped who's on lie then I'm sure httpbl will fail at that moment. And httpbl is a huge package for security and I dont want to miss it.
Thanks anyway.

Hi teos55, I'm the guy who did both mod httpBL and StopSpammer and I also use this custom Who.template, so both are compatibles with this. Anyway, if you contact me through Skype I can give you a hand to set it up properly.

Or even easier: Send me your file Who.template.php by email as you have it just now and I will send it back to you already modified. (info [at] snoopyvirtualstudio.com).

Quote from: MoreBloodWine on May 18, 2011, 07:06:35 PM
Quote from: teos55 on May 18, 2011, 06:44:50 PM
Forgot to mention Forum Firewall :-)
Don't believe I've ever come accross that one...

The mod Forum Firewall is not compatible with mod httpBL. If you use both at the same time you can have problems.

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

teos55


snoopy_virtual


El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

teos55

  Applied your who.template.php  and then httpbl  with no hassle. 

Thanks alot for your efforts, you're great ...

snoopy_virtual


El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

teos55

 Snoopy_virtual,

  After further usage of your modification, I ve noticed that, there is no seperator between user info,

I dont whether the output is from who.template.php or "OS & Browser Detection" mod.

It should be nice to see a line seperator ( either with dashes or a continues line in between users.

What I mean is this :


All the best

snoopy_virtual

This modification is not mine. The only thing I did is to add a few more crawlers to the list started by Owdy and continued by MoreBloodWine.

In fact in all my forums I use a slightly modified version of this file, but I use a different one for every forum, because the look of this page depends on the design of the forum.

For example in forums where you have different colours in the backgrounds of "windowbg" and "windowbg2" (inside the CSS file for the Theme you are using) there is no need to change anything, as the colours of every row are different.

But if those colours are the same you can get the effect you want if you modify your Who.template file as well.

Look for these lines:


<td>', $member['action'], '</td>
</tr>
';

// Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.)
$alternate = !$alternate;


And change them to:


<td>', $member['action'], '</td>
</tr>
<tr>
<td><img src="where ever you have the horizontal picture you want to use" alt="" border="0" /></td>
</tr>
';

// Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.)
$alternate = !$alternate;


Or instead of an horizontal picture you can use just a <hr /> like this:


<td>', $member['action'], '</td>
</tr>
<tr>
<td><hr /></td>
</tr>
';

// Switch alternate to whatever it wasn't this time. (true -> false -> true -> false, etc.)
$alternate = !$alternate;

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

snoopy_virtual

Another thing you can do is to change the backgrounds this page is using.

Instead of using "windowbg" and "windowbg2", define 2 new ones.

Call them for example "who_windowbg" and "who_windowbg2" and define them inside the file "style.css" of the Theme you are using like this:


.who_windowbg
{
background-color: #000000;
}
.who_windowbg2
{
background-color: #000000;
}


Please note that the colour #000000 is black. You would need to change both of them and look for the numbers of the colours you want to use. I do that normally with Photoshop, but you can use for example this chart http://www.somacon.com/p142.php or any other one you want.

Then inside the file Who.template.php change the lines:


// $alternate will either be true or false.  If it's true, use "windowbg2" and otherwise use "windowbg".
echo '
<tr class="windowbg', $alternate ? '2' : '', '">


for these ones:


// $alternate will either be true or false.  If it's true, use "who_windowbg2" and otherwise use "who_windowbg".
echo '
<tr class="who_windowbg', $alternate ? '2' : '', '">

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

teos55

 I was trying your first suggestion and now the second one, you're great.  I'll test both of them, feedback.
All the best

teos55

  The first one works great, I might slightly play with the image in PS though.
Now, will try the second one ...

Thanks alot for spending time on this...

Advertisement: