Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - View posts since last visit MOD
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

View posts since last visit MOD

 Post Reply Post Reply
Author
claytone19 View Drop Down
Newbie
Newbie


Joined: 16 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote claytone19 Quote  Post ReplyReply Direct Link To This Post Topic: View posts since last visit MOD
    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


Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2005 at 1:55pm
How is that different from active topics?

Edited by dpyers - 23 February 2005 at 4:39pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post 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.

Edited by wistex - 24 February 2005 at 12:49am
Back to Top
claytone19 View Drop Down
Newbie
Newbie


Joined: 16 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote claytone19 Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
claytone19 View Drop Down
Newbie
Newbie


Joined: 16 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote claytone19 Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2005 at 10:15pm
Too late, I already wrote my own stored procedure.
Thanks though.


Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2005 at 7:32pm

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

Back to Top
claytone19 View Drop Down
Newbie
Newbie


Joined: 16 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote claytone19 Quote  Post ReplyReply Direct Link To This Post 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
' ##########################################################
%>

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.