Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Nikola_ on October 07, 2006, 08:15:24 PM

Title: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on October 07, 2006, 08:15:24 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=487)


K-Detection: Detect OS & Browser Version
Version 2.2

This modification add OS & Browser Version in every post (it will be displayed after user custom text)

No option to turn it on or off - automatically turned on for all posts.

Supported Operating Systems: almost all :)
Supported Browsers: almost all :)

Changes log:

* Version: 2.2
  - Fixed some problems from v2.1

* Version: 2.1
  - Fixed bugs from K-Detection v2.0
  - Fully reversible (uninstalls cleanly)
  - Removed support for older version of SMF

* Version: 2.0
  - Added support for 1.1.2
  - Added Pictures of OS & Browsers
  - Install/uninstall cleanly
  - Added more OS & Browsers

* Version: 1.1
  - Added support for 1.0.6, 1.0.7, 1.0.8, 1.1 RC1, 1.1 RC2 & 1.1 RC3
  - Install/uninstall cleanly
  - Added more OS & Browsers

* Version: 1.0
  - Released for 1.0.8
  - Install/uninstall cleanly
Title: Re: K-Detection: Detect OS & Browser Version
Post by: steve in houston on October 07, 2006, 11:15:57 PM
cool idea.  ill give it a shot.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: xcrazyxfrogx on October 08, 2006, 08:30:42 PM
I installed but seems its not working i cant see anything !  :-\
Title: Re: K-Detection: Detect OS & Browser Version
Post by: nightmist on October 09, 2006, 12:16:15 AM
I installed the mod and it added a tag at the end of my posts next to the page number. This is what it adds K-Detection Mod © 2006. So now my posts look like this:

[1] [2] K-Detection Mod © 2006

Throws off my them buttons at the end of posts for reply and so on. Worst thing is I cannot even find this code. Not really happy about the idea of a mod trying to place junk like that were it shouldn't be so I uninstalled it. Cool idea but just went a little to far.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Badboy on October 09, 2006, 05:19:31 AM
Thx Great Mod. I like it much.

But there is a small problem... :)
8: Undefined index: aol
File: c:\appserv\www\forumrc2\Sources\K_Detection.php
Line: 250


To fix this (it works for me but i am not sure) :-\
Open K_Detection.php and find this
        $bd['version'] = "n";

Add after
        $bd['aol'] = "n";


And u can add this for security
Find this
/*
K-Detection v1.1 by Nikola
www.kupus.org
poslednja izmena: 04.10.2006.
*/


Add after
if (!defined('SMF'))

die('Hacking attempt...');


Thx...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on October 13, 2006, 05:46:30 PM
hi

this mod dosent work it seems

it displays nothing upon install
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on October 15, 2006, 06:23:34 AM
Quote from: akulion on October 13, 2006, 05:46:30 PM
hi

this mod dosent work it seems

it displays nothing upon install

that problem is because you do not use default smf theme for that version

you need to edit manually Display.template.php
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on October 15, 2006, 06:27:09 AM
Quote from: xcrazyxfrogx on October 08, 2006, 08:30:42 PM
I installed but seems its not working i cant see anything !  :-\

same problem as @akulion

you need to edit manually Display.template.php
because you do not use default theme for your version of forum
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Elegant John on October 15, 2006, 10:04:49 AM
I liked the idea of this mod until I got to looking at it, and looking at the website it was linked to.

Gentlemen, and gurlz, I have a major problem with anything coming out of Russia. I run a mega site discussion forum (not LONL) powered by IPB and we have been being hit with spammers and hackers from Russia and Educational institutions in China.

I would be extremely leery of anything that exhibits behavior such as this without doing as it advertises. A sad commentary of our times folks.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: !Hachi! on October 15, 2006, 11:24:30 AM
what about vista?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on October 15, 2006, 12:30:06 PM
Quote from: hassan on October 15, 2006, 11:24:30 AM
what about vista?

currently there is not Vista detection in version 1.1 but you can add it manually
find this code in file Sources/K_Detection.php
        if (eregi("Windows NT 5.1", $agent))
            $bd['platform'] = "Windows XP";

and after it add
        if (eregi("Windows NT 6.0", $agent))
            $bd['platform'] = "Windows Vista";


or you can wait because version 2.0 will be available soon
it will have more OS and Browsers even pictures of them
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on October 16, 2006, 01:33:27 AM
nope it dosent work on default for me

i always test mods on default - this one produced only 1 thing - a copyright link and in the profile template nithing showed up

dunno why
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on October 17, 2006, 12:09:09 PM
Quote from: akulion on October 16, 2006, 01:33:27 AM
nope it dosent work on default for me

i always test mods on default - this one produced only 1 thing - a copyright link and in the profile template nithing showed up

dunno why

maybe because mod do not display OS and Browser version for posts that are posted before mod has been installed (it will display OS and Browser only for new posts that are posted after mod installation)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on October 17, 2006, 12:21:47 PM
Quote from: Nikola_ on October 17, 2006, 12:09:09 PM
Quote from: akulion on October 16, 2006, 01:33:27 AM
nope it dosent work on default for me

i always test mods on default - this one produced only 1 thing - a copyright link and in the profile template nithing showed up

dunno why

maybe because mod do not display OS and Browser version for posts that are posted before mod has been installed (it will display OS and Browser only for new posts that are posted after mod installation)


oohhh so that is why
it is cool feature to have
but problem for me is i have already 1000+ members and 30000+ posts so it will look strange for old posts not to have it and new posts to have it

but no way around it either - whats posted is posted lol

thanks anyways - ill put this on any new pages i make :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: xcrazyxfrogx on October 17, 2006, 10:38:13 PM
U need to edit ur template Display.Template.php file for each theme (if it has)

look for:

Quote// Show their personal text?
                        if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
                                echo '
                                                                ', $message['member']['blurb'], '<br />
                                                                <br />';

and Add After :-

Quote//K-Detection
                         if (!empty($message['k_os']))
                      {
                        if ($message['k_os']!="n") echo '<b>OS:</b> ', $message['k_os'], '<br/>';
            
                        if ($message['k_br']!="n") echo '<b>Browser:</b> ', $message['k_br'];
            
                        if ($message['k_ver']!="n") echo ' ', $message['k_ver'], '<br/>';
            echo '<br/>';
         }                  

But strange nikola it showing The version for Old Post too lol i have installed it and it also shown up in old posts is it bad lol m confuzzled???? ! ::) ::)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on October 18, 2006, 09:28:45 AM
xcrazyxfrogx i already did that with no luck

but ill give it another try - maybe i made some error the 1st time round - so ill check - thanks
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on October 18, 2006, 12:59:46 PM
reinstalled - works but only for new posts for me, not the old ones

ill include this on my new page only when i launch it

the old page can do without it - thanks either ways :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Vinspire on October 24, 2006, 01:24:56 AM
Quote from: akulion on October 18, 2006, 12:59:46 PM
reinstalled - works but only for new posts for me, not the old ones

ill include this on my new page only when i launch it

the old page can do without it - thanks either ways :)

This mods seem to work only with the post after you've just installed the mods.

It is quite an awesome mod and i like the idea but i have to second nightmist regarding the idea of adding [1] [2] K-Detection Mod © 2006 ... It look very annoying to me so i decided to uninstall the mod.

Quote from: nightmist on October 09, 2006, 12:16:15 AM
I installed the mod and it added a tag at the end of my posts next to the page number. This is what it adds K-Detection Mod © 2006. So now my posts look like this:

[1] [2] K-Detection Mod © 2006

Throws off my them buttons at the end of posts for reply and so on. Worst thing is I cannot even find this code. Not really happy about the idea of a mod trying to place junk like that were it shouldn't be so I uninstalled it. Cool idea but just went a little to far.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Bigguy on October 24, 2006, 10:11:11 PM
Thank you I think this has fixed my error. Much appreciated. :)

Quote from: Badboy on October 09, 2006, 05:19:31 AM
Thx Great Mod. I like it much.

But there is a small problem... :)
8: Undefined index: aol
File: c:\appserv\www\forumrc2\Sources\K_Detection.php
Line: 250


To fix this (it works for me but i am not sure) :-\
Open K_Detection.php and find this
        $bd['version'] = "n";

Add after
        $bd['aol'] = "n";


And u can add this for security
Find this
/*
K-Detection v1.1 by Nikola
www.kupus.org
poslednja izmena: 04.10.2006.
*/


Add after
if (!defined('SMF'))

die('Hacking attempt...');


Thx...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Max22 on November 24, 2006, 05:44:06 PM
If I try to edit or remove copyright, when I post a message:

Fatal error: Cannot instantiate non-existent class: browser in /web/htdocs/www.eng2ita.net/home/forum/Sources/Post.php on line 1573

Why?

