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)
 Moving tree navigation to inc_header.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 25 November 2004 :  19:31:39  Show Profile  Visit MarkJH's Homepage
I'm trying to move the forum/topic tree-structure navigation into inc_header.asp but all it displays is an empty tree.

How would I go about doing this?

What I'm eventually after is variations of this in inc_header.asp:

All Forums > Category > Forum
Topic

Thanks.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

cripto9t
Average Member

USA
881 Posts

Posted - 26 November 2004 :  07:43:38  Show Profile
Edit: See my next post below
I posted this awhile back. I never got any feedback on the mod so I don't know if anyone ever used it. menu tree
Like it says I made it for the footer but I don't see why it wouldn't work in the header. I use it as an include file but you could also put it in "inc_func_common" as a sub.
I've improved it a bit since then. It supports the "active users" and "avatar" mods.
Here's the improved code I'm useing.
<%

Dim thisPage,newPage,subPage,adminPage
script_name = split(request.servervariables("SCRIPT_NAME"),"/")
thisPage = script_name(ubound(script_name))

newPage=(Replace(thispage,".asp",""))
newPage=(Replace(newPage,"admin_",""))
subPage=(Replace(thisPage,"admin",""))
adminPage=(Replace(thisPage,subPage,""))
  
if newPage ="active" then
   Response.Write " <table width=""100%"" border=""0"" cellpadding=""5px"" cellspacing=""0px""><tr><td align=""right"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" 
else
   Response.Write ""
end if

Response.Write "<a href=""JavaScript:history.go(-1)""><< Back  </a>//   "
 
if newPage = "default" then
   Response.Write "All Forums"
else
   Response.write " <a href=""default.asp"">All Forums</a>" 
end if

if adminPage="admin" then
   if newPage = "home" then
       Response.Write "  <b>::</b>  Admin Section"
   elseif newPage = "login" then
       Response.Write "  <b>::</b>  <a href=""admin_home.asp"">Admin Section</a>  <b>::</b>  Admin Login"
   else
       Response.Write "  <b>::</b>  <a href=""admin_home.asp"">Admin Section</a>  <b>::</b>  "
   end if
else
   Response.Write ""
end if


