Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: MoreBloodWine on September 23, 2010, 05:25:21 PM

Title: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on September 23, 2010, 05:25:21 PM
First I will start with a famous quote...

Quote from: Owdy on November 03, 2004, 01:15:56 PM
*** This is NOT the Googlebot & Spiders mod, you can find that mod by clicking here (http://mods.simplemachines.org/index.php?mod=143). ***

Ok, first and foremost... ALWAYS back up your original files before replacing them. As for what the attached file does, it replaces your currently used themes Who.template.php file and breaks it into three parts. Instead of lumping everything together it creates separate lists for Users, Guests & Spiders as seen here (http://www.eojmarket.com/index.php?action=who) on my site.

It currently has about 200 or so agents for Spiders, Browsers & Phones... I took the time to alphabetize it so it's easily managed when adding new agents. This is a pretty straight forward setup so you can't really screw it up but should you have any questions please reply to this thread and I will try to answer it.

Few things to note:

1. This file was originally hosted and created by Owdy (http://www.simplemachines.org/community/index.php?action=profile;u=272), he has decided to give up support on it for the numerous idiots who can't seem to understand that this has nothing to do with the Googlebot & Spiders mod. I'm sorry if what I just said seems harsh but it's the cold hearted truth. In any case, he has given me permission to re-host it and provide support for it by adding new agents etc. when needed.

2. Any questions regarding the Googlebot & Spiders mod will be ignored as this has nothing what so ever to do with that mod.

3. Anyone re-hosting the files code with new agents will be ignored as I don't have the time to comb through hundreds of agents to find whats new and add them to the main file. So, with that said new agents will only be accepted in the following formats and at which point they will be added to the main file.

Code (If Spider) Select
        array (
            'agent' => ' ',
            'spidername' => ' ',
            'spider' => true,
        ),


Code (If Phone) Select
        array (
            'agent' => ' ',
            'name' => ' ',   
        ),


Code (If Browser) Select
        array (
            'agent' => ' ',
        ),


Edit: Since SMF seems to be stubborn (set) in their ways with permissions here I have to host the file off site at one of my forums, please feel free to register if you want since it's a multi platform gaming site. In any case, you can DL the file from the below link.

Custom Who.template.php (http://www.eojmarket.com/index.php?topic=1493.msg10334#msg10334)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on September 23, 2010, 05:49:53 PM
Request for the admins, please if you can allow me permissions to edit the main attached file as I only have the option to delete it.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Oya on September 23, 2010, 06:18:11 PM
Quote from: MoreBloodWine on September 23, 2010, 05:49:53 PM
Request for the admins, please if you can allow me permissions to edit the main attached file as I only have the option to delete it.

not without changing the whole permissions on this board so that everyone can upload attachments
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on September 23, 2010, 06:47:53 PM
Quote from: Oya on September 23, 2010, 06:18:11 PM
Quote from: MoreBloodWine on September 23, 2010, 05:49:53 PM
Request for the admins, please if you can allow me permissions to edit the main attached file as I only have the option to delete it.

not without changing the whole permissions on this board so that everyone can upload attachments
Assuming that that is infact the case which it remains to be seen then I'll have to end up hosting it locally or some BS.

Edit: Come to think of it, if that is the case, with the team they have they could easily code in something simple. No I don't mean just for me but everyone as a whole who has a file thats part of their tip/trick.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Oya on September 23, 2010, 07:02:22 PM
nto without altering smfs core code and they dont generally like doing that here because it makes upgrading harder

attachments are simply based on 'can post them in this board'
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on September 23, 2010, 07:13:15 PM
Well either way between permissions by board and makin a new attachments group it should be doable without modifying anything now that I think about it.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Oya on September 23, 2010, 08:28:53 PM
not really because then youd have to add anyone who ever posted a thread here to that group which is very very manual
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on September 23, 2010, 08:32:07 PM
Quote from: Oya on September 23, 2010, 08:28:53 PM
not really because then youd have to add anyone who ever posted a thread here to that group which is very very manual
True but only if said person asks to be added.

Edit: Again, it would only be for people with tips that use files so no, not everyone with a post here.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: choloman05 on September 28, 2010, 06:03:58 PM
This file reminds me of a really good one that was floating around here somewhere years ago.  As with that one, using this file give me tonsss of errors in my error log.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on September 28, 2010, 07:13:47 PM
Quote from: choloman05 on September 28, 2010, 06:03:58 PM
This file reminds me of a really good one that was floating around here somewhere years ago.  As with that one, using this file give me tonsss of errors in my error log.
I'm sorry but I have t ocry foul on that because its running fine on my 1.1.11 live site and a 2.0 test site, if it errord on you then you either have something else conflicting with it or you tried to make a change toe the file yourself which then errord.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: choloman05 on October 10, 2010, 06:55:48 PM
I have 0 mods installed on a fresh installation of 2.0RC3.  I don't know why, but I get tons of errors.  The old template I was talking about did the exact same thing on various versions of SMF. 

Maybe I need to change some setting or something I'm not thinking about though.  But even disabling template evals doesn't cut down on the errors.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 10, 2010, 07:32:21 PM
Quote from: choloman05 on October 10, 2010, 06:55:48 PM
I have 0 mods installed on a fresh installation of 2.0RC3.  I don't know why, but I get tons of errors.  The old template I was talking about did the exact same thing on various versions of SMF. 

Maybe I need to change some setting or something I'm not thinking about though.  But even disabling template evals doesn't cut down on the errors.
I honestly wish I had soemthing to tell you but I have a 1.1 live site a 1.1 test site and even a 2.0 test site and this file is all working 100% flawlessly on them without a single error in either SMF or my cPanel.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 12, 2010, 11:55:24 AM
Hi MoreBloodWine

Fist of all thanks for continuing Owdy's work. I have been using this way to display the whosonline page for ages and it would be a pity if we don't have somewhere to add new spiders etc.

I can see you have problems with the permission to modify the attached file in the fist post, so I don't know how you are going to do this, but anyway here there are 3 spiders more:


array (
'agent' => 'SBIder',
'spidername' => 'SBIder',
'spider' => true,
),
array (
'agent' => 'noxtrumbot',
'spidername' => 'Noxtrum Spider',
'spider' => true,
),
array (
'agent' => 'Sogou web spider',
'spidername' => 'Sogou Spider',
'spider' => true,
),
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 12, 2010, 01:16:20 PM
Quote from: snoopy_virtual on October 12, 2010, 11:55:24 AM
Hi MoreBloodWine

Fist of all thanks for continuing Owdy's work. I have been using this way to display the whosonline page for ages and it would be a pity if we don't have somewhere to add new spiders etc.

I can see you have problems with the permission to modify the attached file in the fist post, so I don't know how you are going to do this, but anyway here there are 3 spiders more:


array (
'agent' => 'SBIder',
'spidername' => 'SBIder',
'spider' => true,
),
array (
'agent' => 'noxtrumbot',
'spidername' => 'Noxtrum spider',
'spider' => true,
),
array (
'agent' => 'Sogou web spider',
'spidername' => 'Sogou spider',
'spider' => true,
),

Thx for those, as for updating the file... until rather I should say if SMF ever gets around to setting up permissions or whatever for me to mod the file that I may just have to delete it from the main post and host it locally. I also have a few other ideas on how to handle it but either way I'm working on the "hosting" problem.

But ya, thx for the new submissions and your welcome for the continuation ;-)

Edit: Thought I would add that one of my ideas which would seem to be the best is make a database thats hosted by me that the file would grab it's info from but that would most likely mean turning it into an actual mod because of all the connection info that would need to happen. Even then I'm not sure if it would even be that stable because of all the data it would have to pull. Another idea though thats sort of based off this one is make it like I just said but have it save the info locally to your site so it only polls for data when new data is found. The submission process for new spiders etc would still pretty much be the same but if I could get this idea working it would make the updating / distribution pretty damn smooth.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 12, 2010, 01:43:46 PM
There are a lot of mods that the only thing they do is upload to your forum a few images (avatar mods, icon mods, etc) so I don't see a big problem if you just turn this into a mod.

I mean a mod that the only thing it does is to replace the original SMF Who.template.php file with this one.

Or even better (just a little more complicated but possible) a mod that modify the original SMF Who.template.php file to leave it like this one.

That way you will have full control all the time and you won't need to have anything hosted anywhere else.

Of course it's up to you. Whatever you decide just say it here so we (me and the rest of the people using this thing) know where/how to find/add new entries.  ;)

PS.- If you haven't done mods before PM me and I can give you a hand. It doesn't seem too difficult to do.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 12, 2010, 02:12:48 PM
What I was talking about in my edit was turning this in to a mod thats sort of like Stop Spammer in that it connects to an offsite DB of sorts to gather / check info. So like if this got turned into a mod it would connect to my site somewhere whenever someone loads the Whos Online page and check for new info and if found store it locally on the users site that way everytime the whos online is loaded it wouldnt poll for all available data but instead check for new data to DL. Again this is just one of my many ideas but probbaly the most complicated of them all.
Quote from: snoopy_virtual on October 12, 2010, 01:43:46 PM
There are a lot of mods that the only thing they do is upload to your forum a few images (avatar mods, icon mods, etc) so I don't see a big problem if you just turn this into a mod.

I mean a mod that the only thing it does is to replace the original SMF Who.template.php file with this one.

Or even better (just a little more complicated but possible) a mod that modify the original SMF Who.template.php file to leave it like this one.

That way you will have full control all the time and you won't need to have anything hosted anywhere else.

Of course it's up to you. Whatever you decide just say it here so we (me and the rest of the people using this thing) know where/how to find/add new entries.  ;)

PS.- If you haven't done mods before PM me and I can give you a hand. It doesn't seem too difficult to do.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 12, 2010, 03:09:25 PM
Well, I am co-author (together with M-DVD) of mod Stop Spammer and the only responsible for that mod just now (until M-DVD has again free time and decide to come back) and I have also another mod (httpBL) that needs to look for data inside an external database all the time, so I understand what you say.  ;)

Of course what you say would be a solution and it can be done. The problem is sometimes you get problems if you need to rely on an external DB too much. Sometimes the external DB is not available. Sometimes there are connexion problems, etc.

You just need to read the support threads for both mods (Stop Spammer and httpBL) and you will see how many times I had to deal with problems somebody has because there was a problem with the connexion with the external DB.

I have been always trying to change both mods to make them use (when possible) internal data instead of relying all the time on external data.

For example with mod httpBL it has been more or less easy to do it. In my last version 2.4 every time the mod checks the external DB it adds the data to the cache (if it's activated) and/or the session, so next time the same IP comes back the mod don't need to check the external DB, but the internal cache and/or session (if they haven't expired).

With mod Stop Spammer it's a little more difficult, but I have found also another solution. Just installing as well the mod Anti-Spam Verification Questions. (For people using SMF 1.x). (It is already built inside SMF 2.0 so people using 2.0 just need to add some questions so that's working properly).

These Verification Questions will stop 99% of the spammer robots before they need to be checked by mod Stop Spammer, so it reduces drastically the amount of external connexions needed.

===============

In your case you will need to find also a way to reduce also the amount of external connexions needed.

For example an idea will be to create 2 different DBs:

An external DB hosted where ever you want and an internal one inside every forum DB (just a new table in the DB I mean). (Or just a text file that can be included every time it's needed).

The mod will use always the internal data but you can put a button inside the mod's config page to check the external DB and update the data if needed.

I think something like that is what you were talking about before in one of your posts.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 12, 2010, 03:23:34 PM
All very good info, I'll give it a more detailed read later as I sort of just skimmed it but as far as issues go with the DB, I don't see it as being to bad because it would only be a connection issues if new data was available for download as all data would be stored on the users site after being DL from the DB I would set up if I took this route.

So it might work soemthing like this...

1. Initial install
2. Users views whos online
3. Page loads and connects to me, since this is an initial install it downloads all available data (spiders, users etc.)
4. After data has been DL it is then stored locally on the users site
5. User closes page
6. 2 hrs later user reloads whos online
7. Whos online checks DB against stored data and finds one new spider
8. New spider gets DL and stored locally with the rest of the data

So everything would always be stored locally on the users site so aside from connection issues during the inital install everything should run pretty smoothly if this route was taken. Also, the server I use for my sites etc has pretty decent uptimes and I could easily add a mirror backup service so for the most part I could easily guarantee a 99% uptime leaving 1% for the unexpected.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 12, 2010, 04:03:48 PM
I see.

That's a lot better plan than the one I was suggesting.

Anyway, to avoid the connexion problems I was talking about the only things you will need to add are:


This way you will have something like this:

1. Initial install. All known data at the moment the mod was published is stored locally on the users site
2. Users views whos online
3. Page loads and try to connects to you. Since this is an initial install (maybe a few months after mod was published) maybe there are a lot of new data
4. There is a problem with the connexion. So the page assumes there is no new data and just uses local data
5. User closes page
6. 2 hrs later user reloads whos online
7. Whos online checks external DB against stored data but this time there is no problem with the connexion, so it finds one new spider (or a lot of new data)
8. New data gets DL and stored locally with the rest of the data
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 15, 2010, 06:07:12 AM
Checking again the list of spiders I found another one missing:


array (
'agent' => 'bingbot/2.0',
'spidername' => 'MSN Spider',
'spider' => true,
),
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 15, 2010, 06:29:01 AM
Quote from: snoopy_virtual on October 15, 2010, 06:07:12 AM
Checking again the list of spiders I found another one missing:


array (
'agent' => 'bingbot/2.0',
'spidername' => 'MSN Spider',
'spider' => true,
),

Thx, I'll get that added in later on and see about getting a self hosted copy up until the SMF guys get around to giving me permission to mod the main file if they ever do which I'm leaning towards no they wont. I only say that because alot of people would argue why do this for one person, but heres the thing, theres other people like me who host stuff like this that include files of their own so it would be more of a group thing but anyway, the SMF team will do what they want when they want but who amd I to argue with them lol...

Usually goes in one speaker and out the other...

But ya thx for the new spider ;-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Sea Mac on October 19, 2010, 11:41:56 AM
Thank You for this! Very useful!
I'm using the version snoopy_virtual made and posted here: http://www.simplemachines.org/community/index.php?topic=366399.msg2816231#msg2816231

It adds Browser and OS information. You can see how this looks:  http://softwaresanta.com/smf/index.php?action=who

I like it! (http://softwaresanta.com/shsmf/Smileys/classic/bowing.gif)  (http://softwaresanta.com/shsmf/Smileys/classic/beating.gif)  (http://softwaresanta.com/shsmf/Smileys/classic/beating.gif)  (http://softwaresanta.com/shsmf/Smileys/classic/beating.gif)  (http://softwaresanta.com/smf/Themes/Christmas/images/post/thumbup.gif)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 19, 2010, 12:02:25 PM
Ty for those kind words but as for snoopy's version, while it is nice and I'm not knocking it in any way the added data on individual lines makes the whos online list larger then I feel it hsould be. Again, I'm not knocking his version in any way but if you have a large forum the whos online list can get a bit huge with the added data on their own lines.

I do like it though !

@Everyone: Sorry for not getting a new hosted version up, been kind of busy with some family things bit I'll try to get a new hosted more manageable version up by tomorrow if not later today ;-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 19, 2010, 01:43:50 PM
NO, mine is not a different version.

The only thing is my mod httpBL needs to change the file Who.template.php to work properly and, as Sea Mac is using this custom file instead of the default one, he was having problems installing my mod.

So, as I also have been using this custom file Who.template.php for a long time, I had already made the needed changes manually (for my own forum) so I gave him a copy of it.

But it's exactly the same one.

The fact that my mod allows you to see the OS & Browser of every visitor if you want is something different and, anyway, you can turn it on or off. Or even better (the way I have in all my forums) you can put it in a way that only admins can see that info.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: RCmod on October 24, 2010, 03:38:34 PM
I really wish someone would turn this into an actual mod that could be installed through the package manager. I went to MoreBloodWines's forum to check it out and this is exactly what I'm looking for.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 24, 2010, 05:07:11 PM
Quote from: RCmod on October 24, 2010, 03:38:34 PM
I really wish someone would turn this into an actual mod that could be installed through the package manager. I went to MoreBloodWines's forum to check it out and this is exactly what I'm looking for.
One thing I am looking in to is making this a mod that more easily updatable but for the time being all you need to do is just toss this in as a replacement for your currently used Who.template.php file.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: RCmod on October 25, 2010, 09:01:41 PM
Quote from: MoreBloodWine on October 24, 2010, 05:07:11 PM
Quote from: RCmod on October 24, 2010, 03:38:34 PM
I really wish someone would turn this into an actual mod that could be installed through the package manager. I went to MoreBloodWines's forum to check it out and this is exactly what I'm looking for.
One thing I am looking in to is making this a mod that more easily updatable but for the time being all you need to do is just toss this in as a replacement for your currently used Who.template.php file.

Yeah I realize its that easy, but I don't have FTP access to the site. I've been given full admin rights and allowed to install "some" mod's but I don't have FTP privileges and most likely wont.

BTW thanks for all your hard work with this great mod and not letting it die.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 25, 2010, 09:09:29 PM
If you have one of the "free" smf sites which I believe is owned by VBGamer assuming it's SMFForFree.com or something like that. HE might be able to hook this up for you... never hurts to ask... worst your gonna hear is HELL NO !
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 26, 2010, 10:31:13 AM
Quote from: RCmod on October 25, 2010, 09:01:41 PM
Quote from: MoreBloodWine on October 24, 2010, 05:07:11 PM
Quote from: RCmod on October 24, 2010, 03:38:34 PM
I really wish someone would turn this into an actual mod that could be installed through the package manager. I went to MoreBloodWines's forum to check it out and this is exactly what I'm looking for.
One thing I am looking in to is making this a mod that more easily updatable but for the time being all you need to do is just toss this in as a replacement for your currently used Who.template.php file.

Yeah I realize its that easy, but I don't have FTP access to the site. I've been given full admin rights and allowed to install "some" mod's but I don't have FTP privileges and most likely wont.

BTW thanks for all your hard work with this great mod and not letting it die.

If you haven't got FTP access you can use the attached package.

EDIT:
Sorry, I have been trying to attach the package but apparently I haven't got permission to attach files here (?) so I have put it in my server instead. You can download it from here:

http://www.snoopyvirtualstudio.com/descargas/Custom.Who.template/Custom.Who.template-v0.5.zip

I have done it for my own use, so it's only compatible with SMF 1.1.11 and SMF 2 RC3 If you are using a different version let me know.

The only thing it does is to replace the original SMF Who.template.php file with the custom one published at the beginning of this thread by MoreBloodWine plus the 4 new spiders added by me.

Of course this is just a temporary solution while MoreBloodWine finish his mod. That's why I have named it version 0.5  ;)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 26, 2010, 11:08:35 AM
Quote from: snoopy_virtual on October 26, 2010, 10:31:13 AM
Quote from: RCmod on October 25, 2010, 09:01:41 PM
Quote from: MoreBloodWine on October 24, 2010, 05:07:11 PM
Quote from: RCmod on October 24, 2010, 03:38:34 PM
I really wish someone would turn this into an actual mod that could be installed through the package manager. I went to MoreBloodWines's forum to check it out and this is exactly what I'm looking for.
One thing I am looking in to is making this a mod that more easily updatable but for the time being all you need to do is just toss this in as a replacement for your currently used Who.template.php file.

Yeah I realize its that easy, but I don't have FTP access to the site. I've been given full admin rights and allowed to install "some" mod's but I don't have FTP privileges and most likely wont.

BTW thanks for all your hard work with this great mod and not letting it die.

If you haven't got FTP access you can use the attached package.

EDIT:
Sorry, I have been trying to attach the package but apparently I haven't got permission to attach files here (?) so I have put it in my server instead. You can download it from here:

http://www.snoopyvirtualstudio.com/descargas/Custom.Who.template/Custom.Who.template-v0.5.zip

I have done it for my own use, so it's only compatible with SMF 1.1.11 and SMF 2 RC3 If you are using a different version let me know.

The only thing it does is to replace the original SMF Who.template.php file with the custom one published at the beginning of this thread by MoreBloodWine plus the 4 new spiders added by me.

Of course this is just a temporary solution while MoreBloodWine finish his mod. That's why I have named it version 0.5  ;)
Thx for hooking that up as a temporary solution but were assuming he can even upload packages...
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on October 26, 2010, 12:59:03 PM
Well, RCmod was asking if anybody could turn this into a mod, so I assumed he can use the Packages Manager.

Otherwise it would have no sense.  ;D
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 26, 2010, 03:15:05 PM
Quote from: snoopy_virtual on October 26, 2010, 12:59:03 PM
Well, RCmod was asking if anybody could turn this into a mod, so I assumed he can use the Packages Manager.

Otherwise it would have no sense.  ;D
True, didnt really think of his wording but hell, you never know... weirder s***s happened before lol
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: choloman05 on November 02, 2010, 11:28:06 AM
Quote from: MoreBloodWine on October 10, 2010, 07:32:21 PM
Quote from: choloman05 on October 10, 2010, 06:55:48 PM
I have 0 mods installed on a fresh installation of 2.0RC3.  I don't know why, but I get tons of errors.  The old template I was talking about did the exact same thing on various versions of SMF. 

Maybe I need to change some setting or something I'm not thinking about though.  But even disabling template evals doesn't cut down on the errors.
I honestly wish I had soemthing to tell you but I have a 1.1 live site a 1.1 test site and even a 2.0 test site and this file is all working 100% flawlessly on them without a single error in either SMF or my cPanel.

No problem. I believe you 100%, but for some reason I always got lots of errors with the old custom who.template.php and still get them with this one.  Maybe I'll figure something out and post back here in the future.  Thanks.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on November 02, 2010, 11:34:34 AM
Well, if you do find soemthing please post it here so it can be looked in to because if by some streak of weirdness someething is wrong that only affect certain people then we need to get it fixed ASAP.

Only problem with that though is finding other people with the same problem or recreating it but either way please post your findings so I can look into them ;-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: lesmond on November 15, 2010, 12:22:33 PM
I was getting a few errors in the log whenever anyone viewed who's online.

http://www.xxxxxx.co.uk/index.php?action=who
8: Undefined offset: 139
Line: 94

http://www.xxxxxx.co.uk/index.php?action=who
8: Undefined offset: 92
Line: 76


I managed to fix it.
what I had to do was add this bellow to smf 2.0 rc3

$txt[139] = 'Pages';
$txt[92] = 'View the profile of';


to the bottom of both these files index.english-utf8.php and index.english.php in the language folders of the default theme, then Empty the file cache.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on November 15, 2010, 12:37:32 PM
Ty for that, I'll have a new hosted version up by days end ;-)

Edit: I'm just gonan remove those text links all together and just hard code the text in. This way people wont need to add language string anywhere.
Quote from: lesmond on November 15, 2010, 12:22:33 PM
I was getting a few errors in the log whenever anyone viewed who's online.

http://www.xxxxxx.co.uk/index.php?action=who
8: Undefined offset: 139
Line: 94

http://www.xxxxxx.co.uk/index.php?action=who
8: Undefined offset: 92
Line: 76


I managed to fix it.
what I had to do was add this bellow to smf 2.0 rc3

$txt[139] = 'Pages';
$txt[92] = 'View the profile of';


to the bottom of both these files index.english-utf8.php and index.english.php in the language folders of the default theme, then Empty the file cache.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on November 17, 2010, 03:18:41 AM
I added a link to DL the custom Who.template.php file to the bottom of the main post and my sig. Thee links lead off site to one of my forums where the file is hosted. I took out the language strings that were giving people errors on 2.0 and just added the raw text lines so everything should be updated and ready to go. Assuming I didn't miss any which I don't believe I did I added in all of the newly named spiders by people in this post.

I would add that I tried to also remove the original file from the main post but it didn't work so if a mod could please do that for me I'd appreciate it, Ty.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: RCmod on November 17, 2010, 08:47:45 PM
Quote from: snoopy_virtual on October 26, 2010, 10:31:13 AM
Quote from: RCmod on October 25, 2010, 09:01:41 PM
Quote from: MoreBloodWine on October 24, 2010, 05:07:11 PM
Quote from: RCmod on October 24, 2010, 03:38:34 PM
I really wish someone would turn this into an actual mod that could be installed through the package manager. I went to MoreBloodWines's forum to check it out and this is exactly what I'm looking for.
One thing I am looking in to is making this a mod that more easily updatable but for the time being all you need to do is just toss this in as a replacement for your currently used Who.template.php file.

Yeah I realize its that easy, but I don't have FTP access to the site. I've been given full admin rights and allowed to install "some" mod's but I don't have FTP privileges and most likely wont.

BTW thanks for all your hard work with this great mod and not letting it die.

If you haven't got FTP access you can use the attached package.

EDIT:
Sorry, I have been trying to attach the package but apparently I haven't got permission to attach files here (?) so I have put it in my server instead. You can download it from here:

http://www.snoopyvirtualstudio.com/descargas/Custom.Who.template/Custom.Who.template-v0.5.zip

I have done it for my own use, so it's only compatible with SMF 1.1.11 and SMF 2 RC3 If you are using a different version let me know.

The only thing it does is to replace the original SMF Who.template.php file with the custom one published at the beginning of this thread by MoreBloodWine plus the 4 new spiders added by me.

Of course this is just a temporary solution while MoreBloodWine finish his mod. That's why I have named it version 0.5  ;)

Sorry guys, a little late in coming back to this thread.

THANK so much for this package! It worked great for me. You guys ROCK!
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Rob Lightbody on November 23, 2010, 02:59:34 PM
I just wanted to say thankyou.  :)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on November 23, 2010, 03:29:30 PM
Quote from: Rob Lightbody on November 23, 2010, 02:59:34 PM
I just wanted to say thankyou.  :)
Quite welcome ;-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Agent 0E on December 01, 2010, 12:35:04 PM
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.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on December 01, 2010, 06:27:27 PM
Quite welcome ;-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 18, 2011, 05:53:12 PM
 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.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on May 18, 2011, 06:02:10 PM
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.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: 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.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on May 18, 2011, 06:25:02 PM
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.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 18, 2011, 06:28:57 PM
 Stop spammer is also in my system together with httpbl :-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on May 18, 2011, 06:42:11 PM
Quote from: teos55 on May 18, 2011, 06:28:57 PM
Stop spammer is also in my system together with httpbl :-)
Lol...
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 18, 2011, 06:44:50 PM
 Forgot to mention Forum Firewall :-)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: 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...
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on May 19, 2011, 05:19:02 AM
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.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 19, 2011, 06:12:09 AM
 Thaks alot for the offer. I posted who.template.php
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on May 19, 2011, 08:54:05 AM
File posted back  ;)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 19, 2011, 09:21:34 AM
  Applied your who.template.php  and then httpbl  with no hassle. 

