Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Search Enhancement and Search Log conflict
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 05 May 2008 :  16:03:41  Show Profile  Visit leatherlips's Homepage
I have the search log mod installed. It has been working perfectly with the regular search.asp page that comes with Snitz. I am now trying to use the Search Enhancement mod. However, there seems to be a conflict between the two.

If I am in the search log and click the search button in the mod I get this error:

Search Results for test 
Searching Text in Subject & Message of posts made by 0 in All Forums (Non-Archived) 
Posted Between 
Microsoft VBScript runtime error '800a0005' 

Invalid procedure call or argument: 'Monthname' 

/forum/inc_func_common.asp, line 948

Line 948 in inc_func_common.asp is this (in green):

case "mmdy"
chkDate = Monthname(Mid(fDate,5,2),1) & " " & _
Mid(fDate,7,2) & " " & _
Mid(fDate,1,4)

It also does not record the search terms used on the search enhancement mod (which is the whole point of the log )

Anyone else experience this or know what the issue is?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 05 May 2008 16:07:11

leatherlips
Senior Member

USA
1838 Posts

Posted - 05 May 2008 :  21:25:08  Show Profile  Visit leatherlips's Homepage
I fixed the issue with it not logging the search terms. Here is what I did:

On line 17 of inc_searchlog.asp I changed:
strSLByMember = CInt(Request.Form("SearchMember"))
To This:
intSearchMember = getMemberID(chkString(Request.Form("SearchMember"),"SQLString"))
strSLByMember = cLng(intSearchMember)

Now I just need to fix the other issue. Any ideas?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 05 May 2008 21:25:35
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 06 May 2008 :  20:08:50  Show Profile  Visit leatherlips's Homepage
Grrr...

Well, I thought it was fixed. But now it will not log the search terms again...

Back to the drawing board. <

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 06 May 2008 :  20:28:42  Show Profile  Visit leatherlips's Homepage
Man am I goofy.

When I replaced my search_mod.asp page for a different issue I forgot to put in the necessary search log code.

It works again.

Except for my other issue in my first post.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 07 May 2008 :  03:46:46  Show Profile
Looking into your symptoms experienced with the enhanced search_mod, I managed to reproduce the error too.
Microsoft VBScript runtime error '800a0005'
Invalid procedure call or argument: 'Monthname'

When you insert a date in the 'Search for Posts Starting:' fields that does not exist ie 31 April 2008 or 31 Sept, June, 30 Feb etc.. the error occurs, changing the day to a number that is valid, then the error disappears.
Obviously the search routine on the date field is not error checking for dates that do not exist...Any clues on a fix.
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 07 May 2008 :  18:55:46  Show Profile  Visit leatherlips's Homepage
I have a work around for the problem now thanks to Andy Humm.

I have renamed my search_mod.asp file to searchforum.asp. I have kept the original search.asp page intact. I added the search log code in both of those search pages.

In inc_header.asp I pointed the Search link to the searchforum.asp page. (There were two references in inc_header.asp to search.asp and I changed them both to searchforum.asp.)

Now when someone clicks my search link they go to the searchforum.asp page.

When I view my searchlog.asp page I can see what terms were searched for in my forum. If I click the search buttons on the searchlog.asp page to get an idea of what the search results pulled they go through the original search.asp file.

I would still like to know why the search_mod.asp page does not work with the searchlog.asp page. I know it has something to do with the way the search_mod.asp page uses dates. It conflicts with the inc_func_common.asp page althought I don't think the inc_func_common.asp page is the culprit.

This was a little long winded but I wanted to post it for future reference in case others ended up having this issue. The workaround I posted above all works seamslessly together.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 07 May 2008 18:57:11
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 08 May 2008 :  04:34:05  Show Profile
To keep matters clear and avoid some confusion, please take that the original search file is called search.asp and the enhanced search page is search_mod.asp.

With this in mind, and since we [leatherlips] have discussed the fact that the search.asp seems to have to be kept in the forum directory etc., I have added the searchlog installation code to both original search.asp and search_mod.asp files and now the searchlog records the searches. Leatherlips have you included <!--#INCLUDE FILE="inc_searchlog.asp" --> under the <!--#INCLUDE FILE="config.asp"--> Search_mod.asp line 48. (just a thought - as soon as I added this the log has recorded the string searches.

In discussion and investigation with leatherlips, to try and resolve issues associated with this log and enhanced search, we opened links to the search.asp, search_mod.asp and searchlog.asp (with admin permissions set to members only) to see the symptoms etc. I have as mentioned above seem to have a working version, but noticed two additional glitches:
1. If the searchlog.asp permissions are set to members, then visiting the forum as a guest, I can still visit the search log (link in header). Is mlev is not working.
2. With a completely empty searchlog and enter a new string in the key word 'water' and the search works but viewing the results it gives two separate lines, one with a blank keyword and water as expected on the next result down. I wonder why this error is present
Any Clues please?
regards andy
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 08 May 2008 :  09:40:23  Show Profile  Visit leatherlips's Homepage
quote:
Originally posted by Andy Humm

With a completely empty searchlog and enter a new string in the key word 'water' and the search works but viewing the results it gives two separate lines, one with a blank keyword and water as expected on the next result down. I wonder why this error is present

I'm not sure, but the box where you enter the keyword has a "built" in space in it. You'll notice that when you click in it to enter your keyword it really begins in the second charachter space. I haven't figured out how to remove that space though.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 08 May 2008 :  13:42:11  Show Profile
Is there a way to focus the cursor to the first charactor space in the keywords input box, when we open the search_mod page then hopefully we can get rid of the space that is attributing to a blank searchlog result<

Edited by - Andy Humm on 08 May 2008 13:50:22
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 08 May 2008 :  16:26:16  Show Profile
I have found this script that focuses an input field on page load:
<head>
<script type="text/javascript">
function setFocus()
{
document.getElementById("fname").focus();
}
</script>

</head>

<body onload="setFocus()">
<form>
Name: <input type="text" id="fname" size="30"><br />
Age: <input type="text" id="age" size="30">
</form>
</body>


Not being a whizz with coding could this be slotted into the search_mod.asp so that the initial focus is on the keyword input field?<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 09 May 2008 :  15:20:56  Show Profile  Visit leatherlips's Homepage
I figured out how to remove the space!

In your search_mod.asp file look for:

chkString(Request.QueryString("Search"),"search")

Add the parts in red shown below:

trim(chkString(Request.QueryString("Search"),"search"))<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.28 seconds. Powered By: Snitz Forums 2000 Version 3.4.07