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)
 Add Number of Downloads
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jag24
Junior Member

182 Posts

Posted - 12 December 2003 :  02:05:21  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
I would like to display the amount of downloads a user has made under their avatar in each post. I currently have

Status: online or offline
Country Flag
# Posts :a user has made
# Files Downloaded: Is what I would like to have added.

Is this do-able? If so can some one help me out ?

Guest/guest

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 12 December 2003 :  05:14:19  Show Profile  Visit HuwR's Homepage
the amount of what downloads ?
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 December 2003 :  05:37:57  Show Profile
Are you tracking the downloads they make by incrementing a value in the database? If not, you're going to have to create an asp file that does this before serving up a download.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 12 December 2003 :  12:21:40  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
I want to be able to track the amount of downloads from the file library by each user. It is tracked in the database by M_NDOWNLOADS in the FORUM_MEMBERS table.

Edited by - Jag24 on 12 December 2003 12:27:27
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 13 December 2003 :  17:09:27  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
Bump>>

Edited by - Jag24 on 17 December 2003 18:26:10
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 17 December 2003 :  18:35:15  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Could you post a link to a txt version of the asp file that handles the downloads from your file library?

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 17 December 2003 :  21:05:16  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
Well I am not exactly sure if I understand what file you are looking for but I will include file_library & whatsnew

The info would need to get pulled from M_NDOWNLOADS in the members table I think.
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 17 December 2003 :  22:11:52  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Umm... i somehow misunderstood the question...

Now to your request:
Open topic.asp in your favourite text editor, then...

Find the following code (approx. line 97) and add the green code:
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _
	", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_NDOWNLOADS" & _


then find the following code (approx. line 130) and add the green code:
	Member_Posts = rsTopic("M_POSTS")
	Member_Country = rsTopic("M_COUNTRY")
	Member_Downloads = rsTopic("M_NDOWNLOADS")
	Topic_Date = rsTopic("T_DATE")
	Topic_Subject = rsTopic("T_SUBJECT")


now find the following code (approx. line 309) and add the green code:
	strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO"
	strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_NDOWNLOADS"
	strSql = strSql & ", R.REPLY_ID, R.FORUM_ID, R.R_AUTHOR, R.TOPIC_ID, R.R_MESSAGE, R.R_LAST_EDIT"
	strSql = strSql & ", R.R_LAST_EDITBY, R.R_SIG, R.R_STATUS, R.R_DATE"


then find the following code (approx. line 511):
		rM_NAME = 0
		rM_RECEIVE_EMAIL = 1
		rM_AIM = 2
		rM_ICQ = 3
		rM_MSN = 4
		rM_YAHOO = 5
		rM_TITLE = 6
		rMEMBER_ID = 7
		rM_HOMEPAGE = 8
		rM_LEVEL = 9
		rM_POSTS = 10
		rM_COUNTRY = 11
		rREPLY_ID = 12
		rFORUM_ID = 13
		rR_AUTHOR = 14
		rTOPIC_ID = 15
		rR_MESSAGE = 16
		rR_LAST_EDIT = 17
		rR_LAST_EDITBY = 18
		rR_SIG = 19
		rR_STATUS = 20
		rR_DATE = 21
		if CanShowSignature = 1 then
			rM_SIG = 22
		end if

and replace it with the following code:
		rM_NAME = 0
		rM_RECEIVE_EMAIL = 1
		rM_AIM = 2
		rM_ICQ = 3
		rM_MSN = 4
		rM_YAHOO = 5
		rM_TITLE = 6
		rMEMBER_ID = 7
		rM_HOMEPAGE = 8
		rM_LEVEL = 9
		rM_POSTS = 10
		rM_COUNTRY = 11
		rM_DOWNLOADS =12
		rREPLY_ID = 13
		rFORUM_ID = 14
		rR_AUTHOR = 15
		rTOPIC_ID = 16
		rR_MESSAGE = 17
		rR_LAST_EDIT = 18
		rR_LAST_EDITBY = 19
		rR_SIG = 20
		rR_STATUS = 21
		rR_DATE = 22
		if CanShowSignature = 1 then
			rM_SIG = 23
		end if


