Author |
Topic |
|
lsakizada
New Member
USA
90 Posts |
Posted - 08 August 2003 : 02:49:46
|
Hi,
I have this problem when clicking on a link to ClassifiedViewAds.asp from active_users.asp page. e.g clicking on "Current Page" == ClassifiedViewAds.asp if there is other active user browsing the ClassifiedViewAds.asp.
The error is: Syntax error in line 98 which is:
96 gsSQL = "Select ID, Topic_ID, ad_title, price, image_url, added_By, address, city, zip, state, email, date_posted, " 97 gsSQL = gsSQL & "link, content FROM " & strTablePrefix & "ADS_CONTENT WHERE Topic_ID = " & catID & " ORDER BY date_posted DESC" 98 Set rs = my_Conn.Execute(gsSQL)
I am using MSSql server.
Any help...?
|
|
lsakizada
New Member
USA
90 Posts |
Posted - 08 August 2003 : 03:12:58
|
To reproduce the error above just do: 1. login as guest (not registered) 2. Go to classifiedviewads.asp 3. from this page login as a register user 4. link to the main forum -> Active Users page. 5. Click on classViewAds link (under Current Page category)
You should have the error.
I am suspecting that the CatId variable is null.
Please help me out. |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 08 August 2003 : 07:47:15
|
I don't have the classified mod so that I can test this, but I'll try to help you anyway. If you look at the url on the AU page, does it contain a value for catID?
You might have to customize the WhatPage-function used by AU to properly retrieve the catID. |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
lsakizada
New Member
USA
90 Posts |
Posted - 08 August 2003 : 14:59:56
|
No it does not contain the catID parameter. There is "not nice" workaround when calling to this page without the catID parameter (See bellow). But what’s happening is that the actual page that the guest user is looking at it does not display to the user who clicked on the ClassifiedViewAds link.
I guess every one who’s using the Active User mod should run some test for all pages existing on the web site especially for pages whos retrieving parameters from the application object.
But I would appreciate any suggestion how to link to the actual page.
|
|
|
lsakizada
New Member
USA
90 Posts |
Posted - 08 August 2003 : 15:03:57
|
oops i forgot to write the workaround: The workaround is to assign hard coded catID value. So the link wont break. Somthing like
If (catID ="") then catId = 1 end if
But I guess its not a solution to get the actual page that the user was looking at it. |
|
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 08 August 2003 : 21:12:33
|
I might be able to fix this up for you, but unfortunately Im unable to do this until next week. Which Classified mod (if several exists) are you using (a link to were I can download it would be great)? |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
lsakizada
New Member
USA
90 Posts |
|
masterao
Senior Member
Sweden
1678 Posts |
Posted - 11 August 2003 : 15:51:52
|
I haven't been able to test the following, so it might not work without some additional changes (but I hope it will work as it is).
Important!! Before you do any changes to your existing files, backup active_users.asp and LangMODS_Ls3kAU4_1033.asp.
When you have done the backup, you can continue with the changes.
This requires you to add new code to two pages, active_users.asp and LangMODS_Ls3kAU4_1033.asp.
active_users.asp
Add the following to the WhatPage-function found in active_users.asp. Look for the following:
case else
strPage = strPage & Mid(fScript, 1, instr(fScript, ".")-1)
end select
strPage = strPage & "</a>"
if lcase(instr(fscript, "admin_")) > 0 Then
strPage = fLang(strLangMOD_Ls3kAU_01380)
end if
WhatPage = strPage
end function
Add the following before the code above:
case "ClassifiedViewAds.asp"
strQuery = fQuery
fClassCatID = analyzeQuery(strQuery, "CatID")
if fClassCatID = "" then
strPage = fLang(strLangMOD_Ls3kAU_01270)
else
strSql = "SELECT ad_title FROM " & strTablePrefix & "ADS_CONTENT WHERE Topic_ID=" & fClassCatID
set rst = my_conn.execute(strSql)
if rst.EOF or rst.BOF then
strPage = fLang(strLangMOD_Ls3kAU_01270)
rst.close
set rst = nothing
else
fSubject = rst("ad_title")
rst.close
set rst = nothing
end if
end if
strPage = fLang(strLangMOD_Ls3kAU_01610) & "<br><a href=""ClassifiedViewAds.asp?" & fQuery & """>" & fSubject
LangMODS_Ls3kAU4_1033.asp
The next addition is in LangMODS_Ls3kAU4_1033.asp. Look for the following:
'#### Other pages ####'
strLangMOD_Ls3kAU_01600 = "Checking Private Messages"
Add the following directly after that:
strLangMOD_Ls3kAU_01610 = "Viewing Classified:" |
Jan =========== FR Portal Forums | Active Users 4.0.20 Mod |
|
|
lsakizada
New Member
USA
90 Posts |
Posted - 17 August 2003 : 20:42:07
|
Thanks masterao! I did not have the chance to test it yet, but certainly will be tested. regards! |
|
|
masterao
Senior Member
Sweden
1678 Posts |
|
|
Topic |
|