Thanks alot for your efforts, you're great ...
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on May 19, 2011, 09:30:27 AM
You're welcome.  ;)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 22, 2011, 06:46:56 AM
 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 :
(http://www.karavanturk.org/testkaravanturk/photos/whoisonline.png)

All the best
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on May 22, 2011, 07:17:25 AM
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;
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on May 22, 2011, 07:39:15 AM
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' : '', '">
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 22, 2011, 07:49:40 AM
 I was trying your first suggestion and now the second one, you're great.  I'll test both of them, feedback.
All the best
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 22, 2011, 07:58:34 AM
  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...
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: teos55 on May 22, 2011, 08:23:15 AM
 I combined style.css mod and seperator jpg image mod at the same time.  The result is great !!!!

This is the first time to play with style.css for me :-)  Now I do understand how it works...

Thanks a million...

Have a nice sunday ..

(http://www.karavanturk.org/photos/whoisonlinewithseperator.png)
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: snoopy_virtual on May 22, 2011, 09:03:58 AM
No problem.  ;)

You should look for a CSS tutorial on the web. There are thousands of good ones out there and it's very good to know a little of CSS to give your forum the look you want.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: AMWebby on September 06, 2012, 03:33:07 AM
Does anyone know how to make user agent info visible to other groups besides admins? I've studied the who.template.php but can't work it out.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: TheListener on September 06, 2012, 06:46:27 PM
Quote from: AMWebby on September 06, 2012, 03:33:07 AM
Does anyone know how to make user agent info visible to other groups besides admins? I've studied the who.template.php but can't work it out.