select case newPage
   case "config_system"
        Response.Write ("Main Forum Configuration")
   case "config_features"
        Response.Write ("Feature Configuration")
   case "config_members"
        Response.Write ("Member Detail Configuration")
   case "config_ranks"
        Response.Write ("Ranking Configuration")
   case "config_datetime"
        Response.Write ("Server Date/Time Configuration")
   case "config_email"
        Response.Write ("E-mail Server Configuration")
   case "config_colors"
        Response.Write ("Font/Table Color Code Configuration")
   case "config_activeusers"
        Response.Write ("Active Users Configuration")
   case "moderators"
        Response.Write ("Moderator Configuration")
   case "emaillist"
        Response.Write ("User E-mail List")
   case "avatar_home"
        Response.Write ("Avatar Home")
   case "avatar_settings"
        Response.Write ("<a href=""admin_avatar_home.asp"">Avatar Home  <b>::</b>  </a>Avatar Settings")
   case "add_avatar"
        Response.Write ("<a href=""admin_avatar_home.asp"">Avatar Home  <b>::</b>  </a>Add Avatar")
   case "review_avatar"
        Response.Write ("<a href=""admin_avatar_home.asp"">Avatar Home  <b>::</b>  </a>Review Avatar")
   case "avatar_mass_add"
        Response.Write ("<a href=""admin_avatar_home.asp"">Avatar Home  <b>::</b>  </a>Avatar Mass Add")
   case "info"
        Response.Write ("Server Information")
   case "variable_info"
        Response.Write ("Forum Variables Information")
   case "count"
        Response.Write ("Update Forum Counts")
   case "forums"
        Response.Write ("Forum Deletion/Archival")
   case "forums_schedule"
        Response.Write ("Forum Deletion/Archival")
   case "config_groupcats"
        Response.Write ("Group Catagory Configuration")
   case "mod_setup"
        Response.Write ("DB Setup")
   case "active_users" 
        Response.Write ("  <b>::</b>  " & fLang(strLangMOD_Ls3kAU_01010) & "(" & fLang(strLangMOD_Ls3kAU_01020) & " " & chkDate(DateToStr(strForumTimeAdjust)," ",true) & ")")
   case "faq"
        Response.Write ("  <b>::</b>  Frequently Asked Questions")
   case "members"
        Response.Write ("  <b>::</b>  Members Information")
   case "pop_profile"

          select case Request.QueryString("mode") 
            case "display" '## Display Profile
              Response.Write "  <b>::</b>  Members Profile"
            case "Edit"
              Response.Write "  <b>::</b>  Edit Your Profile"
            case "goEdit"
              Response.Write "  <b>::</b>  Edit Your Profile"
            case "Modify"
              Response.Write "  <b>::</b>  Modify Members Profile"
            case "goModify"
              Response.Write "  <b>::</b>  Modify Members Profile"
            case "EditIt"
              Response.Write "  <b>::</b>  Edit Your Profile"
            case "ModifyIt"
              Response.Write "  <b>::</b>  Modify Profile"
          end select
   case "policy"
        Response.Write ("  <b>::</b>  Registration Rules and Policy Agreement")
   case "search"
        Response.Write ("  <b>::</b>  Search Form")
        if Request.Form("Search") <> "" then
			Response.Write	 "  <b>::</b>  Search Results for: " & chkString(Request.Form("Search"),"display")
	elseif Request.QueryString("MEMBER_ID") <> "" then
			Response.Write	 "  <b>::</b>  Search Results for: All non-archived Topics that contain posts by " & getMemberName(cLng(Request.QueryString("MEMBER_ID")))
	end if
   case "active"
        Response.Write "  <b>::</b>  " & vbNewLine & _
                "Active Topics Since " & vbNewLine & _
                " </font></td><td align=""left"">" & vbNewLine & _
                "<table border=""0""><tr><td align=""right"" valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
                "<form name=""LastDateFrmF"" action=""active.asp"" method=""post"">" & vbNewLine & _
        	"               <select name=""ShowSinceDateTime"" size=""1"" onchange=""SetLastDateF();"">" & vbNewline & _
		"          	<option value=""LastVisit"""
        if ActiveSince = "LastVisit" or ActiveSince = "" then
	     Response.Write " selected"
        end if
        Response.Write	"> Last Visit on " & ChkDate(Session(strCookieURL & "last_here_date"),"",true) & " </option>" & vbNewline & _
		"          	<option value=""LastFifteen""" & chkSelect(ActiveSince,"LastFifteen") & "> Last 15 minutes</option>" & vbNewline & _
		"          	<option value=""LastThirty""" & chkSelect(ActiveSince,"LastThirty") & "> Last 30 minutes</option>" & vbNewline & _
		"          	<option value=""LastFortyFive""" & chkSelect(ActiveSince,"LastFortyFive") & "> Last 45 minutes</option>" & vbNewline & _
		"          	<option value=""LastHour""" & chkSelect(ActiveSince,"LastHour") & "> Last Hour</option>" & vbNewline & _
		"          	<option value=""Last2Hours""" & chkSelect(ActiveSince,"Last2Hours") & "> Last 2 Hours</option>" & vbNewline & _
		"          	<option value=""Last6Hours""" & chkSelect(ActiveSince,"Last6Hours") & "> Last 6 Hours</option>" & vbNewline & _
		"          	<option value=""Last12Hours""" & chkSelect(ActiveSince,"Last12Hours") & "> Last 12 Hours</option>" & vbNewline & _
		"          	<option value=""LastDay""" & chkSelect(ActiveSince,"LastDay") & "> Yesterday</option>" & vbNewline & _
		"          	<option value=""Last2Days""" & chkSelect(ActiveSince,"Last2Days") & "> Last 2 Days</option>" & vbNewline & _
		"          	<option value=""LastWeek""" & chkSelect(ActiveSince,"LastWeek") & "> Last Week</option>" & vbNewline & _
		"          	<option value=""Last2Weeks""" & chkSelect(ActiveSince,"Last2Weeks") & "> Last 2 Weeks</option>" & vbNewline & _
		"          	<option value=""LastMonth""" & chkSelect(ActiveSince,"LastMonth") & "> Last Month</option>" & vbNewline & _
		"          	<option value=""Last2Months""" & chkSelect(ActiveSince,"Last2Months") & "> Last 2 Months</option>" & vbNewline & _
		"          </select>" & vbNewline

Response.Write	"          <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine & _
		"          </form></font></td>" 
end select


if Cat_ID <> "" and Cat_Status = 0 then
   Response.Write "  <b>::</b>  <a href=""default.asp"">Show All Catagories</a>"
elseif Cat_ID <> "" and Cat_Status <> 0 and newPage <> "active" then
   Response.Write "  <b>::</b>  <a href=""default.asp?CAT_ID=" & Cat_ID & """>" & ChkString(Cat_Name,"display") & "</a>"
else
   Response.Write ""
end if



if Cat_Status <> 0 and Forum_Status <> 0 and newPage = "topic" then
   Response.Write "  <b>::</b>  <a href=""forum.asp?" & ArchiveLink & "FORUM_ID=" & Forum_ID & """>" & ChkString(Forum_Subject,"display") & "</a>"
