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.