Author |
Topic  |
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 01 June 2008 : 22:06:18
|
Currently, there is a link at the top of the forum that says "Active Topics". I would like to possibly add the number of new topics added since a users last visit. It would look something like this:
Active Topics (5)
The number would represent the additional topics that were new since a users last visit. It would change dependent on the actual number of active topics for that user. If no new topics were added then it would either look like:
Active Topics
or
Active Topics (0)
Does anyone know how to do this?
Of course the formatting of the way the link looks does not have to be limited to what I suggested. It could also look something like this:
5 Active Topics< |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
Edited by - leatherlips on 01 June 2008 22:07:55 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 02 June 2008 : 09:19:15
|
Thanks.
I'm trying to add it but hava a problem. I am getting an error:
Type mismatch: 'getNewMemberNumber'
It is around this area in the code:
if rsForum.eof or rsForum.bof then
'nothing
else
i = 0
do until rsForum.Eof
ForumID = rsForum("FORUM_ID")
if ChkForumAccess(ForumID, getNewMemberNumber()) then
i = i + 1
if i = 1 Then
strSql = strSql & " AND ("
else
strSql = strSql & " OR "
end If
strSQL = strSQL & "F.FORUM_ID=" & ForumID
end if
rsForum.MoveNext
loop
rsForum.close
set rsForum = Nothing
if i > 0 Then
strSql = strSql & ") "
end If
end if
end If
strSql = strSql & "AND (T.T_LAST_POST > '" & lastDate & "'" This mod is for an older version of Snitz. Can anyone update it for the current version? Here is the code it uses. I figured out that inc_functions.asp now is inc_func_common.asp and inc_top.asp is now inc_header.asp. Perhaps there are other sections in the code itself that need to be renamed to make it work with the current version of Snitz?< |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
Edited by - leatherlips on 02 June 2008 09:22:29 |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 02 June 2008 : 09:51:08
|
http://mad2kool.co.uk/forum/faq.asp works fine on my site with no changes.
i put all the code into inc_header, just to test but if you wanted to do it proper then you woudl put the code in in_func_common.asp and then make the change in inc_header.asp to display the link.< |
© 1999-2010 MaD2ko0l |
 |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 02 June 2008 : 09:53:11
|
In inc_func_common.asp line 1373 [code] Case "members.asp" strNewTitle = strForumTitle & " - Members" Case "active.asp" ActiveTopicCount = 0 if not IsNull(Session(strCookieURL & "last_here_date")) then if not blnHiddenForums then
'## Forum_SQL - Get ActiveTopicCount from DB strSql = "SELECT COUNT(" & strTablePrefix & "TOPICS.T_LAST_POST) AS NUM_ACTIVE " &_ " FROM " & strTablePrefix & "TOPICS " &_ " WHERE (((" & strTablePrefix & "TOPICS.T_LAST_POST)>'"& Session(strCookieURL & "last_here_date") & "'))" &_ " AND " & strTablePrefix & "TOPICS.T_STATUS <= 1"
set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn if not rs.EOF then ActiveTopicCount = rs("NUM_ACTIVE") else ActiveTopicCount = 0 end if
rs.close set rs = nothing end if end if strNewTitle = strForumTitle & " - Active Topics (" & ActiveTopicCount & ")" Case "faq.asp" strNewTitle = strForumTitle & " - Frequently Asked Questions"< |
 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 02 June 2008 : 10:15:04
|
phy: that isnt quite what he wanted. but u coudl use that code in inc_header.
find this
and replace it with this
thats another way to do it.
not to sure what the difference is/was between this and the 1 i posted earler.< |
© 1999-2010 MaD2ko0l |
 |
|
phy1729
Average Member
  
USA
589 Posts |
Posted - 02 June 2008 : 10:16:56
|
I thought he meant the title my bad. Oops.< |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 02 June 2008 : 10:47:35
|
I used the code you posted MaD2ko0l. The one in the mod you linked to gave me the error I posted above.
Yours is not giving me the error, however, it also displays new topics that I should not have access to such as private forums.
To test this, I made a post in a private forum that my test account does not have access to. Then I logged in with my test account and it shows that there is a new active topic. Of course if they click on the active topics link there are no new ones that it can see. But it still shows it in the active topics link.
Is there a way to take into consideration if the user has access to certain forums or not?< |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
 |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 02 June 2008 : 11:51:53
|
and that would be why the 1st link i posted would filter out new posts in rivate forums.
have u changed the getNewMemberNumber or the ChkForumAccess functions??? as that may be a problem that you might need to add/change parameter to work properly< |
© 1999-2010 MaD2ko0l |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 02 June 2008 : 13:10:31
|
this may sound silly, but try putting that function at the bottom of inc_func_common
i say this because when i tryed it, i just put it near the bottom of inc_header for it to work.
so just try that and see what happens< |
© 1999-2010 MaD2ko0l |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 02 June 2008 : 14:03:19
|
well it does seem to work on my site there, but i just realized, this function getNewMemberNumber is the old function to get the memebrs id number, the updated function name is getMemberID maybe you can replace it with that instead.
looks liek it need a bit of an overhaul< |
© 1999-2010 MaD2ko0l |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
MaD2ko0l
Senior Member
   
United Kingdom
1053 Posts |
Posted - 02 June 2008 : 14:14:58
|
i have used the exact code from the zip file< |
© 1999-2010 MaD2ko0l |
 |
|
Topic  |
|