Have you looked at the permissions?
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: AMWebby on September 08, 2012, 07:21:43 AM
Quote from: Old Fossil on September 06, 2012, 06:46:27 PM
Have you looked at the permissions?
Yep. There's nothing there except "View Who's Online", which is checked.

Edit: Found it. You have to grant users the power to "Moderate forum members". As this gives them them access to an admin centre where they can register other users I think I'll pass.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: MoreBloodWine on October 10, 2012, 06:27:17 PM
Had issues with the hosted files on my site but all download links have been fixed.

I'm basically gonna copy a reply I made to someone on my site since it conveys the point I want to make here.

---------------------

Quote
Quote from: Aether on October 06, 2012, 07:26:20 AM
"No attachment found"

:|
Fixed, just need to rename the file after downloading as I added verion specific files even though there is not much different between the two. It's also been some time since I have worked on them so I cannot as of right now guarantee thy will work without bugs. At some point I plan on picking them back up and continuing work on them but for right now they should still function ok.
Title: Re: SMF 1.x & 2.x - Custom Who.template.php - Displays Users, Guests & Spiders
Post by: Impsat-1 on April 12, 2014, 05:23:35 PM
Mmm... Hey Guys, no one can do this full MOD for SMF version 2.0.7? or UpDate the original?... is a great MOD, but dont work for my forum... SMF 2.0.7 :( Thanks & Regards.... 8).-