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: General / Classic ASP versions(v3.4.XX)
 Only admins and moderators can see archived posts.
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

gorman
Starting Member

Italy
47 Posts

Posted - 06 May 2002 :  11:36:15  Show Profile
quote:

Also what connection string are you using? Access 2000 or Access 97?



I'm using this:

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\mypath" '## MS Access 2000
quote:

Just to confirm, only admins and moderators can see the archive replies. Regular members and users that are logged out cannot.

This is exactly what happens. Regular members and users that are logged out get to see only the initial post for every archived topic. Topics not archived don't have any problem.




Edited by - gorman on 06 May 2002 11:46:48
Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 06 May 2002 :  11:52:12  Show Profile
Another mod I installed, which I forgot to mention, is Sticky Topics. Could it be the cause of my problems?

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 06 May 2002 :  13:22:32  Show Profile
You didn't do what I suggested here:
quote:

Wait, don't do that yet. Lets try something simplier.
In your topic.asp file starting at line 228 you find this code:

Response.Write "1"
If not (rsReplies.EOF or rsReplies.BOF) then '## No replies found in DB
Response.Write "2"
rsReplies.movefirst
rsReplies.pagesize = strPageSize
rsReplies.absolutepage = mypage '**
maxpages = cint(rsReplies.pagecount)
end if
Add the code in red and let me know if you see the numbers in your archives.



«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 07 May 2002 :  05:48:52  Show Profile
Ok, I did that. The numbers get printed on top of the "folder tree" if you get what I mean. And they are, case by case:

Administrator logged on: 12
Moderator logged on: 12
Regular user logged on: 1
No log on: 1

There is a pattern here, because in the first two cases I see archived posts WITH all their replies. While in the second two cases I only see the first post.
Hope this helps.

Andrea

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 07 May 2002 :  12:32:45  Show Profile
Ok, I have an idea why it might be doing that. I hope I am right because I have nothing else to go on.

But I need you to do this for me. I posted this earlier:
quote:
Anyways, put a Response.Write strSql on your line 225 in your topic.asp file:
else 'end MySql specific code


set rsReplies = Server.CreateObject("ADODB.Recordset")
rsReplies.cachesize = strPageSize
Response.Write strSql
rsReplies.open strSql, my_Conn, 3
Of course the sql statement will show up on the messaggi.asp page, so you will need to be at a page that has many replies in the archives and copy the sql and then take out the response.write code, so your users won't complain on what all that code at the top is for.
I want you to get the sql statement only when you are logged out or as a regular member. No need to to do it when logged in as an admin/moderator.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 07 May 2002 :  13:05:35  Show Profile
I did that and here's the result for when I'm not logged on or logged on as a regular member:

SELECT FORUM_MEMBERS.M_NAME, FORUM_MEMBERS.M_ICQ, FORUM_MEMBERS.M_YAHOO, FORUM_MEMBERS.M_AIM, FORUM_MEMBERS.M_TITLE, FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_HOMEPAGE, FORUM_MEMBERS.M_LEVEL, FORUM_MEMBERS.M_POSTS, FORUM_MEMBERS.M_COUNTRY, FORUM_MEMBERS.M_AVATAR_URL, FORUM_MEMBERS.M_PMRECEIVE, FORUM_A_REPLY.REPLY_ID, FORUM_A_REPLY.FORUM_ID, FORUM_A_REPLY.R_AUTHOR, FORUM_A_REPLY.TOPIC_ID, FORUM_A_REPLY.R_MESSAGE, FORUM_A_REPLY.R_STATUS, FORUM_A_REPLY.R_DATE FROM FORUM_MEMBERS, FORUM_A_REPLY WHERE FORUM_MEMBERS.MEMBER_ID = FORUM_A_REPLY.R_AUTHOR AND TOPIC_ID = 3083 AND (FORUM_A_REPLY.R_STATUS < 3 OR R_AUTHOR = 319) ORDER BY FORUM_A_REPLY.R_DATE ASC1

Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 08 May 2002 :  04:27:43  Show Profile
Did you manage to get something out of those info?



Edited by - gorman on 08 May 2002 04:28:43
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 May 2002 :  09:13:26  Show Profile
Sorry gorman, I was kept busy with this idiot messing up our members forums. Hope you have patched the security holes in your forum http://forum.snitz.com/forum/forum.asp?FORUM_ID=118

Back to your problem, yes I have narrowed it down to what is causing the problem. The following sql statement executes when retrieving the replies from the database.

SELECT FORUM_MEMBERS.M_NAME, FORUM_MEMBERS.M_ICQ, FORUM_MEMBERS.M_YAHOO, FORUM_MEMBERS.M_AIM, FORUM_MEMBERS.M_TITLE, FORUM_MEMBERS.MEMBER_ID, FORUM_MEMBERS.M_HOMEPAGE, FORUM_MEMBERS.M_LEVEL, FORUM_MEMBERS.M_POSTS, FORUM_MEMBERS.M_COUNTRY, FORUM_MEMBERS.M_AVATAR_URL, FORUM_MEMBERS.M_PMRECEIVE, FORUM_A_REPLY.REPLY_ID, FORUM_A_REPLY.FORUM_ID, FORUM_A_REPLY.R_AUTHOR, FORUM_A_REPLY.TOPIC_ID, FORUM_A_REPLY.R_MESSAGE, FORUM_A_REPLY.R_STATUS, FORUM_A_REPLY.R_DATE FROM FORUM_MEMBERS, FORUM_A_REPLY WHERE FORUM_MEMBERS.MEMBER_ID = FORUM_A_REPLY.R_AUTHOR AND TOPIC_ID = 3083 AND (FORUM_A_REPLY.R_STATUS < 3 OR R_AUTHOR = 319) ORDER BY FORUM_A_REPLY.R_DATE ASC

