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)
 Collapse function
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 May 2004 :  11:29:32  Show Profile
How can i add a collapse function to for example the table the birthday mod creates? i would like to make everything, also the statistics, collapsable. What lines do i have to add?
i tried some stuff, but the collapse icon displayed at top of the whole list of forums instead of in front of statistics, and it didn't collapse the statistics as well.

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 12 May 2004 :  12:12:32  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
quote:
Originally posted by PuppyF500

How can i add a collapse function to for example the table the birthday mod creates?


I've added it to the Birthdays MOD, simply redownload the file and replace your inc_birthdays.asp with the new one.

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

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 May 2004 :  12:32:09  Show Profile
you're the greatest owm maybe i now can understand how to add it to other stuff as well
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 12 May 2004 :  12:37:11  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
You're welcome.
If you need help adding the collapsing feature for the statistics, let me know.

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

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 May 2004 :  12:48:21  Show Profile
owm could you add the collapse functionality to a file i have? or instruct me how to?
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 12 May 2004 :  12:52:49  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Sure, post a link to a .txt version of your default.asp.

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

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 May 2004 :  12:56:59  Show Profile
well actually its more about this file http://www.theprofoundone.com/privatemess.txt
tnx for trying m8
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 12 May 2004 :  13:14:19  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Here you go: http://www.onewaymule.org/files/privatemess.txt

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

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 May 2004 :  13:46:04  Show Profile
tnx very much m8 appreciate your help
Go to Top of Page

PuppyF500
New Member

Netherlands
68 Posts

Posted - 12 May 2004 :  13:59:43  Show Profile
and one last question, how do i make the statistics collapsable?
if needed: http://theprofoundone.com/default.asp

Edited by - PuppyF500 on 12 May 2004 14:00:08
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 12 May 2004 :  14:38:34  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Here's the default.asp with collapsable statistics: http://www.onewaymule.org/files/default.txt

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

PuppyF500
New Member

Netherlands
68 Posts

Posted - 13 May 2004 :  03:03:27  Show Profile
thank you again OneWayMule
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 13 May 2004 :  10:12:29  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
You're welcome.

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

PeeWee.Inc
Senior Member

United Kingdom
1893 Posts

Posted - 13 May 2004 :  10:18:43  Show Profile  Visit PeeWee.Inc's Homepage
'm looking to add this to some code i'm making now, and other bits around my website.

OneWayMule, do you have a quick run down of how you do it?

De Priofundus Calmo Ad Te Damine
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 13 May 2004 :  11:10:07  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
OK, let's take the Private Messages include code for default.asp (it's shorter than the Statistics code).
I've marked the new code blue and the modified code green and added some comments in black.

if strDBNTUserName <> "" then
        '### Read/write the cookies (take a look at the DoHideCategory sub on default.asp
        Call DoHideCategory("PMs") 
        '### Define the variable for the cookies and querystring
       	HideForumCat = strUniqueID & "HideCat" & "PMs" 
        '### The following code gets the info to be displayed in the PM table, so we only need it if the PMs are not hidden 
	If Request.Cookies(HideForumCat) <> "Y" Then
	      ' Get Private Message count for display on Default.asp
		if strDBType = "access" then
			strSqL = "SELECT count(M_TO) as [pmcount] "
		else
	        		strSqL = "SELECT count(M_TO) as pmcount "
    		end if
		strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
		strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
		strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
		strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "
	
		Set rsPM = my_Conn.Execute(strSql)
		pmcount = rsPM("pmcount")
       	
		rsPM.close
		set rsPM = nothing
        End If
	Response.Write	"        <tr>" & vbNewLine
        '### Now we have to add the collapse/expand icons and links to the category cell
	If Request.Cookies(HideForumCat) = "Y" Then
	 	Response.Write	"          <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """ size=""+1""><a href=""" & ScriptName & "?" & HideForumCat & "=N"">" & getCurrentIcon(strIconPlus,"Expand This Category","") & "</a> <b>Private Messages</b></font></td>" & vbNewLine
	Else
 		Response.Write	"          <td bgcolor=""" & strCategoryCellColor & """ colspan=""" & sGetColspan(7,6) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """ size=""+1""><a href=""" & ScriptName & "?" & HideForumCat & "=Y"">" & getCurrentIcon(strIconMinus,"Collapse This Category","") & "</a> <b>Private Messages</b></font></td>" & vbNewLine
 	End If
	Response.Write	"        </tr>" & vbNewLine
        '### The following code is the one we want to hide if the collapse icon was clicked:
	If Request.Cookies(HideForumCat) <> "Y" Then
		Response.Write	"        <tr>" & vbNewLine & _
				"          <td align=""center"" bgcolor=""" & strForumCellColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>"
		if strDBNTUserName = "" then
			Response.Write	" "
		else
			if pmcount = 0 then
				Response.Write	" "
			end if
       	         if pmcount >= 1 then
				Response.Write	getCurrentIcon(strIconpmnewsm,"","align=""absmiddle""")
			end if
		end if
		Response.Write	"</font></td>" & vbNewLine & _
				"          <td valign=""top"" bgcolor=""" & strForumCellColor & """ colspan=""" & sGetColspan(6,5) & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText""><a href=""pm_view.asp"">Inbox</a></span></font>" & vbNewLine
	       	if strDBNTUserName = "" then
			Response.Write	"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><br> - Log in to check your private messages.</font>" & vbNewLine
		else
			Response.Write	"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """><br><b>"
			if strAuthType="nt" then
				Response.Write	strDBNTUserName & " (" & strDBNTUserName & ")</b>"
			else
				if strAuthType = "db" then
					Response.Write	strDBNTUserName & "</b>"
				end if
			end if
			Response.Write	" - You have "
			if pmcount >=1 then
				Response.Write	"<font color=""" & strActiveLinkColor & """><b>" & pmcount & "</b></font>"
			else
				Response.Write	pmcount
			end if
			Response.Write	" new private message"
			if pmcount >1 then
				Response.Write	"s"
			end if
			Response.Write	".</font></td>" & vbNewLine & _
					"        </tr>" & vbNewLine
		end if
	End If
end if


The only thing you'll have to change for adding the collapse feature to other "categories" such as statistics, birthdays, etc. is a unique string (PMs in the code above) for each cat, for example, "stats", "birthdays", etc.

I'm not very good at commenting stuff, so if anything is unclear (or you need help adding it to your code), feel free to ask.

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

Edited by - OneWayMule on 13 May 2004 11:11:17
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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07