I've default theme, 1.1 RC3.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Vinspire on November 24, 2006, 08:28:11 PM
Quote from: Max22 on November 24, 2006, 05:44:06 PM
If I try to edit or remove copyright, when I post a message:

Fatal error: Cannot instantiate non-existent class: browser in /web/htdocs/www.eng2ita.net/home/forum/Sources/Post.php on line 1573

Why?

I've default theme, 1.1 RC3.

Why did you do that ? You are not suppose to remove the copyright i think.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Max22 on November 24, 2006, 08:38:19 PM
Quote from: Vinspire on November 24, 2006, 08:28:11 PM
Quote from: Max22 on November 24, 2006, 05:44:06 PM
If I try to edit or remove copyright, when I post a message:

Fatal error: Cannot instantiate non-existent class: browser in /web/htdocs/www.eng2ita.net/home/forum/Sources/Post.php on line 1573

Why?

I've default theme, 1.1 RC3.

Why did you do that ? You are not suppose to remove the copyright i think.

It's too much invasive.... if you confirm that the error is caused by editing/removing copyright, I prefer to not install it...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on November 24, 2006, 08:53:52 PM
I use this mod and I think the copyright is fine... just in the wrong place. It should go down near or under the SMF one.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Vinspire on November 25, 2006, 01:43:08 AM
Quote from: Max22 on November 24, 2006, 08:38:19 PM
Quote from: Vinspire on November 24, 2006, 08:28:11 PM
Quote from: Max22 on November 24, 2006, 05:44:06 PM
If I try to edit or remove copyright, when I post a message:

Fatal error: Cannot instantiate non-existent class: browser in /web/htdocs/www.eng2ita.net/home/forum/Sources/Post.php on line 1573

Why?

I've default theme, 1.1 RC3.

Why did you do that ? You are not suppose to remove the copyright i think.

It's too much invasive.... if you confirm that the error is caused by editing/removing copyright, I prefer to not install it...

I did not install the mod due to the copyright things too.

Anyway, to make sure what is the problem that had caused the error. Check ur Post.php file under the Sources folder at line 1573. :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Max22 on November 25, 2006, 03:14:03 AM
For more understanding I've added lines.