The GREEN code is what is executed for admins/moderators and gets all the replies. The BLUE code is the additional info that is executed for members and logged out users.

You might want to check the R_STATUS of some of your replies in the A_REPLY table. Most of them should be 1.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !
Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 08 May 2002 :  10:27:43  Show Profile
No problem! Actually thanks for all the help and time you are dedicating to this. And yes, I've fixed the security bug. That didn't give me any problem to do (it was easy, cut and paste...).

But as for this problem, I can't see what you mean. I noticed the difference and the fact that AND (FORUM_A_REPLY.R_STATUS < 3 OR R_AUTHOR = 319) appears only for not logged users and regular users but... how can this help me?

I'm sorry if this sounds stupid, but I'm no ASP programmer at all... I managed to put the forum up just following advice here and from trial and error... but I can't understand the implications of this result.



Edited by - gorman on 08 May 2002 10:28:57
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 08 May 2002 :  10:42:54  Show Profile
I was afraid you were gonna say that. I was hoping it would lead you in the right direction and you would figure it out on your own.

Let me explain it to you a little bit. When the admins or moderators visit the topic, all replies are retrieved from the A_REPLY table, that matches the TOPIC_ID of the topic. Pretty simple.

Now for members and logged out users, the extra SQL statement is used, so they won't be able to see replies that are moderated. If you don't know what the moderation feature is, it basically prevents a post from being displayed to the public until an admin/moderator approves it. So, when a reply is waiting to be approved by an admin/moderator, the R_STATUS of that reply would be 2. If an admin/moderator puts the reply on hold, the R_STATUS would be 3. If they approve it, R_STATUS would be 1.

So R_STATUS < 3 tells the database to get replies that R_STATUS are 1 or 2. R_AUTHOR = 319 means get the reply if the member is the author of the reply.

I want you to check the A_REPLY table and look at the R_STATUS of the replies and see what values they are set to.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !


Edited by - Davio on 08 May 2002 10:47:32
Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 08 May 2002 :  12:09:58  Show Profile
Hmmm... now I feel really ignorant. I went to check and in my forum moderation was on. But nobody ever needed to approve posts for them to be read. Is this possible/normal? Correction: I double checked and moderation was activated in the admin options, but not for single forums. This is why nobody needed to approve posts. Sorry for my ignorance

I'll check the table in the DB and let you know.



Edited by - gorman on 08 May 2002 12:30:24
Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 08 May 2002 :  12:45:48  Show Profile
quote:

So R_STATUS < 3 tells the database to get replies that R_STATUS are 1 or 2. R_AUTHOR = 319 means get the reply if the member is the author of the reply.

I want you to check the A_REPLY table and look at the R_STATUS of the replies and see what values they are set to.



Ok, I've done this. The R_STATUS of the replies in the A_REPLY table is, get this, blank. No value for it...

I've also checked the R_STATUS of the replies for non-archived posts and it's always 1.

Now I better understand the situation (ie. why the messages are not showing...) but i can't see a solution. I suppose that manually changing to 1 all the R_STATUS values would work. But since this is happening on several different Forum categories, it's something that I'd rather avoid in the future...

Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 09 May 2002 :  03:13:27  Show Profile
What I mean is that I'm afraid that the next time I archive stuff it will be archived with the same problem.

Go to Top of Page

gorman
Starting Member

Italy
47 Posts

Posted - 09 May 2002 :  13:37:11  Show Profile
Davio, my saviour!

I found out where the problem was. Admin_forums.asp was lacking a small portion of code (don't ask me why). Now I've fixed it and have succesfully archived posts that everybody can now see!

One question: is there a quick way to set to 1 the value for R_STATUS of the replies in the A_REPLY table? The posts that I will archive from now on will have 1, but all the older ones have still a blank space in that column...

Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 10 May 2002 :  04:43:03  Show Profile
Glad you figured it out. I knew you would if I kept pointing you in the right direction.

To update your database, you can try using a dbs script to update it. Create a new asp file, name it dbs_archive_update.asp and put this in it:
Archive Update
[UPDATE]
A_REPLY
R_STATUS#'1'#R_STATUS = NULL
[END]
If that doesn't work you can try:
Archive Update
[UPDATE]
A_REPLY
R_STATUS#'1'#
[END]
That will set all the rows for R_STATUS to have the value 1. Then upload your file and go to your MOD Setup file and run it.

«------------------------------------------------------»
Want to know when the next version comes out,
as soon as possible? Join our Mailing Lists !


Edited by - Davio on 10 May 2002 04:44:38
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07