Author |
Topic |
Mrx
Starting Member
13 Posts |
Posted - 02 May 2003 : 02:50:41
|
Any way to allow the "quick reply" at the bottom of a forum page to be used with an anonymous user? |
|
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 02 May 2003 : 04:26:50
|
quote: Originally posted by Mrx
Any way to allow the "quick reply" at the bottom of a forum page to be used with an anonymous user?
hi~ Mrx, try this... in topic.asp about line.808
if strShowQuickReply = "1" and strDBNTUserName <> "" and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then call QuickReply() end if
then change to
if strShowQuickReply = "1" and (strDBNTUserName <> "" or Forum_Private = "119") and ((Cat_Status = 1) and (Forum_Status = 1) and (Topic_Status = 1)) and ArchiveView = "" then call QuickReply() end if
Notice!! This one assume you've the STEP.3 code modified, if not, at least you'll need to apply the 3-1 and 3-2 modded code in topic.asp before you try above modification. (it's for determining is this Forum allow anonymous posting or not...)
let me know if it work for you. |
|
|
Mrx
Starting Member
13 Posts |
Posted - 02 May 2003 : 08:05:38
|
Thanks that works great . |
|
Edited by - Mrx on 02 May 2003 10:51:46 |
|
|
Mrx
Starting Member
13 Posts |
Posted - 03 May 2003 : 04:08:26
|
Any way to have guests to not show active forums(ones that have new posts etc). Only seems like a minor fault but I'd rather not have guest users able to know which posts have been viewed by other guests.
|
|
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 03 May 2003 : 09:21:55
|
quote: Originally posted by Mrx
Any way to have guests to not show active forums(ones that have new posts etc). Only seems like a minor fault but I'd rather not have guest users able to know which posts have been viewed by other guests.
Hi~ Mrx,
did you mean you want to disable those anonymous posts showing on Active Topics page ?? if so, try this.... find this line in active.asp about line.277
if strPrivateForums = "1" and mLev < 4 then
strSql = strSql & " AND F.FORUM_ID IN (" & allAllowedForums & ") "
end if and just add/insert 4 lines below it, so it look like this after modified..
if strPrivateForums = "1" and mLev < 4 then
strSql = strSql & " AND F.FORUM_ID IN (" & allAllowedForums & ") "
end if
if mLev < 4 then
strSql = strSql & "AND M.M_NAME <> '" & strAnonyName & "' " & _
"AND MEMBERS_1.M_NAME <> '" & strAnonyName & "' "
end if
strSql = strSql & "AND F.F_TYPE = 0 " & _
then it'll hide those topics made by guest user except Admin.. (but it only check the topic author and last post author...)
and you can change the condition if mLev < 4 then to fit your need. for example, if you just want to get rid from non-members/guest users, change to if mLev < 1 then
hope this helpful for you. and let me know again if i misunderstand what your real question. |
|
|
Mrx
Starting Member
13 Posts |
Posted - 05 May 2003 : 05:49:13
|
Not quite. What I would like is for Guest users to not have ANY active threads show. Guests shouldnt HAVE any differentiation between active/visited or not. I would like for my guests to have the icons stay the same color (not pink) and not have any notice of active topics. |
|
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 05 May 2003 : 13:05:47
|
hi~ Mrx,
the active thread/pink icon or visited thread/yellow icon depend on users' "Last Visit Date". for a logged in member, the information will be saved on MEMBERS database or cookie. and for a Guest user/non-login-member... it seem will be set to 10 days ago by default.
and i think it's nothing to do with this anonymouse posting mod. there are total different code section to determine what the Last Visit date or read/unread setting.
but if you just want to set ALWAYS yellow icon shown to guest users.. looking for these code in active.asp about line.552 ' DEM --> end of code Added for topic moderation elseif lcase(strHotTopic) = "1" and Topic_Replies >= intHotTopicNum then Response.Write getCurrentIcon(strIconFolderNewHot,"Hot Topic with New Posts","hspace=""0""") & "</a>" & vbNewline elseif Topic_Last_Post < lastdate then Response.Write getCurrentIcon(strIconFolder,"No New Posts","") & "</a>" & vbNewline else Response.Write getCurrentIcon(strIconFolderNew,"New Posts","") & "</a>" & vbNewline end if
and try adding below extra code with red color... ' DEM --> end of code Added for topic moderation elseif lcase(strHotTopic) = "1" and Topic_Replies >= intHotTopicNum then if strDBNTUserName <> "" then Response.Write getCurrentIcon(strIconFolderNewHot,"Hot Topic with New Posts","hspace=""0""") & "</a>" & vbNewline else Response.Write getCurrentIcon(strIconFolderHot,"Hot Topic","hspace=""0""") & "</a>" & vbNewline end if elseif Topic_Last_Post < lastdate or strDBNTUserName = "" then Response.Write getCurrentIcon(strIconFolder,"No New Posts","") & "</a>" & vbNewline else Response.Write getCurrentIcon(strIconFolderNew,"New Posts","") & "</a>" & vbNewline end if
then... i think it'll stop the pink icon shown to guest users any more. have a try and see if this one work for you.
|
|
|
Mrx
Starting Member
13 Posts |
Posted - 06 May 2003 : 07:18:28
|
No, sorry Dora but it still appears to have new posts as pink for Guests. Any ideas?
|
|
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 06 May 2003 : 10:26:35
|
hi~ Mrx,
above my code just modify to active.asp, so it'll ONLY get effect on Active Topics page. if what you want is "Totally" remove the pink icon shown to Guest users...
as i mentioned.. that's really another different issue to this mod... and... i'm also not sure is it appropriate to do such modification.
anyway, for other pages(default.asp, forum.asp...), i think you can take a look to this file: inc_func_chknew.asp. and it's the similar modify method as previous post to active.asp.. just find this line in Function ChkIsNew2(dt)
if dt > Session(strCookieURL & "last_here_date") then then change to if dt > Session(strCookieURL & "last_here_date") and strDBNTUserName <> "" then
(and almost the same doing on default.asp this line in sub ChkIsNew(dt)...) if dt > Session(strCookieURL & "last_here_date") and (ForumCount > 0 or ForumTopics > 0) and strDBNTUserName <> "" then
i can't test this, so you may need to try it by yourself, and it may also other places need this same or similar change on different pages.
i think this modification is easy understanding, we just add a condition to get rid Guest user to show any New icon.
try and see if it suitable for you this time. |
|
|
Mrx
Starting Member
13 Posts |
Posted - 07 May 2003 : 04:15:08
|
Thanks.
quote: and... i'm also not sure is it appropriate to do such modification.
Hmmmmm. I dont actually see the point in having 'guest' or logged off members to have active/inactive topics. From what I gather, if I viewed a post and wasnt logged on, anyone else who viewed that post later, who was not logged on would not see that post as 'new' or 'active'. Is this correct?
P.S I think that having this amalgamated into EZ anonymous posting as it makes the Guest account that much more "tidy" i.e when I log onto someones forum who supports anony posting, I would be wondering why some were pink & some were not as it was my first visit. |
|
Edited by - Mrx on 07 May 2003 06:29:20 |
|
|
dozunu
Starting Member
Germany
2 Posts |
Posted - 08 May 2003 : 11:00:43
|
Hi!
I've installed your MOD (step 1 only), it works, but I have an error in the admin mode of this MOD (EZ Anonymous Posting Setup): when I click the Active Anonymous Posts link, I get an error:
Technical Information (for support personnel)
Error Type: (0x80020009) Exception occurred. /Forum/admin_anony_active.asp, line 296
Browser Type: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)
Page: GET /Forum/admin_anony_active.asp
Time: Thursday, May 08, 2003, 4:47:42 PM
I took the admin_anony_active.asp file, line 296:
'##### EZ Anony - add total anony posts infomation if trim(rs("M_LASTPOSTDATE")) <> "" then Response.Write "<br>Total Anonymous Posts: <b>" & _ rs("M_POSTS") & "</b> posts. Last Post on <b>" & _ ChkDate(rs("M_LASTPOSTDATE"),"",true) & "</b><br>" else Response.Write "<br>No Any Anonymous Posts Found !<br>" end if '########## EZ Anony ##########
I've looked in DB, there is something in this field M_LASTPOSTDATE (MEMBERS Table): something like this 20030508144717
so, what's wrong here?
Thanx! |
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 09 May 2003 : 16:16:03
|
hi~ dozunu,
the admin_anony_active.asp take from a old "one file MOD".. My Active Posts http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=33453 i just change the MemberID to make it show the Guest account's posts instead of "my"... and it really not a mature mod... still full buggy, i should'nt put it to this Anony mod...
regarding the error, i think it'll happen if there are no new topic made by Anony users in default period (30 days). to get rid of this erro, we can just add a extra check "rs.EOF".. to those lines... like this: '##### EZ Anony - add total anony posts infomation if Not (rs.EOF or rs.BOF) then if trim(rs("M_LASTPOSTDATE")) <> "" then Response.Write "<br>Total Anonymous Posts: <b>" & _ rs("M_POSTS") & "</b> posts. Last Post on <b>" & _ ChkDate(rs("M_LASTPOSTDATE"),"",true) & "</b><br>" else Response.Write "<br>No Any Anonymous Posts Found !<br>" end if end if '########## EZ Anony ##########
but i found another big problem... there are two part to show my/anony's posts, first one check the Topics, and second check the Replies... then i found if there are no Topic showing in first stage, then it'll also missing the Replies, even though it posted in period...
more worse... i think i have no ability to fix this bug now.. i've a long time no touch these code.. so really no idea how to figure out what the problem cause from..
anyway, it's a addon feature for Admin only, and it wo'nt influence anything to this MOD. and here is a inadequate fix method: find these lines in admin_anony_active.asp about line.185
if lastDate = "" then
MyActivePeriod = "30"
lastDate = DateToStr(DateAdd("d",-30,StrToDate(beginDate)))
end if and replace it with...
if lastDate = "" then
dim LastMyTopicDays
sql = "SELECT T_DATE FROM " & strTablePrefix & "TOPICS "
sql = sql & "WHERE T_AUTHOR = " & MemID & " ORDER BY T_DATE DESC"
set rsLastTopic = my_Conn.Execute(TopSQL(sql,1))
if Not rsLastTopic.EOF then LastMyTopicDays = DateDiff("d",StrToDate(rsLastTopic("T_DATE")),Now())
rsLastTopic.close
set rsLastTopic = nothing
if LastMyTopicDays > 30 then
MyActivePeriod = LastMyTopicDays
lastDate = DateToStr(DateAdd("d",-(LastMyTopicDays),StrToDate(beginDate)))
else
MyActivePeriod = "30"
lastDate = DateToStr(DateAdd("d",-30,StrToDate(beginDate)))
end if
end if then it'll change the default 30 days period to show at least one topic made by Anony user. and i think this one also can solve your problem too.
sorry for inconvenient.. and see if this fixed code work for you. |
|
|
DoraMoon
Average Member
Taiwan
661 Posts |
Posted - 09 May 2003 : 16:33:04
|
quote: Originally posted by Mrx Hmmmmm. I dont actually see the point in having 'guest' or logged off members to have active/inactive topics. From what I gather, if I viewed a post and wasnt logged on, anyone else who viewed that post later, who was not logged on would not see that post as 'new' or 'active'. Is this correct?
hi~ Mrx,
in actually, i think the "Last Visit Date" setting also work for Guest users.. if a non-registered user visit your forum frequently, and just like most of us here, he may only prefer going to the Active Topics page. and if he also know how the icon work... then the pink or yellow folder icon will also useful for him.
it's because when press the "Mark All Read" icon, it'll save a Cookie to record the visitor's last visit date/time. and as i said, it will influence to the active topics status showing for user. |
|
|
Mrx
Starting Member
13 Posts |
Posted - 12 May 2003 : 06:08:08
|
But if a new user decides to check out the forum as a guest, Im sure they would expect to see all of the posts as new posts i.e pink. Unfortunately, this doesnt happen , so I would prefer to disable this feature for guests. |
|
|
|
dozunu
Starting Member
Germany
2 Posts |
Posted - 12 May 2003 : 07:37:01
|
Hi ~DoraMoon!
I figured out the causes :-) but it works fine right now, u did a good job. It helps me a lot.
thanx! |
|
|
Topic |
|