1571 //K-Detection
1572 require_once($sourcedir .'/K_Detection.php');
1573 $k_br = new Browser;
1574 $posterOptions = array(
1575 'k_os' => $k_br->Platform,
1576 'k_br' => $k_br->Name,
1577 'k_ver' => $k_br->Version,
1578 'id' => $ID_MEMBER,
1579 'name' => $_POST['guestname'],
1580 'email' => $_POST['email'],
1581 'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on November 25, 2006, 04:27:22 AM
Line 1573 is making a call to an undefined class. So one of the files somewhere else is missing the class "Browser"
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Max22 on November 25, 2006, 11:49:31 AM
Quote from: Jacen on November 25, 2006, 04:27:22 AM
Line 1573 is making a call to an undefined class. So one of the files somewhere else is missing the class "Browser"

In K_Detection.php:

<?php
/*
K-Detection v1.1 by Nikola
www.kupus.org
poslednja izmena: 04.10.2006.
*/

class browser
{

    var 
$Name "n";
    var 
$Version "n";
    var 
$Platform "n";
    var 
$UserAgent "Not reported";
    var 
$AOL false;

    function 
browser(){
        
$agent $_SERVER['HTTP_USER_AGENT'];


In post.php there is:
$k_br = new Browser;
In K_Detection.php:
class browser
Title: Re: K-Detection: Detect OS & Browser Version
Post by: mark25 on November 26, 2006, 03:46:19 AM
i like this mod... but i want it to show in the who's online list? ;)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on December 04, 2006, 06:06:43 AM
1.1 Final is out :D

Looking forward to the 1.1 compatible mod :D
Title: Re: K-Detection: Detect OS & Browser Version
Post by: DaveSmooth on December 29, 2006, 11:08:27 AM
Any idea how to manually uninstall this mod?  It doesn't appear in the Package Manager so I can't unistall it that way.  It appears to have completely hose my site, not allowing mew posts to be made and giving database errors.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on December 29, 2006, 12:23:39 PM
try puting ;version_emulate=1.1 in the package manager address bar(browsers address bar) and see if it appears

Title: Re: K-Detection: Detect OS & Browser Version
Post by: DaveSmooth on December 29, 2006, 12:58:00 PM
Nope.  And actually it doesn't appear in the Packages directory via FTP.  I believe one of my admins installed it and I don't see record of it.  Any way you know of to manually uninstall it?  I see a big problem being is that it wrote to the database, and I get errors now telling me my database and this error appears when a new post is attempted:

Database Error
Unknown column 'k_os' in 'field list'
File: /home/content/d/a/v/davesmooth/html/smf/Sources/Post.php
Line: 1303

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.9, whereas your database is at version SMF 1.0.7. It is recommended that you execute the latest version of upgrade.php.

Any thoughts?   Anything you can help with would be greatly appreciated.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on December 29, 2006, 03:05:36 PM
manually uninstallin it will require u to undo all the chanes the XML file did


<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">

<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>Nikola:K-Detection</id>
<version>1.1</version>

<file name="$sourcedir/Post.php">
<operation>
<search position="replace"><![CDATA[
$posterOptions = array(
'id' => $ID_MEMBER,
]]></search>

<add><![CDATA[
//K-Detection
require_once($sourcedir .'/K_Detection.php');
$k_br = new Browser;
$posterOptions = array(
'k_os' => $k_br->Platform,
'k_br' => $k_br->Name,
'k_ver' => $k_br->Version,
'id' => $ID_MEMBER,
]]></add>
</operation>

</file>

<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="replace"><![CDATA[
// Insert the post.
db_query("
INSERT INTO {$db_prefix}messages
(ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, modifiedName, icon)
VALUES ($topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
SUBSTRING('$posterOptions[ip]', 1, 255), " . ($msgOptions['smileys_enabled'] ? '1' : '0') . ", '', SUBSTRING('$msgOptions[icon]', 1, 16))", __FILE__, __LINE__);
$msgOptions['id'] = db_insert_id();
]]></search>

<add><![CDATA[
//K-Detection
// Insert the post.
db_query("
INSERT INTO {$db_prefix}messages
(k_os, k_br, k_ver,
ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, modifiedName, icon)
VALUES ('$posterOptions[k_os]', '$posterOptions[k_br]', '$posterOptions[k_ver]',
$topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
SUBSTRING('$posterOptions[ip]', 1, 255), " . ($msgOptions['smileys_enabled'] ? '1' : '0') . ", '', SUBSTRING('$msgOptions[icon]', 1, 16))", __FILE__, __LINE__);
$msgOptions['id'] = db_insert_id();
]]></add>
</operation>

</file>

<file name="$sourcedir/Display.php">
<operation>
<search position="replace"><![CDATA[
$messages_request = db_query("
SELECT
ID_MSG, icon, subject, posterTime, posterIP, ID_MEMBER, modifiedTime, modifiedName, body,
smileysEnabled, posterName, posterEmail,
]]></search>

<add><![CDATA[
$messages_request = db_query("
SELECT
ID_MSG, icon, subject, posterTime, posterIP, ID_MEMBER, modifiedTime, modifiedName, body,
smileysEnabled, posterName, posterEmail, k_os, k_br, k_ver,
]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[
'body' => $message['body'],
]]></search>

<add><![CDATA[
'body' => $message['body'],
'k_os' => $message['k_os'],
'k_br' => $message['k_br'],
'k_ver' => $message['k_ver'],
]]></add>
</operation>
</file>

<file name="$themedir/Display.template.php">
<operation>
<search position="replace"><![CDATA[
// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';
]]></search>

<add><![CDATA[
// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';
//K-Detection
if (!empty($message['k_os']))
{
if ($message['k_os']!="n") echo '<b>OS:</b> ', $message['k_os'], '<br/>';

if ($message['k_br']!="n") echo '<b>Browser:</b> ', $message['k_br'];

if ($message['k_ver']!="n") echo ' ', $message['k_ver'], '<br/>';
echo '<br/>';
}
]]></add>
</operation>

<operation>
<search position="replace"><![CDATA[
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '</td>
]]></search>

<add><![CDATA[
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '
<small>K-Detection Mod &copy; 2006, <a href="http://kupus.org" target="_blank">kupus.org</a> K-Team</small></td>
]]></add>
</operation>
</file>

<!--
<operation>
<search position="replace"><![CDATA[
old data
]]></search>

<add><![CDATA[
new data
]]></add>
</operation>
-->

</modification>


its a headache but this is how u go about it:
wherever it says:
<file name="$sourcedir/Post.php"> (the file to look in)
<operation>
<search position="replace"><![CDATA[ (search for the text specified here)
<add><![CDATA[ (following this is the text that was added - so u remove that only)
hope that helps out - it wil be a long process but in ur case essential
Title: Re: K-Detection: Detect OS & Browser Version
Post by: DaveSmooth on December 29, 2006, 05:20:36 PM
Got it fixed, but not that route.  I dug around and found a backup Post.php file, and replaced it.  Posting is now enabled again on my site and now I can dig through the file and remove the changes done by this ****ed up Mod!!   This mod should be removed from SMF from every bad review/comment I've read here regarding it.  Just my opinion.  Plus the Mod makers site isn't even in English, not too good when you have a problem with the Mod.   Oh well, live and learn.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on December 30, 2006, 09:10:23 PM
Quote from: DaveSmooth on December 29, 2006, 05:20:36 PM
Got it fixed, but not that route.  I dug around and found a backup Post.php file, and replaced it.  Posting is now enabled again on my site and now I can dig through the file and remove the changes done by this ****ed up Mod!!   This mod should be removed from SMF from every bad review/comment I've read here regarding it.  Just my opinion.  Plus the Mod makers site isn't even in English, not too good when you have a problem with the Mod.   Oh well, live and learn.

Mod works perfectly.
and theres no crime in the site not being english.

Just because one person had a problem, doesn't mean it's a bad mod.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on December 31, 2006, 05:13:54 AM
hey come on Dave man Go easy.
Every mod has problems with some user or the other.
Its unfortunate it didnt work for you but still the idea for the mod is pretty good one. Some bugs may need to be ironed out but dont diss it totally man :P
Title: Re: K-Detection: Detect OS & Browser Version
Post by: DaveSmooth on December 31, 2006, 10:26:20 AM
Maybe I'm a bit harsh, but I still can't get rid of the copyright that this has put all over my site. 
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on January 01, 2007, 04:11:26 AM
It's a single line.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gobo on January 01, 2007, 11:49:02 AM
finr this is display.template.php


<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '
<small>K-Detection Mod &copy; 2006, <a href="http://kupus.org" target="_blank">kupus.org</a> K-Team</small></td>



and replace it with this:

<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '</td>


remember always make a backup of the file before making any code changes
Title: Re: K-Detection: Detect OS & Browser Version
Post by: crash3903 on January 02, 2007, 09:20:01 AM
This does not appear in my packages list to install - Any ideas why?

Thanks

Mark
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Shinigami on January 25, 2007, 11:02:05 AM
Quote from: crash3903 on January 02, 2007, 09:20:01 AM
This does not appear in my packages list to install - Any ideas why?

Thanks

Mark
If you have SMF 1.1.1 it will not work to install, because:
Quote from: SMF Mod Site
Compatible With:     1.0.6, 1.0.7, 1.0.8, 1.1 RC1, 1.1 RC2, 1.1 RC3
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on January 26, 2007, 06:24:11 AM
Can't you force compatibility mode for the install, as I'm sure there weren't many API changes between RC3 and 1.1.1.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: xfollowthereaperx on February 11, 2007, 09:50:26 AM
Please make it compatible with 1.1.1

I've seen people do it but I'm not sure how
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on March 04, 2007, 11:37:27 PM
You can open the package and edit it's index file... but if there were API changes between the two SMF versions, it won't work properly
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on March 10, 2007, 10:19:37 AM
new version of mod compatible with smf 1.1.2 is available for download
+ browser & os detection have higher accuracy now and pictures are added
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Greek on March 11, 2007, 10:00:46 AM
Is it working with 1.1.1?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on March 12, 2007, 04:48:35 AM
I'd say so... but why are you still using 1.1.1?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Greek on March 12, 2007, 07:21:48 AM
Because I can't upgrade. I get errors.
I tried to install manually the new version of K-Detection (I have the old one), but I get errors.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on March 12, 2007, 07:38:59 AM
Quote from: Greek on March 12, 2007, 07:21:48 AM
Because I can't upgrade. I get errors.
I tried to install manually the new version of K-Detection (I have the old one), but I get errors.

Continuing as you are will just make matters worse...the errors should be fixed not ignored.

Here's how I'd do it:

Create a new test forum bases on SMF 1.1.2 (or latest version for those who may read this at a later date).

Add to it, one by one, all the latest versions of the mods you want to use. If there isn't a version of a mod for the latest SMF version posted to the SMF mod page then check the postings on this forum to see if a member has been kind enough to make one available. If there still isn't one available consider altering the package yourself to make it compatible with the latest SMF version or asking others to do it if you can't do so for yourself or abandoning that mod for the time being.

Once that is done:

Back up all your files and database from your live forum...backup the files from the test forum minus <forum root>/settings.php and <forum root>/settings_bak.php

Copy the back up of the test forum files onto the live forum files overwriting as you go.

At the end of this you will have a fresh set of files of the latest SMF version running your live forum...by preserving the settings files you will have kept your install details intact.

I know it's a chore but it's far better to fix errors than to ignore them.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Jacen on March 12, 2007, 11:10:42 AM
You still have to run upgrade.php and if there are errors in the database, taht will fail


Have you tried using the package manager to upgrade?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Greek on March 12, 2007, 11:27:16 AM
1. It's right what you say about test forum, copy etc. But I have made many custom changes manually and i cannot remember all of them  ;)

2. There is no upgrade file in latest version of this mod. I tried to install it manually, but without results.

However I have installed this mod in test forum 1.1.2. and works fine. But the problem is my normal forum 1.1.1  :( 
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on March 12, 2007, 01:03:18 PM
 As regards your custom manual changes it just goes to show what a good set of documentation and, perhaps, a change log can do for you...sadly it's a bit late now though in your case.

You will have to upgrade your forum sometime, as I expect you realise...so why not bite the bullet and do it now?

If I were you I'd compare your live forum files to a clean installation of SMF 1.1.1 using a differencing engine...software that looks for the differences in two, similar, files and highlights them. It's a useful programming method in any event.

Use whatever differencing engine takes your fancy but if you don't have one and want a free item look at http://winmerge.org/ (http://winmerge.org/) it's Open Source and certainly well able to help in your current situation.

The differencing engine will show you what changes you made and I would think you will be easily able to identify most of them and allocate them to particular mods. Your custom codes will then stand out and can be managed and transferred (if appropriate) to your fresh install of SMF 1.1.2

Title: Re: K-Detection: Detect OS & Browser Version
Post by: Roysen on March 17, 2007, 05:23:06 PM
Great mod but badly written.
I got this i my error log:
Quote8: Use of undefined constant br_ico - assumed 'br_ico'
Fil: /customers/xxxxxxx.com/xxxxxxx.com/httpd.www/forum/Sources/Post.php
Linje: 1561
This is the part of the code:
Quote//K-Detection
   require_once($sourcedir .'/K_Detection_v2.php');
   $k_detected = K_Detection($_SERVER['HTTP_USER_AGENT']);
   $posterOptions = array(
      'k_os' => $k_detected[os],
      'k_br' => $k_detected
,
      'k_os_ico' => $k_detected[os_ico],
      'k_br_ico' => $k_detected[br_ico],
      'id' => $ID_MEMBER,
      'name' => $_POST['guestname'],
      'email' => $_POST['email'],
      'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],
   );
Its also bad that the only part of of my website that not W3 validate is the output fro K-detection.
Quote# Error  Line 215 column 312: required attribute "alt" not specified.

..._Detection/icon_suse.png" align="top"> Linux (Suse)<br/><b>Browser:</b> <br/>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Roysen on March 17, 2007, 05:30:17 PM
To get rid of the annoying error in the log i changed the code to this:
Quote
   //K-Detection
   require_once($sourcedir .'/K_Detection_v2.php');
   $k_detected = K_Detection($_SERVER['HTTP_USER_AGENT']);
   $posterOptions = array(
      'k_os' => $k_detected['os'],
      'k_br' => $k_detected['br'],
      'k_os_ico' => $k_detected['os_ico'],
      'k_br_ico' => $k_detected['br_ico'],
      'id' => $ID_MEMBER,
      'name' => $_POST['guestname'],
      'email' => $_POST['email'],
      'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],
   );
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Gourgi on March 19, 2007, 05:23:43 AM
First of all thanks for the mod Nikola_.
Had some errors in SMF 1.1.2 but fixed it with the code provided above by Roysen (many thanks ;) )

I don't bother by the copyright but i also think that it is in a very wrong place.
Any chance of moving this to another side of the forum (e.g. bottom) ???
Title: Re: K-Detection: Detect OS & Browser Version
Post by: !Hachi! on March 19, 2007, 06:21:04 AM
is it necessary?come on please....we know about your work but i really hate to add link for each mod.we know its depends on author totally but i request to remove it.
regards.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: maximax77 on March 20, 2007, 06:33:21 PM
Hi !
i love this mod but i have some errors in SMF log...
Errors in post.php were fixed by Roysen tricks but i still have erros in Subs-post.php.

When i move messages to another sections, i get this for each vars :


8: Undefined index: k_br
Fichier: /home/ovh/www/forum/Sources/Subs-Post.php
Ligne: 1536


So i'm wondering how to avoid K-Detection proc when moving messages...

Best regards from France...

PS : Sorry for my bad english.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: nafishasan60 on March 30, 2007, 08:47:15 AM
the mode installed successfully for me. But there is no changes in my page.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: MrPrise on April 02, 2007, 12:49:43 PM
Great mod. I tried it today. It would be nice to show nothing beside the old posts instead of the OS:Unknown and Browser: Unknown
Title: Re: K-Detection: Detect OS & Browser Version
Post by: MrPrise on April 03, 2007, 05:10:24 PM
Fix for the unknown "bug":

Find this after install the mod in the Display.template.php:

//K-Detection
if (!$message['k_os']){$message['k_os'] = 'unknown'; $message['k_os_ico'] = 'unknown';}
if (!$message['k_br']){$message['k_br'] = 'unknown'; $message['k_br_ico'] = 'unknown';}

echo '<b>OS:</b> <br/> <img src="' . $settings['images_url'] . '/K_Detection/icon_', $message['k_os_ico'], '.png" align="top"> ', $message['k_os'], '<br/>';
echo '<b>Browser:</b> <br/> <img src="' . $settings['images_url'] . '/K_Detection/icon_', $message['k_br_ico'], '.png" align="top"> ', $message['k_br'], '<br/>';


and change the above with that:

if ( ($message['k_os']) &&  ($message['k_br']) )
{
echo '<b>OS:</b> <br/> <img src="' . $settings['images_url'] . '/K_Detection/icon_', $message['k_os_ico'], '.png" align="top"> ', $message['k_os'], '<br/>';
echo '<b>Browser:</b> <br/> <img src="' . $settings['images_url'] . '/K_Detection/icon_', $message['k_br_ico'], '.png" align="top"> ', $message['k_br'], '<br/>';
}
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on April 03, 2007, 06:56:24 PM
For me, I'm not getting the images, because they seem to be "Themes/default/images/K_Detection/icon_.png", which is clearly wrong.

Any ideas?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TTP on April 07, 2007, 08:48:41 PM
hi..

i cant aply this mod :

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Post.php    Test successful
2.    Execute Modification    ./Sources/Subs-Post.php    Test failed
3.    Execute Modification    ./Sources/Display.php    Test failed

4.    Execute Modification    ./Themes/default/Display.template.php    Test successful
5.    Extract File    ./Sources/K_Detection_v2.php    
6.    Extract Tree    ./Themes/default/images/K_Detection    
7.    Execute Code    db_install_2.php    

Please help..i use default theme and update version

Thank
Title: Re: K-Detection: Detect OS & Browser Version
Post by: cekcok on April 15, 2007, 09:24:14 AM
well i have same problem like TTP !
please give me some solution

Thank you
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Badboy on April 24, 2007, 07:15:05 AM
New version works well...

But i think Nikola_ missed something :)

Open post.php

The code below
'k_os' => $k_detected[os],
'k_br' => $k_detected[br],
'k_os_ico' => $k_detected[os_ico],
'k_br_ico' => $k_detected[br_ico],


Must be replaced with this one
'k_os' => $k_detected['os'],
'k_br' => $k_detected['br'],
'k_os_ico' => $k_detected['os_ico'],
'k_br_ico' => $k_detected['br_ico'],


Thx...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: K0H_K1u on April 30, 2007, 08:01:21 PM
Come on i cant wait till 3.0!
Title: Re: K-Detection: Detect OS & Browser Version
Post by: FelixofMars on May 02, 2007, 06:20:58 PM
sorry wrong thread, don't know how that happened (Removed Post)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on May 03, 2007, 06:35:39 PM
K-Detection v2.1 published!
* download (http://custom.simplemachines.org/mods/index.php?mod=487)

I fixed bugs and I hope you will not see this mod on error report page anymore
I also removed support for older smf versions

p.s. for those who have problems during installation:
try to install mod on fresh smf installation (without other mods)
or install mod manually
Title: Re: K-Detection: Detect OS & Browser Version
Post by: oreo1684 on May 04, 2007, 09:01:52 PM
Quote from: maximax77 on March 20, 2007, 06:33:21 PM
Hi !
i love this mod but i have some errors in SMF log...
Errors in post.php were fixed by Roysen tricks but i still have erros in Subs-post.php.

When i move messages to another sections, i get this for each vars :


8: Undefined index: k_br
Fichier: /home/ovh/www/forum/Sources/Subs-Post.php
Ligne: 1536


So i'm wondering how to avoid K-Detection proc when moving messages...

Best regards from France...

PS : Sorry for my bad english.
i have also the same problem before. This is what I did...

open sources/MoveTopic.php look for...
$posterOptions = array(
'id' => $ID_MEMBER,
'update_post_count' => !empty($pcounter),
);


replace it with...
//K-Detection
require_once($sourcedir .'/K_Detection_v2.php');
$k_detected = K_Detection($_SERVER['HTTP_USER_AGENT']);
$posterOptions = array(
'id' => $ID_MEMBER,
'update_post_count' => !empty($pcounter),
'k_os' => $k_detected['os'],
'k_br' => $k_detected['br'],
'k_os_ico' => $k_detected['os_ico'],
'k_br_ico' => $k_detected['br_ico'],
);
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Thug life on May 05, 2007, 10:51:51 AM
This caused problems for me with the user template, it showed the starts going sideways instead of downwards.

I had to remove all template related things from the sql database just to get it back to normal.

Other than that its a nice little mod ;)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on May 15, 2007, 07:35:21 PM
It says Unknown next to the browser and os and wont change, even after having it installed for 3 days.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on June 22, 2007, 07:30:25 PM
Ok nevermind about the post above^. I read it and said it doesn't work with posts before this mod. Well is there some kind of query or anything I can do to make it show?!?!?! It is kind of an annoying little thing for some posts like this and the others like this ;)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on June 22, 2007, 09:10:17 PM
In a word NO. The browser and OS information is collected at the time of posting and then only if the mod is installed at that time thus older postings won't have had that information collected for them and there will be no way you can extract information that doesn't exist.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on June 23, 2007, 06:15:10 PM
hmmm. if somehow I enter a query for each and every user and know what browser and os they're using is there something i can do?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on June 23, 2007, 06:37:48 PM
Given that I happen to know that you use Tiny Portal I'm somewhat surprised to see you use this mod...have you considered the following Tp block instead?

In a phpbox:

global $user_info;

echo '<div class="smalltext"><b>Browser:</b> '.$_SERVER['HTTP_USER_AGENT'].'<br />';
echo '<b>IP:</b> '.$user_info['ip'].'<br />';
echo '<b>Last visit:</b> '.timeformat($user_info['last_login']).'</div>';


This would show your members their own details without having to put them in your database and thus not having db queries involved...and probably giving an improved page load speed.

Your original query asked if you could get browser and OS detail from past sessions of member activity...do what you will the data isn't going to have been stored prior to your adding this mod so you can't extract it. Post installing this mod the mod will do it for you thus your question doesn't really add an extra possibility.

If your wish is to give your members information but not store it then the TP block is probably a better solution for you...if you wish to store information about their browser and OS choice then this mod is the better option.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on June 23, 2007, 06:42:22 PM
I like this mod because it displays in posts and shows images. :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: MostTimeOnline on June 30, 2007, 09:03:49 PM
Hey, this mod isn't compatibile with SMF 1.1.3. It can't install (I assume it's due to version 1.1.3. and this mod is for 1.1.2)

When there will be an upgrade available?

I need it ASAP...


Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on June 30, 2007, 09:35:04 PM
Quote from: MostTimeOnline on June 30, 2007, 09:03:49 PM
Hey, this mod isn't compatibile with SMF 1.1.3. It can't install (I assume it's due to version 1.1.3. and this mod is for 1.1.2)

When there will be an upgrade available?

I need it ASAP...

OK, if it's that urgent...I haven't tested it so use at your own risk...compatibility update for SMF 1.1.3.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: MostTimeOnline on June 30, 2007, 10:05:45 PM
It works!

Thank you very very much! :)

Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on July 01, 2007, 06:04:04 AM
My pleasure.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: ManilaGurL on July 03, 2007, 05:17:43 AM
Please make an upgrade for version 1.1.3. Thanks!
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on July 03, 2007, 05:20:00 AM
Quote from: ManilaGurL on July 03, 2007, 05:17:43 AM
Please make an upgrade for version 1.1.3. Thanks!

Please read the topic before posting. See one of my previous replies a few above your last posting.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: aZa on July 16, 2007, 01:14:39 PM
Are the Nokia Browsers supported ???
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Ashdaw on July 28, 2007, 09:20:20 AM
I added this mod to a FRESH install of SMF 1.1.3 ( i did a little mod inside the Package-info. xml and added version 1.1.3). I have had NO trouble with it as long as the default theme is used. If I try another theme (CSClassic) it shows a place holder and text, even has the link as my theme/K-detection folder but, no pic. :(

I looked at the DisplayTemplate. php in the Default and it has the right changes in there but still, no crossover for my CS theme. Can someone give me a clue as to what I am doing wrong?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on July 28, 2007, 09:32:41 AM
If the images aren't showing up, doublecheck you have that K-detection folder inside your themes image files or theme directory.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Ashdaw on July 28, 2007, 09:52:56 AM
Thanks BrianJW, my silly FTP programme uploaded all of the files as 0 size ? oh well. :D
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on July 28, 2007, 12:38:27 PM
You're welcome. Yeah, Ftp's aren't always accurate when uploading stuff - today I uploaded a zip file in ftp and when I ran the zip file it came up in weird letters and stuff but I redid it and it worked.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: karlbenson on July 28, 2007, 12:49:24 PM
I'd like to see the storing of the os/browser be on the members table rather than on each post.

It would take up a hell of alot less space on the database on large forums.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on July 28, 2007, 01:04:59 PM
Thanks Karl,

Nikola_ is working on a new version so I'll make sure your request is considered (no promises as to outcome.)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: karlbenson on July 28, 2007, 01:17:26 PM
I thought I should see if the idea catches on.

I was going to write one like this myself, to show the icon of the users browser and/or os in the whosonline.
Unfortunately unless the browser field is loaded into the $user_info as part of the membergroup row, its impossible.

As I said to me it makes no sense to have it stored on a per post and having not-detected for all the posts pre-installing of the mod.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nikola_ on July 28, 2007, 02:53:04 PM
Quote from: aZa on July 16, 2007, 01:14:39 PM
Are the Nokia Browsers supported ???

yes they are.

@karlbenson maybe I will add some statistics...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nolt on August 03, 2007, 02:37:51 AM
Hello. This mod is cool but I'm useing an unstable linux and K_Detections says unknow OS. How can I fix it ?

//solved I dont know why but after few new updates of my linux, K_Detections detects :P my OS
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on August 04, 2007, 02:20:58 PM
If you're using a custom theme you have to add the code in there. Glad you got it working ;)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Bigdove1 on August 09, 2007, 04:59:38 PM
hello has all,

installation of the v2.2 on smf 1.1.3 of very new test without MOD.

Os Xp and Linux Ubuntu ok,
Firefox ok
but I have a concern with the recognition of IE, I have two PC in Ie7, and K-detection recognize them to me like version 6.
however old script recognized me well IE 7 front.
Have you to it even problem???

Tanks
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Bigdove1 on August 10, 2007, 04:40:43 PM
Hello while waiting for a response for the problem with MSIE, I am to manufacture a patch v112 worm v2.2 to avoid losing the data on the messages.

And that functions at home on a clean forum in smf 1.1.3 good on. I pose it here while waiting for that the owner of K-detection checks it.

has later
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Bigdove1 on August 13, 2007, 08:14:57 AM
Hello,
I has just discovered a bug:

when I move Topic I have 4 error in the newspaper of error of the administrator part.

Quote8: Undefined index: k_br_ico
Fichier: /Sources/Subs-Post.php
Ligne: 1564
8: Undefined index: k_os_ico
Fichier: /Sources/Subs-Post.php
Ligne: 1564
8: Undefined index: k_br
Fichier: /Sources/Subs-Post.php
Ligne: 1564
8: Undefined index: k_os
Fichier: /Sources/Subs-Post.php
Ligne: 1564

has later
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Black Knight Cro on August 22, 2007, 12:42:31 PM
thx brianjw on that information now is working pictures for os and browser :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on August 22, 2007, 04:09:09 PM
You're welcome. Just a simple step you have to do.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: SudeeraJ on August 25, 2007, 11:58:45 AM
Superb Mod,
Thanx!!!
Title: Re: K-Detection: Detect OS & Browser Version
Post by: BlueMan on September 19, 2007, 04:31:53 AM
Fantastic !!

Make update also on http://custom.simplemachines.org/mods/index.php?mod=487
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Kevan King on September 23, 2007, 01:18:50 AM
When I upload this and then go to install it the Install link/button does not or is not showing up. ANy thoughts?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on September 23, 2007, 05:45:54 AM
By the sound of it you uploaded via ftp...not the best way to do it.

You need to go to ACP>Server Settings and set your forum language to English and not English utf8 and to ACP>Features and Options>Basic Settings and uncheck Enable user-selectable language support.

You need to go to ACP>Packages>Options>Installation Options and set the fields according to your hosting details then on the same page go to Cleanup Permissions and select All files Writeable and run the cleanup...check via ftp that CHMOD of all your files is now 777 or 775 according to the peculiarities of your hosting and if not recheck the settings you made in Installation Options and run the cleanup again...continue as needed until you get the right settings.

Next backup both your files and your database as you should prior to installing or uninstalling any mod or theme. Now go to ACP>Packages>Download Packages and use that to upload the mod to your site. Now you should be able to install it in the normal way providing your SMF version is on the list of those supported by this mod.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Kevan King on September 23, 2007, 12:40:33 PM
What, it is English and I have over 25 Mods installed and they work fine so why would one or two mods not show something as simple as the Install text...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on September 23, 2007, 12:58:43 PM
Some mods don't contain support for English utf8...it isn't a requirement. If you set your forum language to English utf8 they won't work properly.

I took the trouble to go through the whole process for you as your original reply suggested that you hadn't used the Package Manager to install the mod but had probably ftp'd it instead.

I made the further effort to detail how the mod might not show up as installable if the version of SMF you are using isn't supported by the mod...had you used the Package  Manager that would have prevented an unsupported mod being added.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Apllicmz on September 23, 2007, 11:44:02 PM
she not work 113
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on September 24, 2007, 04:15:26 AM
You can use it on newer SMF versions at your own risk (I've tested it and had no problems) by using version emulate:

Put ;emulate_version=1.1.2 at the end of the Package Manager URL

Version emulate is SMF's preferred way to handle mods for older SMF versions than the one you have.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: BlueMan on September 27, 2007, 04:44:49 AM
This mod dont have the (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdebian.linux.pl%2Ftemplates%2Fdeox%2Fimages%2Fuser_agent%2Ficon_mozilla.gif&hash=cbd8b3a5e54b489f5f1626bb50fb2236a6054f61) Iceweasel browser which users use insted of FireFox.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on September 27, 2007, 09:32:45 AM
I am not guaranteeing the following will work but I have attached k detection mod and I added the iceweasel browser to it. (not tested)

Brianjw
Title: Re: K-Detection: Detect OS & Browser Version
Post by: ksawery on October 08, 2007, 05:20:35 PM
Any version works with 1.1.4?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: ksawery on October 10, 2007, 08:18:07 AM
Yes! It works with a little modification... ;)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: shumar on October 15, 2007, 11:28:49 AM
What modification ?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: juanpons14 on October 15, 2007, 12:56:40 PM
yes what modification please put it here
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on October 15, 2007, 02:18:26 PM
Edit the package info file to include SMF 1.1.4....that's the modification. You can avoid having to do this by using version emulate.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: juanpons14 on October 15, 2007, 04:59:01 PM
yes I know but in my theme i see in all people the image unknown what happended??
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on October 15, 2007, 09:16:24 PM
You will need to manually edit the mod into a custom theme; this mod, like almost all mods, only installs automatically into the SMF Default theme.

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: juanpons14 on October 16, 2007, 03:59:14 AM
no i'm sorry i have to reply in my forum to appear and oooo the images appear an error mine sorry
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Black Knight Cro on November 10, 2007, 08:17:20 PM
can you post mod for 1.1.4?
and btw i delete the mod and he is still there,just it says unknown.How do i delete also that?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on November 11, 2007, 04:47:40 AM
Had you searched this forum you would have found answers to your problem have been posted a great many times.

Rather than asking for a new version you can simply use the version emulate system on the current version to get it to work on SMF 1.1.4

The way emulate version works is that you go to the SMF mods site and find the page for the mod you wish to use...or go to the first post in the support topic for it here where a link will be found. From that page you will find the last SMF version that the mod supports. This mod supports SMF 1.1.3 thus that is the last version in this instance. You would then add  &emulate_version=1.1.3 to the end of the package manager url in your forum. By this I mean use the ACP>Packages>Download browse to the package and then add the &emulate_version=1.1.3 to the URL prior to downloading the package into your forum.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on November 14, 2007, 08:11:21 PM
Ok, I've updated this mod to install and uninstall 1.1, 1.1.1, 1.1.2, 1.1.3, and 1.1.4.
You can download it in the bottom of my post.

Download File:
file removed by brianjw
Please use the emulate trick - see post below.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on November 14, 2007, 08:31:34 PM
@ Brianjw

Have you asked the mod developer's permission? As you know SMF staff have requested that we don't update mods for active developers (the developer of this mod is an active developer) but instead suggest use of version emulate.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on November 14, 2007, 08:55:39 PM
I haven't asked his permission, so it's removed until further notice. :)

Ok, so is there anyway to make the mod show up the images... I just re-installed it and really don't want some posts having the images and some not - I will just remove the mod otherwise but thats my opinion... There's got to be some way - theres someway to everything :P
Title: Re: K-Detection: Detect OS & Browser Version
Post by: TrueSatan on November 14, 2007, 09:07:09 PM
The developer is working on a new version and is likely to take on board such requests for it...probably not prior to full release of SMF 2.0 I would guess.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on December 30, 2007, 02:05:27 PM
How difficult might it be to make this recognise 64-bit versions of XP and Vista?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Bigguy on December 31, 2007, 03:31:29 AM
It is possible that will be out with the next version but wait to hear from the mod author for sure.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on December 31, 2007, 06:11:35 AM
Will-do.

I wondered if simply adding a couple of line of code might do that.

I'll wait for an update.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.augk18.dsl.pipex.com%2FSmileys%2Fthankyou.gif&hash=e71e4d6ce781ff6d77a29d873933f34736f38aad)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on February 13, 2008, 09:32:50 AM
Could anyone help - I was wondering how to change the 4 colour XP icon for a round Vista icon in this mod when the operating system shown is in fact Vista (does that make sense :-S).

Current XP icon;

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ft-hill.com%2Fimages%2Fvista999.jpg&hash=b399bffd4d7679244d7ebb8e1b7aedfcb802c68a)

Vista icon example;

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ft-hill.com%2Fimages%2Fvisbut1.jpg&hash=6d3aa381e19bfff0aa78a6652d26d37b79b08897)

Thanks
Sg
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on February 13, 2008, 08:32:37 PM
In /Themes/default/images/K_Detection/
you will find the images. If you wanted to change it. I think just rename the file "icon_win_new.png" to "icon_win_new1.png" and upload that vista icon as "icon_win_new.png" (no quotes at all) and all this located in the folder listed at top of post.

Edit: I cannot wait until this mod can store users information in a database so every time I do site maintenance it all just goes away. This way there would be no question marks on posts.

brianjw
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on February 14, 2008, 06:12:53 AM
Ok - That is of help and thanks for the quick reply. I should have mentioned that I want to keep the original XP icon for XP users but add the new round Vista icon for Vista users. I should have said that from the start, sorry. ;D

I've attached the correctly sized transparent Vista icon. (png)

Thanks for any help anyone can give.

Regards
Sg
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on February 14, 2008, 05:23:14 PM
Sorry. I don't think I can help with that bit...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Nibogo on February 16, 2008, 06:57:46 PM
this mod works with smf 1.1.4?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on February 16, 2008, 09:31:41 PM
Not currently. If you search the topic with the keyword "emulate" or "1.1.4" you might find some results.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on March 17, 2008, 04:41:59 AM
I was pretty good at footy and boxing.
So this emulate thing is beyond me!!
I did exactly what was mentioned, and it uploaded fine.
Then when I clicked install, the error message about how it doesnt support this version of smf etc popped up.
Tried this 4 times..

Sorry, I can be a rusty nail at times, but a mod should never be this difficult to apply!!

Brianjw..
Could you check your PM please mate :)

EDIT:
Its late and Im grumpy..
Soz for the lil rant :D

Brilliant mod Nikola_
I look forward to your update.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on March 17, 2008, 10:55:15 AM
I replied to your PM. ;)

Those of you who want to see this mod updated, PM me. I am not allowed to post the file updated in public without the authors permission, but it's private in PM's. :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on March 17, 2008, 05:21:21 PM
Thanks mate..

Installed easily without a hitch.
Thought something in the display.php was playing up, as I had to install that part manually(mine was different due to soo many other adds), and my OS and Browser were shown as unknown.
Then remembered, it only reads from the posts done from now on. lol..

Hopefully the author finds a way to cover this, as there are soo many showing as unknown.

Thank You very much  :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on March 17, 2008, 07:55:22 PM
Quote from: Spudgun on February 14, 2008, 06:12:53 AM
I want to keep the original XP icon for XP users but add the new round Vista icon for Vista users.

Rename the vista icon something like :  icon_win_v
Then upload it to where you have the images stored.. 
It is usually    Themes/default /images/ K_Detection/        unless you have moved them.

Then go into the K_Detection_v2.php, and look for this line
        $k_detected['os'] = "Windows Vista";
        $k_detected['os_ico'] = "win_new";


And change where it says     "win_new"      to      "win_v"
So now it looks like this
        $k_detected['os'] = "Windows Vista";
        $k_detected['os_ico'] = "win_v";


And there you have it.
Enjoy..  and thank you for the image :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on March 24, 2008, 07:29:49 AM
That worked great. Thanks very much for the easy to follow support. :)

I have attached the correct size vista icon if anyone else wants to use it.

Kind Regards
Spudgun.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: ***Teh GodFather*** on March 26, 2008, 04:47:21 PM
Is there a list of browsers and OS's which mod recognizes?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on March 26, 2008, 06:11:14 PM
Heres a list of the icons within.
It shows which OS & browsers this supports.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg518.imageshack.us%2Fimg518%2F6744%2F23967333ux0.png&hash=5b9e2c4fe785e73f20f9711c6684ba6de47d8a06)

Hmmm..   Sorry, the image shrunk.
If you grab this mod, you can look in the images folder. :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: cleanfiles on May 25, 2008, 06:46:20 PM
Would really like a version of this for smf 1.1.4  or 1.1.5. which I will be upgrading to very soon if somebody has one. :)
I have tried adding "&emulate_version=1.1.3" to the Url when uploading from my machine to no avail, it still tells me wrong version blah blah. Maybe I'm doing it wrong, there isn't clear instruction on how to use this "&emulate_version=1.1.3" trick.
Anyways would love to use this mod, but maybe its not meant to be..........
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on May 25, 2008, 07:48:13 PM
I've gotten MANY pm requests for this mod updated for version 1.1.X. The developer hasn't been back to update it, so I figured I would post it. Nothing is changed, other than compatibility with SMF 1.1.X.
The developer would probably be okay with it anyway...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: cleanfiles on May 25, 2008, 07:54:32 PM
Works like a charm thanks brianjw, and I agree this needs to be available to all smf users.
:)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: ignas2526 on June 16, 2008, 09:40:44 AM
nice script  8) can someone help me to make from it just os and browser detector, who can work just in any php?
Coz im not using SMF, i want add this to PHP-Fusion  :P
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on July 09, 2008, 01:43:17 PM
I'm using v2.0. Ought I remove that before installing v2.2?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: AlenNS on July 10, 2008, 12:03:43 PM
Will developer make it compatible for SMF 2.0 Beta 3.1 public?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on July 13, 2008, 05:03:03 PM
Quote from: Kat on July 09, 2008, 01:43:17 PM
I'm using v2.0. Ought I remove that before installing v2.2?

Pretty-please?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: cro_4ng3l on July 17, 2008, 09:24:00 PM
theme is a bit old but brijanw, can you send me too please...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on July 18, 2008, 10:30:34 PM
Quote from: cro_4ng3l on July 17, 2008, 09:24:00 PM
theme is a bit old but brijanw, can you send me too please...
What SMF version are you wanting this for? 1.1.5?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: ManilaGurL on July 20, 2008, 06:47:29 AM
Will this work for SMF 1.1.5?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: AlenNS on July 20, 2008, 06:58:05 AM
I've tried once on 1.1.5 and didn't make it.
It really would be great if developer could make it compatible with newer version of SMF like 2.x.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: x YaraSi x on July 21, 2008, 05:46:36 AM
Unknown column 'k_os' in 'field list'
Dosya: /home/www/yournett.com/forum/Sources/Display.php
Satır: 804

What's problems?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on September 05, 2008, 09:54:09 AM
Hi All

I created and attached some vista icons for all to use on page 7 of this thread;

I was wondering if anyone had or could create some Chrome (Google's new browser) icons/icon for me/us to add to this great mod.

Any help would be greatly appreciated. ;)

Kind regards
Spudgun.

P.s. I've re-attached the correctly sized transparent Vista icon I made for all to use. (png)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on September 05, 2008, 10:33:45 AM
OK, I've made one myself - This should do the trick. I've attached a (Google) Chrome browser icon (png) that should work well with this mod.

Does anyone know how to add Chrome browser to the list so it detects Chrome (SMF 1.1.5 code). Any help would be great. 8)

Regards
Spudgun.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on September 05, 2008, 12:43:48 PM
I spent a couple minutes with this, an actual coder would be able to do it properly, but this is what I added.

    // Chrome
    if(preg_match('/mozilla.*applewebkit.*chrome\/([0-9a-z\+\-\.]+).*/si', $user_agent, $tmp_array) && !$k_detected['br'])
      {
      $k_detected['br'] = "Chrome" . ($tmp_array[1] ? " ".$tmp_array[1] : "");
      $k_detected['br_ico'] = 'chrome';
      }


It displays Chrome, but also displays the version number.
So it looks like this

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg65.imageshack.us%2Fimg65%2F6597%2F95393753ba7.png&hash=462f2ca4faa13d7a8fbf614bc9338407ea13afb1)

Hopefully that helps for now, until someone does it properly :)
Thanks once again for the image :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on September 05, 2008, 01:01:22 PM
That looks pretty neat to me Sabre™. 8) The version number looks great.

