Active InfoActive Info  Display List of Info MembersMemberlist  Search The InfoSearch  HelpHelp
  RegisterRegister  LoginLogin
ASP Photo Gallery Pro Version
 CJWSoft Support Info : ASP Photo Gallery Pro Version
Subject Info: Album Hit Count not working A d d  -  P o s tAdd P o s t
Author
Message << Prev Info | Next Info >>
drest
New User
New User


Joined: May/21/2005
Location: United States
Online Status: Offline
Info: 16
Added: November/28/2005 at 3:29pm | IP Logged Quote drest

I have ASPPhotoGallery installed. Everything has been working great for some time. Suddenly, for no apparent reason, I am not getting the "Hits" incremented when a user opens an album. It works when an administrator is logged on. Does not for any anonymous users. Everything else seems to work fine. Again, this used to work. Any ideas.
Back to Top View drest's Profile Search for other info by drest
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: November/28/2005 at 3:32pm | IP Logged Quote cwilliams

ok, 1st we need to rule out the #1 reason people sometimes think that is not working.

Is is set up never to allow the same IP to increment the count more than once in a row so when testing it is real easy to think the count isn't working because unless you can change your ip you can not increment the count more than once per album

It's a poor mans spam abuse type of deal..
For the most part it will keep some Joker from hitting refresh 100 times and inflating the count of an album.

Do you think that is possible what is happening ?

Also, here is an older thread about the same issue?
http://support.cjwsoft.com/code/moreinfo54-2.htm



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
drest
New User
New User


Joined: May/21/2005
Location: United States
Online Status: Offline
Info: 16
Added: November/28/2005 at 5:17pm | IP Logged Quote drest

I didn't think that was it, but just to prove, I just viewed the same album from 2 different IP's.  It did not increment the "hits".  
Back to Top View drest's Profile Search for other info by drest
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: November/28/2005 at 6:06pm | IP Logged Quote cwilliams

ok, then I need more information.

Was the code changed ? Thats the big one. If it worked and now it doesn't something must have changed. Things just don't stop working on their own. I would try putting the original files back in there for everything but the config and dataconn files just to make sure and see and if it works with the original files. (back up your old ones 1st so you can copy them back of course)

Also, perhaps PM me the site info so I can go look as well.



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
drest
New User
New User


Joined: May/21/2005
Location: United States
Online Status: Offline
Info: 16
Added: November/28/2005 at 6:51pm | IP Logged Quote drest

After understanding how the count works i checked the IP in the db.  They are all set to the same IP (my web server) no matter what ip is doing the viewing.  This is probably due to my ISA2004 firewall that is posting the ip address of the web server with each log on.  So, can you help me with where the code would be to modify so the db does not get updated?  I risk the refresh problem, don't think it is an issue with me.

 

Thanks,

Back to Top View drest's Profile Search for other info by drest
 
cwilliams
Admin Group
Admin Group
Avatar
CJWSoft Web Software Developer

Joined: April/06/2004
Online Status: Offline
Info: 1769
Added: November/28/2005 at 7:20pm | IP Logged Quote cwilliams

ya, that firewall could mess that up.

just edit which ever style include you are using
(with a text editor)

it will be one of these depending on your settings.. and they are located in the "scripts" directory

view_album_style1_inc.asp
view_album_style2_inc.asp
view_album_style3_inc.asp

find this section of code and remove the part in red


If Last_Counter_IP <> Request.ServerVariables("REMOTE_ADDR") Then
 
 Set CmdUpdateCounter = Server.CreateObject("ADODB.Recordset")
 cmdTemp.CommandText = "SELECT " & tbl_label_albums & ".* FROM " & tbl_label_albums & " WHERE (Album_ID = " & Album_ID & ")"
 cmdTemp.CommandType = 1
 Set cmdTemp.ActiveConnection = ConnGallery
 CmdUpdateCounter.Open cmdTemp, , 1, 3
 
 CmdUpdateCounter.Fields("Album_Counter") = (Album_Counter + 1)
 CmdUpdateCounter.Fields("Last_Counter_IP") = Request.ServerVariables("REMOTE_ADDR")
 
 CmdUpdateCounter.Update
 CmdUpdateCounter.Close
 
 Album_Counter = Album_Counter + 1
 
End If



__________________

Best Regards, Christopher Williams www.CJWSoft.com
Back to Top View cwilliams's Profile Search for other info by cwilliams Visit cwilliams's Homepage
 
drest
New User
New User


Joined: May/21/2005
Location: United States
Online Status: Offline
Info: 16
Added: November/28/2005 at 7:27pm | IP Logged Quote drest

Thats what I needed.  Thank you!
Back to Top View drest's Profile Search for other info by drest
 

If you wish to make a comment to this info you must first login
If you are not already registered you must first register

  A d d  -  P o s tAdd P o s t
Printable version Printable version

Info Jump
You cannot add new info in this area
You cannot add to info in this area
You cannot delete your info in this area
You cannot edit your info in this area
You cannot create polls in this area
You cannot vote in polls in this area


Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspprotect.com, www.powerasp.com,www.aspclassifieds.com,www.aspphotogallery.com,www.codewanker.com