The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
This little mod adds a variable "strLocale" to the forum. The variable holds the actual country a visitor is in based upon IP lookup. I added it to the pending member registration but it can be used anywhere.
نوشته شده در
carefree i think there is a small "error" in the read me file in the inc_header.asp kim
آخرین ویرایش توسط
نوشته شده در
I had to replace the symbols with gt & lt to prevent it interpreting them, sorry about that.
نوشته شده در
نوشته شده در
You're welcome.
نوشته شده در
Hi,
Once I include the inc_locale.asp in the header page I get the following error.
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/tyco/forum/inc_locale.asp, line 3
My Locale.asp hasn't been changed from the code that was downloaded. Line 3 ends up being the Set rsLocale line
I have followed all the steps in the instructions. All 4 database mods were run.
Once I include the inc_locale.asp in the header page I get the following error.
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/tyco/forum/inc_locale.asp, line 3
My Locale.asp hasn't been changed from the code that was downloaded. Line 3 ends up being the Set rsLocale line
Code:
<%
strSql="SELECT IPSTART, IPEND, IPCOUNTRY FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & Request.ServerVariables("Remote_Addr") & "' AND IPEND >= '" & Request.ServerVariables("Remote_Addr") & "'"
Set rsLocale= my_Conn.Execute(strSql)
If NOT (rsLocale.BOF or rsLocale.EOF) Then
strLocale=rsLocale("IPCOUNTRY")
rsLocale.Close
End If
Set rsLocale = Nothing
%>I have followed all the steps in the instructions. All 4 database mods were run.
آخرین ویرایش توسط
نوشته شده در
Let me know what the output is after doing this:
Code:
After this line:
strSql="SELECT IPSTART, IPEND, IPCOUNTRY FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & Request.ServerVariables("Remote_Addr") & "' AND IPEND >= '" & Request.ServerVariables("Remote_Addr") & "'"
Insert these lines:
Response.Write strSql
Response.End
نوشته شده در
After adding those lines to inc_locale.asp all pages now return the following text.
SELECT IPSTART, IPEND, IPCOUNTRY FROM FORUM_IPTOCOUNTRY WHERE IPSTART <= '24.149.253.241' AND IPEND >= '24.149.253.241'
That is the IP I currently have on my client.
SELECT IPSTART, IPEND, IPCOUNTRY FROM FORUM_IPTOCOUNTRY WHERE IPSTART <= '24.149.253.241' AND IPEND >= '24.149.253.241'
That is the IP I currently have on my client.
نوشته شده در
Well, that should work. The issue must be that Image has removed the My_Conn definition.
Before line 3, insert this:
Before line 3, insert this:
Code:
set my_Conn = Server.CreateObject("ADODB.Connection")
نوشته شده در
I will try that, thanks. Makes sense. Will get back to you later this week, have bigger fish to fry right now. Appreciate the help and suggestions.
Email Member
Message Member
Post Moderation
بارگزاری فایل
If you're having problems uploading, try choosing a smaller image.
پیشنمایش مطلب
Send Topic
Loading...