[2.0.15] View User Agent

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
0
No votes
Very Good
2
50%
Good
1
25%
Fair
0
No votes
Poor
1
25%
 
Total votes: 4

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Sun Jun 26, 2005 1:53 pm

MOD Updated to version 1.0.4
See first post for Download Link

tomythius
Registered User
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK
Contact:

Post by tomythius » Sun Jun 26, 2005 10:21 pm

New version out, security update.
Tom says so, QED.

kulinar
Registered User
Posts: 651
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar » Mon Jun 27, 2005 6:18 am

Any update file or instructions from previous version?

tomythius
Registered User
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK
Contact:

Re: Security

Post by tomythius » Mon Jun 27, 2005 12:19 pm

To update change line 225 of the mod file:

Code: Select all

"USER_AGENT" => $guest_agent,
should be changed to:

Code: Select all

"USER_AGENT" => htmlspecialchars($guest_agent),
and line 209 of the mod file:

Code: Select all

"USER_AGENT" => $reg_agent,
should be changed to:

Code: Select all

"USER_AGENT" => htmlspecialchars($reg_agent),
Tom says so, QED.

kulinar
Registered User
Posts: 651
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar » Mon Jun 27, 2005 12:27 pm

10x, I already did that changes :oops:

LoisCK
Registered User
Posts: 2
Joined: Wed Jun 29, 2005 2:57 am

Post by LoisCK » Wed Jun 29, 2005 4:01 am

Thanks- I like mods like this one. :)

User avatar
The Suite
Registered User
Posts: 617
Joined: Sat Jul 30, 2005 11:11 am
Location: NYC, USA
Contact:

Post by The Suite » Thu Sep 01, 2005 2:07 am

This is a good MOD, good job :-)
Much appreciloved,

The Suite
Thank you :-)
The IT Security Information Center

kulinar
Registered User
Posts: 651
Joined: Thu Feb 17, 2005 7:31 pm
Contact:

Post by kulinar » Thu Sep 01, 2005 8:52 am

A small issue:

Code: Select all

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	<td width="20%" class="{reg_user_row.ROW_CLASS}"><span class="gen">{reg_user_row.USER_AGENT}</span>&nbsp;</td>#
should be

Code: Select all

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	<td width="20%" class="{reg_user_row.ROW_CLASS}"><span class="gen">{reg_user_row.USER_AGENT}</span>&nbsp;</td>
because a '#' appears for every user in forums.

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny » Mon Jan 09, 2006 5:22 pm

tomythius wrote:
kulinar wrote: in my sessions.php file the code is

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
						SET session_time = $current_time, session_page = $thispage_id$update_admin

I don't see this in my source, and it looks badly formed. Have you already modded sessions.php?
kulinar wrote: which means the new code will look like that

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
						SET session_time = $current_time, session_page = $thispage_id, session_agent = $agent$update_admin
which looks strange to me :roll:

How is one more strange than the other? Both end with two variables next to each other.


I do not understand about badly formed!?
Code has been change from 2.0.14 to 2.0.15"

FIND
Code:

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
                  SET session_time = $current_time, session_page = $thispage_id 
REPLACE WITH
Code:

Code: Select all

// A little trick to reset session_admin on session re-usage 
               $update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', session_admin = 0' : ''; 

               $sql = "UPDATE " . SESSIONS_TABLE . " 
                  SET session_time = $current_time, session_page = $thispage_id$update_admin
I do not understand what is strange and what actually need to be changed and how because originally author make me confuse with badly formed (and it is actually originally code form phpBB):
Is this correct?

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
                  SET session_time = $current_time, session_page = $thispage_id$update_admin, session_agent = $agent 
or this?

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
                  SET session_time = $current_time, session_page = $thispage_id, session_agent = $agent$update_admin
Last edited by deny on Mon Jan 09, 2006 6:19 pm, edited 1 time in total.
Geolocation of any IP address including detection of hostname,
browser, country and country code with ip address range web tool.

IP Address Locator | Email Tracking | IP Address | Check Email

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3479
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Mon Jan 09, 2006 5:25 pm

Are you saying that your using phpBB 2.0.15? The current version is 2.0.19. You should upgrade immediately.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny » Mon Jan 09, 2006 5:33 pm

bonelifer wrote: Are you saying that your using phpBB 2.0.15? The current version is 2.0.19. You should upgrade immediately.


Nope.I use 2.0.19 but author make me confuse with comment
I don't see this in my source, and it looks badly formed. Have you already modded sessions.php?


about not recongizning this part of code:

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
                  SET session_time = $current_time, session_page = $thispage_id$update_admin

(and same code exist from 2.0.15 version.Version 2.0.14 use older code):

So i did ask what need to be changed above and how.
Author probably released code for version 2.0.14 and forget to update his release to fit later version of phpBB (from 2.0.15 - 2.0.19)
Geolocation of any IP address including detection of hostname,
browser, country and country code with ip address range web tool.

IP Address Locator | Email Tracking | IP Address | Check Email

tomythius
Registered User
Posts: 74
Joined: Sat May 28, 2005 3:05 pm
Location: Queniborough - Leicester - UK
Contact:

Post by tomythius » Mon Jan 09, 2006 7:21 pm

I'll look into it.
To be honest my board has evolved past that point now, but I'll do my best.
Tom says so, QED.

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny » Mon Jan 09, 2006 7:45 pm

I did evaluated but was not very satisfied with way how this addon works.
It seems that this code works:

Code: Select all

$sql = "UPDATE " . SESSIONS_TABLE . " 
                  SET session_time = $current_time, session_page = $thispage_id$update_admin, session_agent = $agent 

But for example it fail to show me some strange user-browser.For example:

Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)

or

Mozilla/4.0 (compatible; MSIE 5.00; Windows 95)

It display just blanco lines.Comparing to Advanced Ip Tools pack that show all user-agents this mod sometime display blanco lines.

http://www.phpbb.com/phpBB/viewtopic.ph ... ptoolspack
Geolocation of any IP address including detection of hostname,
browser, country and country code with ip address range web tool.

IP Address Locator | Email Tracking | IP Address | Check Email

User avatar
Toho_NL
Registered User
Posts: 206
Joined: Fri Jun 16, 2006 2:31 pm
Location: The Netherlands

Post by Toho_NL » Wed Jul 26, 2006 4:46 pm

I just installed this MOD on phpBB 2.0.21 with EasyMOD 0.3.0 and it is working perfectly! Thanks for the MOD!

Best regards,

Toho_NL.

ppcsurfr
Registered User
Posts: 4
Joined: Mon Aug 07, 2006 11:52 pm

Post by ppcsurfr » Tue Nov 07, 2006 9:27 am

I've been able to redirect my forum to a mobile version via user agent string detection... what I want to do now is to be able to post a little note at the bottom of the poster's message if he/she posts using a mobile device.

Example:
Here is a sample message posted using a Windows Mobile device using the mobile version of phpBB.

Posted using a Windows Mobile device.


Never mind... I figured it out and wrote the mod for it... :P
Last edited by ppcsurfr on Tue Nov 07, 2006 4:50 pm, edited 1 time in total.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”