Thanks very much for the code.

all done;

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.t-hill.com%2Fimages%2Fchrome.jpg&hash=f902219883ffe7a8bd49ec8387ce590205e37df5)

Regards
Spudgun.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: AlenNS on September 05, 2008, 01:32:31 PM
Can someone make this mod for SMF 2.0 Beta 3.1?
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on September 05, 2008, 05:11:08 PM
I am trying to convince [SiNaN] to take over this mod and make it so it actually stores the browser info in the member information tables and not in the messages tables because then it could be a different os/browser per message. I personally want to see the one the user has most recently used on all the messages. :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on September 05, 2008, 05:24:10 PM
That would be progress - I'd love to see that too - Thanks for all your hard work - I for one appreciate it ;)

Spudgun.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on September 05, 2008, 06:50:24 PM
Quote from: brianjw on September 05, 2008, 05:11:08 PM
I am trying to convince [SiNaN] to take over this mod and make it so it actually stores the browser info in the member information tables and not in the messages tables because then it could be a different os/browser per message. I personally want to see the one the user has most recently used on all the messages. :)

Hopefully [SiNaN] does take it up. He really knows his shhhh.....  lol
I actually enjoy how it stores the information the users had at that time of posting.
You/they witness a sort of progression or experimentation of OS and/or browsers. Kind of like a short history ;)
But I'd still enjoy this mod either way :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on September 05, 2008, 09:24:38 PM
Well, [SiNaN] is smart lol. He can make an option in the profile either way. ;D
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on September 05, 2008, 09:47:09 PM
LOL yeah, he definitely knows what hes doing, and always helps people out.
Lets see what happens
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Enc0der on September 07, 2008, 09:44:07 AM
Quote from: AlenNS on July 20, 2008, 06:58:05 AM
It really would be great if developer could make it compatible with newer version of SMF like 2.x.
Agree.