then find the following code (approx. line 550) and add the green code:
			Reply_MemberPosts = arrReplyData(rM_POSTS, iForum)
			Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)
			Reply_MemberDownloads = arrReplyData(rM_DOWNLOADS, iForum)
			Reply_ReplyID = arrReplyData(rREPLY_ID, iForum)
			Reply_ForumID = arrReplyData(rFORUM_ID, iForum)


now find the following code (approx. line 590) and add the green code:
			Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p>" & vbNewLine & _
                                 	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberDownloads & " Downloads</small></font></p></td>" & vbNewLine & _
					"                <td bgcolor=""" & CColor & """ height=""100%"" width=""" & strTopicWidthRight & """"


Finally find the following code (approx. line 796) and add the green code:
	Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p>" & vbNewLine & _
	        	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Downloads & " Downloads</small></font></p>" & vbNewLine & _
			"                <td bgcolor=""" & strForumFirstCellColor & """ width=""" & strTopicWidthRight & """"


This should do it.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 17 December 2003 :  23:03:54  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
Well I tried it every way I know how & it keeps giving me an expected statement error.
here is a link to what I have http://jag24.com/files/topic.txt
My lines have no & _ at the end....maybe thats where I am going wrong?
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 17 December 2003 :  23:14:25  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
I didn't know that you've got a heavily modified forum... anyway, remove the read code and add the green code from the following code:

			Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p><p>" & vbNewLine & _ 
	                		"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberDownloads & " Downloads</small></font></p></td>" & vbNewLine & _


The same goes for the following code, remove red, add green:
	Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p>" & vbNewLine & _
                   	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Downloads & " Downloads</small></font></p>" & vbNewLine & _

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 17 December 2003 :  23:46:14  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
Well almost LOL
i get a table at the top of the topic now with

Alert Moderator
Alert Moderator
Alert Moderator
Alert Moderator
Alert Moderator

although it does show the downloads.....


Then the posts & replies.....
heres my modified topic.asp now
http://jag24.com/files/topic.txt

Sorry about not mentioning it was already heavily modified
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 18 December 2003 :  00:25:29  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
Just a little update
If I commment out lines 881 through 884 & 1211 through 1214 it all works great...
I cant get it all working together though. One other thing ....can we get rid of the space between posts & downloads ?
Thanks for your help on this oneway !
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 18 December 2003 :  07:59:00  Show Profile
quote:
Originally posted by Jag24

Just a little update
If I commment out lines 881 through 884 & 1211 through 1214 it all works great...
I cant get it all working together though. One other thing ....can we get rid of the space between posts & downloads ?
Thanks for your help on this oneway !


I'm going off the text file you have above.
Lines 875 & 876: Remove the strikethrough Add the red
Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberPosts & " Posts</small></font></p><p><br />" & vbNewLine & _ 
			                "                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Reply_MemberDownloads & " Downloads</small></font></p></td><br />" & vbNewLine
			

Lines 1199 & 1200
Response.Write	"                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Posts & " Posts</small></font></p><br />" & vbNewLine & _
                    "                <font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><small>" & Member_Downloads & " Downloads</small></font></p>" & vbNewLine
	

I'm not sure about the <p></p> tags, You've got alot of "ifs" going that I can't see . The main thing is the </td> tag on line 876. The <p> tags are what's giving you the spaces.

    _-/Cripto9t\-_
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 18 December 2003 :  09:34:42  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
Cool, thats the item I was looking for ! I really appreciate the help on this guys....It works great now Thank you very much
Go to Top of Page

Jag24
Junior Member

182 Posts

Posted - 15 January 2004 :  13:29:50  Show Profile  Visit Jag24's Homepage  Send Jag24 an ICQ Message
An update here, I have noticed that the download count is not accurate. It seems to get reset in the database, thats is the M_NDOWNLOADS count in the database does not hold the values. It seems to reset itself back to zero. Although some members such as myself, the values hold true. This seems like a very stange problem. As I look at some of the above code i see some script referred to as "Reply_MemberDownloads = arrReplyData(rM_DOWNLOADS, iForum)" & "rM_DOWNLOADS =12"
while some is referred to as "M.M_NDOWNLOADS" & _" using the reference M_NDOWNLOADS
Could the _NDOWNLOADS have something to do with it ? What I am trying to say is that in some spots its referred to with the NDOWNLOADS & in others its referred to as DOWNLOADS Not using the "N" in front of downloads....Anyone have any ideas?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07