Print Page | Close Window

View posts since last visit MOD

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=13967
Printed Date: 12 April 2026 at 9:42am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: View posts since last visit MOD
Posted By: claytone19
Subject: View posts since last visit MOD
Date Posted: 23 February 2005 at 12:56pm
Is there a "View posts since last visit" Mod for Web Wiz?
Or is there something like already that I am overlooking?

I don't want just active topics, all posts that have been posted since the last time the user logged in.

thanks





Replies:
Posted By: dpyers
Date Posted: 23 February 2005 at 1:55pm
How is that different from active topics?

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: wistex
Date Posted: 23 February 2005 at 5:52pm
If you click on "Active Topics" it automatically gives you the posts since last visit.  There is also a drop down box where you can specify a different time range if you so desire.

-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: claytone19
Date Posted: 26 February 2005 at 1:04am
thanks, I just realized that.

Now I will write code at login to check if there are any posts since the user logged in and if so display "there are 10 new messages since you last logged in" with a link to active topics since lastvisit date.

thanks guys for the responses


Posted By: dpyers
Date Posted: 26 February 2005 at 10:50am
There's a few mods around that do just that. Check the mods forum.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: claytone19
Date Posted: 26 February 2005 at 10:15pm
Too late, I already wrote my own stored procedure.
Thanks though.




Posted By: wistex
Date Posted: 01 March 2005 at 7:32pm

That is exactly what I need.  Could you provide the code for the mod?  Thanks. Smile



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: claytone19
Date Posted: 02 March 2005 at 10:56pm
Well, I simplified the following ASP code, so that you can integrate it into your site the way you want. You can add to it as much as you like. The message only displays to members logged into your forum and only then if there is active topics since last visit.

Here is the code for the stored procedure.

##############################################################
CREATE PROCEDURE [dbo].[wwfSpActiveTopicsCount]
(
@AuthorID int,
@GroupID int,
@GroupPerm int,
@dblActiveFrom datetime
)
 AS
 
SELECT Count(tblTopic.Topic_ID) as TopicCount
FROM tblCategory, tblForum, tblTopic
WHERE ((tblCategory.Cat_ID = tblForum.Cat_ID AND tblForum.Forum_ID = tblTopic.Forum_ID) AND (tblTopic.Last_entry_date > @dblActiveFrom))
AND (tblForum.[Read] <= @GroupPerm OR (tblTopic.Forum_ID IN (
    SELECT tblPermissions.Forum_ID
    FROM tblPermissions
    WHERE tblPermissions.Author_ID = @AuthorID OR tblPermissions.Group_ID = @GroupID AND tblPermissions.[Read]=1))
    )
;
##########################################################

On your home page make sure you include this file:
<!--#include file="forum/common.asp" -->

Then you will want to add code similer to this:
<%
'
##########################################################
If strLoggedInUsername <> "" Then
  Response.write "Welcome <span class=bold>" & strLoggedInUsername & "</span>
IF strLoggedInUsername <> "Guest" and Session("dtmLastVisit") <> "" Then
  If intGroupID = 2 Then ' GUEST
    intForumGroupPermission = 1
  ElseIf intGroupID = 1 Then ' ADMIN
     intForumGroupPermission = 4
  Else ' EVERYONE ELSE
      intForumGroupPermission = 2
  End If
               
   strSQL = "EXECUTE wwfSpActiveTopicsCount @dblActiveFrom = '" & Session("dtmLastVisit") & "', @AuthorID = " & lngLoggedInUserID & ", @GroupID = " & intGroupID & ", @GroupPerm = " & intForumGroupPermission
  rsCommon.Open strSQL, adoCon
  dim intCount
   If Not rsCommon.EOF Then
     intCount = rsCommon("TopicCount")
   End If
   rsCommon.Close
  
   IF intCount > 0 Then
     If intCount = 1 Then%>
     <br>There has been <a href="forum/active_topics.asp">(<%=intCount%>)</a> new message posted since you last visited<%
     else%>
       <br>There have been <a href="forum/active_topics.asp">(<%=intCount%>)</a> new messages posted since you last visited<%
      End if                       
    End If ' Count > 0
End If
' ##########################################################
%>




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net