I have a support forum in which the user's OS and browser are sometimes important, and this mod becomes very useful.
I am planning on upgrading to SMF 2 soon (probably on beta4 or RC1), and it's a shame that this mod will not be compatible.. :(
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Impsat-1 on September 07, 2008, 10:58:40 PM
Uhhh... hey Guys can do This MOD for SMF v1.1.5 or Advanced???, Please is the great MOD & good utilities... Thanks, please made for advanced version's, thanks & regards... Enjoy SMF!!! 8).-
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Enc0der on September 08, 2008, 12:25:56 AM
SMF 2.0 beta 4 has released today (sweet!!!), please make this mod compatible...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Spudgun on September 12, 2008, 12:57:57 PM
Quote from: Nahuel-1 on September 07, 2008, 10:58:40 PM
Uhhh... hey Guys can do This MOD for SMF v1.1.5 or Advanced???, Please is the great MOD & good utilities... Thanks, please made for advanced version's, thanks & regards... Enjoy SMF!!! 8).-

Hi - I believe this mod already installs and works on SMF 1.1.5 / 1.1.6 ;) My forum has the mod running fine on SMF 1.1.6 anyway.

Regards
Spudgun
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Enc0der on September 12, 2008, 01:15:51 PM
still begging for a 2b4 version.. :P
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Impsat-1 on September 15, 2008, 02:23:42 AM
Wow... yeaaa, Excellent Work... work fine, Thanks... 8).-

