Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Active Topics Link
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

leatherlips
Senior Member

USA
1838 Posts

Posted - 01 June 2008 :  22:06:18  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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

Posted - 02 June 2008 :  07:41:54  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=31252&SearchTerms=Active,Topics

been done many times ;-)<

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  09:19:15  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  09:26:30  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I just realized () that in the statistics at the bottom of the forum, it already tells you how many active topics there are since your last visit. Perhaps that number can be added to the link in the header? How would I do that?<

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
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  09:51:08  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 02 June 2008 :  09:53:11  Show Profile  Reply with Quote
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"<
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  10:15:04  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
phy: that isnt quite what he wanted. but u coudl use that code in inc_header.

find this

	end if
Response.Write " |" & vbNewline & _
" <a href=""active.asp""" & dWStatus("See what topics have been active since your last visit...") & " tabindex=""-1""><acronym title=""See what topics have been active since your last visit..."">Active Topics</acronym></a>" & vbNewline


and replace it with this

	end if

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

Response.Write " |" & vbNewline & _
" <a href=""active.asp""" & dWStatus("See what topics have been active since your last visit...") & " tabindex=""-1""><acronym title=""See what topics have been active since your last visit..."">Active Topics (" & ActiveTopicCount & ")</acronym></a>" & vbNewline


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
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 02 June 2008 :  10:16:56  Show Profile  Reply with Quote
I thought he meant the title my bad. Oops.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  10:47:35  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  11:51:53  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  12:55:49  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I've not changed those functions as far as I know. However, anything is possible.

Here is my inc_func_common.txt file if you could take a look and see if there are any obvious errors.

The line that keeps giving the error is line 136:

if ChkForumAccess(ForumID, getNewMemberNumber()) then

Thanks.<

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 12:57:50
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  13:10:31  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  13:15:55  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I put it at the bottom and still get the same error, although now it is on a different line.

Here is the forum I am testing it on:

http://mangionemagic.com/forumfortesting<

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
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  14:03:19  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  14:13:05  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I tried renaming it to getMemberID but no luck.

Any chance you could post the code you have? Then I could compare the two and hopefully see what is going on.<

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
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  14:14:58  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
i have used the exact code from the zip file<

© 1999-2010 MaD2ko0l
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07