elseif Forum_Status <> 0 and Cat_Status <> 0 and newPage = "forum" then
   Response.Write "  <b>::</b>  " & ChkString(Forum_Subject,"display")
else
   Response.Write ""
end if

if Cat_Status <> 0 and Forum_Status <> 0 and Topic_Status <> 0 and  newPage = "topic" then
        if Request.QueryString("SearchTerms") <> "" then
		Response.Write	"  <b>::</b>  " & SearchHiLite(ChkString(Topic_Subject,"title"))
	else
		Response.Write	"  <b>::</b>  " & formatStr((ChkString(Topic_Subject,"title")))
	end if
else
   Response.Write ""
end if

'Post menu start
if blnCStatus <> 0 and blnFStatus <> 0 and blnTStatus <> 0 and  newPage = "post" then
  if strRqMethod = "EditCategory" then
	Response.Write	"  <b>::</b>  " & ChkString(TxtSub,"display") & vbNewLine
  elseif strRqMethod = "EditForum" or strRqMethod = "EditURL" then
	Response.Write	"  <b>::</b>  <a href=""default.asp?CAT_ID=" & strRqCatID & """ tabindex=""-1"">" & ChkString(strCatName,"display") & "</a>" & vbNewLine
	Response.Write	"  <b>::</b>  " & ChkString(TxtSub,"display") & vbNewLine
  else
	if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
	strRqMethod = "Reply" or strRqMethod = "ReplySub" or strRqMethod = "ReplyQuote" or _
	strRqMethod = "Topic" or strRqMethod = "TopicQuote" then 
		Response.Write	"  <b>::</b>  <a href=""default.asp?CAT_ID=" & strRqCatId & """ tabindex=""-1"">" & ChkString(Cat_Name,"display") & "</a>" & vbNewLine & _
		         	"  <b>::</b>  <a href=""forum.asp?FORUM_ID=" & strRqForumId & """ tabindex=""-1"">" & ChkString(Forum_Subject,"display") & "</a>" & vbNewLine
	end if 
  end if 

  if strRqMethod = "Edit" or strRqMethod = "EditTopic" or _
  strRqMethod = "Reply" or strRqMethod = "ReplySub" or strRqMethod = "ReplyQuote" or _
  strRqMethod = "TopicQuote" then 
	if blnTStatus <> 0 and blnFStatus <> 0 and blnCStatus <> 0 then
	         Response.Write	"  <b>::</b>  <a href=""topic.asp?TOPIC_ID=" & strRqTopicID & """ tabindex=""-1"">" & ChkString(Topic_Title,"title") & "</a>" & vbNewLine
        end if
  end if
end if
'Post menu end
if newPage="active" then
   Response.Write "<td align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
                  "   \\<a href=""JavaScript:history.go(1)"">  Forward >></a>" & vbNewLine & _
                  "</font></td></tr></table></td></tr></table>" 
else
   Response.Write "   \\<a href=""JavaScript:history.go(1)"">  Forward >></a>"
end if
%>

edit: Code didn't paste right. I think I fixed it .
edit 2: Hmm looks alright in preview but sucks in the post. Should be fixed now.

    _-/Cripto9t\-_

Edited by - cripto9t on 26 November 2004 08:18:14
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 26 November 2004 :  08:16:09  Show Profile
quote:
Like it says I made it for the footer but I don't see why it wouldn't work in the header.

I take that back Mark. I see quite a few reasons it won't work in the header . Alot of the needed variables haven't been defined yet.
Sorry about that, but maybe it will help you out some .

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

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 26 November 2004 :  11:42:10  Show Profile  Visit MarkJH's Homepage
Is there a way to somehow define the variables before we get to forum.asp, default.asp etc.? Maybe the header could be included in those pages and each page that requires a tree have a different included header? I know, I'm picking at straws here.

Thanks, cripto9t.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 26 November 2004 :  19:57:13  Show Profile  Visit Jezmeister's Homepage
i suppose you could put in the required code from each page under (i think its this) 'if strScriptName = **INSERT PAGE NAME HERE** then Response.Write **PAGE CODE**'
all seems a lot of effort to just move something though.
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 27 November 2004 :  07:43:15  Show Profile  Visit MarkJH's Homepage
Not sure what you mean there, Jez.

I'll show you an example of what I'm working on:

http://www.bandlink.net/forum_old/topic.asp?TOPIC_ID=30639

As you can see, I've got it working in the format I want it in topic.asp (ignore everything else about the page, it's a major WIP) but it needs somehow moving to the header area.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

Edited by - MarkJH on 27 November 2004 07:44:33
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.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07