Regards
Nahuel-1

Enjoy SMF!!! ;)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on October 01, 2008, 03:42:17 AM
Quote from: Enc0der on September 12, 2008, 01:15:51 PM
still begging for a 2b4 version.. :P


Yeap :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: AlenNS on October 23, 2008, 09:48:25 AM
Give us this mod for Beta 4. :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on November 20, 2008, 05:02:01 PM
Just to report that clicking on the K-Detection link that appears on the forum, now leads to a hardcore pr0n site.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 20, 2008, 05:07:13 PM
Quote from: Kat on November 20, 2008, 05:02:01 PM
Just to report that clicking on the K-Detection link that appears on the forum, now leads to a hardcore pr0n site.

Which link do you refer to?
I clicked the "link to mod" link, and it did its job, the only other link I see is to download it.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on November 20, 2008, 05:12:41 PM
The one that appears on topic pages, at the bottom, just marked "K-Detection".

The site is h++p://viwo.eu/

It appears in the SMF default theme's display.template.

I just removed the line with the url in and the one above it.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 20, 2008, 05:22:43 PM
hmmm thats strange.
Ive never had such a link install on any of my installations of this mod(4 sites running it),
and have just looked at the code it inserts into the display template, and there is no link to any site added.
Actually, on any template.
The only template I havent checked, is K_Detection_v2.php, but only because I see no call to it for a link.

I would ask if I can take a peek at your site, but you've removed it anyway lol
Glad you sorted it out though  ::)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Enc0der on November 20, 2008, 05:28:21 PM
I believe you (Kat) simply have a Trojan in your PC, that adds this.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 20, 2008, 05:29:59 PM
Was thinking along "similar" lines
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on November 20, 2008, 06:03:17 PM
Nope. the link's in the original install files.

</operation>

<operation>
<search position="replace"><![CDATA[
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '</td>
]]></search>

<add><![CDATA[
<td class="middletext">', $txt[139], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . ' &nbsp;&nbsp;<a href="#top"><b>' . $txt['topbottom4'] . '</b></a>' : '', '
<small><a href="http://viwo.eu">K-Detection</a> &copy; 2007</small></td>
]]></add>
</operation>
</file>


from mod_install_112.xml in version 2.0 of the mod.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on November 20, 2008, 06:11:38 PM
Yes, that link was in the previous versions of this mod. I think it is removed in the latest.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: kat on November 20, 2008, 06:19:05 PM
I've had the mod for ages, but never clicked on the link, before.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: LOVELORD on November 29, 2008, 07:45:46 AM
How to add a Google Chrome in list of browser... I Try sometnihg but it didn't work???
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 29, 2008, 02:51:45 PM
Use the search function, and it will show you a temporary suggestion on the previous page.
It was added a while ago, so Im unsure whether it still works.
But you can try.
Good luck :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: villasg on November 29, 2008, 03:06:50 PM
Hello all
This mod like very good
I want to know the 2.2 work in the smf 1.1.7
and this http://mods.simplemachines.org/index.php?mod=487 have all the previus inside ( chrome , vista etc ? )
If the answer is YES and NO can someone upload the last mod ..

Thanks
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on November 29, 2008, 03:12:43 PM
Just to inform you that I have created a mod which does the same thing as K-Detection, but for SMF 2.0, though it's still waiting to be approved. All the latest detections are included (Chrome, the new Ubuntu, etc).
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 29, 2008, 03:16:54 PM
Quote from: villasg on November 29, 2008, 03:06:50 PM
I want to know the 2.2 work in the smf 1.1.7

No

Quote from: villasg on November 29, 2008, 03:06:50 PM
and this http://mods.simplemachines.org/index.php?mod=487 have all the previus inside ( chrome , vista etc ? )

No

Quote from: villasg on November 29, 2008, 03:06:50 PM
can someone upload the last mod ..

Someone may upload an updated version with the added edits.
I have to fix a few things on my board, then I will apply this to my new site.
If noone has uploaded an updated package, then I will add mine until asked to remove it.
It may be tomorrow.

Quote from: villasg on November 29, 2008, 03:06:50 PM
Thanks

No probs :)


Quote from: X3mE on November 29, 2008, 03:12:43 PM
Just to inform you that I have created a mod which does the same thing as K-Detection, but for SMF 2.0, though it's still waiting to be approved. All the latest detections are included (Chrome, the new Ubuntu, etc).

AWESOME!!
Good job X3mE.
I was hoping someone would carry this over.
+k
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on November 29, 2008, 03:23:26 PM
Quote from: Sabre™ on November 29, 2008, 03:16:54 PM
Quote from: X3mE on November 29, 2008, 03:12:43 PM
Just to inform you that I have created a mod which does the same thing as K-Detection, but for SMF 2.0, though it's still waiting to be approved. All the latest detections are included (Chrome, the new Ubuntu, etc).

AWESOME!!
Good job X3mE.
I was hoping someone would carry this over.
+k

Hehe, thanks :)

I desperately wanted this on my forums, so I decided to do it myself instead of waiting for an update (an there hasn't been one for a long time).
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 29, 2008, 03:29:01 PM
Yeah brilliant.
Many people will be glad you've done so.
Could you possibly add the Ubuntu and chrome edits here(if chrome is different to what I added on the previous page), so I can add it to the 1.1.7 package Im going to upload?
Or even better, if you have more time than I, could you add an updated 1.1.7 package here?

If you cannot at this time, its all good mate.
Cheers if you can do either :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on November 29, 2008, 03:37:08 PM
Here is Chrome:

    // Chrome
    if(preg_match('/mozilla.*applewebkit.*chrome\/([0-9a-z\+\-\.]+).*/si', $user_agent, $tmp_array) && !$client_data['browser'])
      {
      $client_data['browser'] = "Chrome" . ($tmp_array[1] ? " ".$tmp_array[1] : "");
      $client_data['browser_icon'] = 'chrome';
      }


And here is the complete if-else structure for Linux (including Ubuntu versions):

    // Linux
    if(preg_match('/linux/si', $user_agent) && !$client_data['system'])
      {
      $client_data['system'] = "Linux";
      $client_data['system_icon'] = "linux";
      if(preg_match('/mdk/si', $user_agent))
        {
        $client_data['system'] .= " (Mandrake)";
        $client_data['system_icon'] = "mandrake";
        }
      elseif(preg_match('/kanotix/si', $user_agent))
        {
        $client_data['system'] .= " (Kanotix)";
        $client_data['system_icon'] = "kanotix";
        }
      elseif(preg_match('/lycoris/si', $user_agent))
        {
        $client_data['system'] .= " (Lycoris)";
        $client_data['system_icon'] = "lycoris";
        }
      elseif(preg_match('/knoppix/si', $user_agent))
        {
        $client_data['system'] .= " (Knoppix)";
        $client_data['system_icon'] = "knoppix";
        }
      elseif(preg_match('/centos/si', $user_agent))
        {
        $client_data['system'] .= " (CentOS)";
        $client_data['system_icon'] = "centos";
        }
      elseif(preg_match('/gentoo/si', $user_agent))
        {
        $client_data['system'] .= " (Gentoo)";
        $client_data['system_icon'] = "gentoo";
        }
      elseif(preg_match('/fedora/si', $user_agent))
        {
        $client_data['system'] .= " (Fedora)";
        $client_data['system_icon'] = "fedora";
        }
      elseif(preg_match('/ubuntu/si', $user_agent))
        {
        // Which *ubuntu do we have?
        if(preg_match('/kubuntu/si', $user_agent))
          {
          $client_data['system'] .= " (Kubuntu";
          $client_data['system_icon'] = "kubuntu";
          }
        elseif(preg_match('/xubuntu/si', $user_agent))
          {
          $client_data['system'] .= " (Xubuntu";
          $client_data['system_icon'] = "xubuntu";
          }
else
          {
          $client_data['system'] .= " (Ubuntu";
          $client_data['system_icon'] = "ubuntu";
          }
        // Try to detect version
        if(preg_match('/intrepid/si', $user_agent))
          {
          $client_data['system'] .= " 8.10 Intrepid)";
          }
        elseif(preg_match('/hardy/si', $user_agent))
          {
          $client_data['system'] .= " 8.04 LTS Hardy Heron)";
          }
        elseif(preg_match('/gutsy/si', $user_agent))
          {
          $client_data['system'] .= " 7.10 Gutsy Gibbon)";
          }
        elseif(preg_match('/ubuntu.feist/si', $user_agent))
          {
          $client_data['system'] .= " 7.04 Feisty Fawn)";
          }
        elseif(preg_match('/ubuntu.edgy/si', $user_agent))
          {
          $client_data['system'] .= " 6.10 Edgy Eft)";
          }
        elseif(preg_match('/ubuntu.dapper/si', $user_agent))
          {
          $client_data['system'] .= " 6.06 LTS Dapper Drake)";
          }
        elseif(preg_match('/ubuntu.breezy/si', $user_agent))
          {
          $client_data['system'] .= " 5.10 Breezy Badger)";
          }
        else
  {
          $client_data['system'] .= ")";
  }
        }
      elseif(preg_match('/slackware/si', $user_agent))
        {
        $client_data['system'] .= " (Slackware)";
        $client_data['system_icon'] = "slackware";
        }
      elseif(preg_match('/suse/si', $user_agent))
        {
        $client_data['system'] .= " (Suse)";
        $client_data['system_icon'] = "suse";
        }
      elseif(preg_match('/redhat/si', $user_agent))
        {
        $client_data['system'] .= " (Redhat)";
        $client_data['system_icon'] = "redhat";
        }
      elseif(preg_match('/debian/si', $user_agent))
        {
        $client_data['system'] .= " (Debian)";
        $client_data['system_icon'] = "debian";
        }
      elseif(preg_match('/PLD\/([0-9.]*) \(([a-z]{2})\)/si', $user_agent, $tmp_array))
        {
        $client_data['system'] .= " (PLD".($tmp_array[1] ? " ".$tmp_array[1] : "").($tmp_array[2] ? " ".$tmp_array[2] : "").")";
        $client_data['system_icon'] = "pld";
        }
      elseif(preg_match('/PLD\/([a-zA-Z.]*)/si', $user_agent, $tmp_array))
        {
        $client_data['system'] .= " (PLD".($tmp_array[1] ? " ".$tmp_array[1] : "").")";
        $client_data['system_icon'] = "pld";
        }
      }


Variable names are different because I used the original Web Browser Identifier script made by Marcin Krol.

I'm a little short with time right now (I have an exam tomorrow, lol :D), but if no one creates an updated package I'll do it the day after tomorrow.
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on November 29, 2008, 03:45:10 PM
Brilliant mate.
I'll just wait for your updated package then lol
Im pretty swamped as it is myself.

Good luck on your exam  8)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on November 29, 2008, 03:51:37 PM
Ok, I wasn't planing to implement 1.1.7 support (as all my boards are now on 2.0b4), but I'll do it as part of my mod. Hope it will be approved in the meantime, so I could add it to the mods site as well (it's been more than 10 days since submission).


Quote from: Sabre™ on November 29, 2008, 03:45:10 PM
Good luck on your exam  8)

Thanks, I'll definitely need it :D
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on November 29, 2008, 09:39:46 PM
Glad to see this mod is being taken over. I think this K-Detection should be put in the archived mod sections soon. Doesn't seem like the mod author is coming back anytime soon and from my opinion, no permissions should need to be asked to port this to 2.0.

EDIT: The mod author isn't even using SMF anymore on his site. Looks like he's using vB
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on December 06, 2008, 09:57:15 AM
And here it is: http://custom.simplemachines.org/mods/index.php?mod=1515
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Ashdaw on January 03, 2009, 05:32:18 AM
Was good that you took on the Update for this mod. I have it (K Detection) on Version 1.1.7 and it seems to work ok but when I tried to put your one on it refused to allow me to. :(
Title: Re: K-Detection: Detect OS & Browser Version
Post by: Sabre™ on January 04, 2009, 03:03:56 PM
Maybe best to post in [THIS] (http://www.simplemachines.org/community/index.php?topic=278770.0) thread buddy :)
Title: Re: K-Detection: Detect OS & Browser Version
Post by: caryb on January 20, 2009, 12:47:27 AM
My site was hacked the only damage is if you hover over the K_Detection link it brings up a porn site! I cant uninstall it either! My SMF version is 1.1.7 & SMF v2.0 What is my best recourse?


Cary
Title: Re: K-Detection: Detect OS & Browser Version
Post by: X3mE on January 20, 2009, 11:42:52 AM
You can't uninstall K-Detection or can't remove the link? The link should be in BoardIndex or Display.template.php...
Title: Re: K-Detection: Detect OS & Browser Version
Post by: brianjw on January 20, 2009, 08:01:34 PM
Quote from: caryb on January 20, 2009, 12:47:27 AM
My site was hacked the only damage is if you hover over the K_Detection link it brings up a porn site! I cant uninstall it either! My SMF version is 1.1.7 & SMF v2.0 What is my best recourse?


Cary
Just upload SMF Large Upgrade over your current website. Doing this will wipe out ALL mods. So you will have to reinstall them. However, doing this will also keep your Members, Posts, Boards, and DATA safe. ;)

This topic might as well be locked as there is a new mod replacing its function. Could a moderator possibly lock this topic as an outdated mod?