blachapelle
Starting Member
23 Posts |
Posted - 09 April 2001 : 17:30:40
|
What code would I need to add to an asp page if I wanted to add new pages. I currently have made my own guestbook,and if a user is viewing the guestbook, I would like it to show in the Active Users page. Any help would be great.
Thanks
Moved by Richard from MOD Add-On Forum (W/Code) |
|
Martha2Mary
Junior Member
 
New Zealand
250 Posts |
Posted - 09 April 2001 : 18:25:35
|
Hi,
If what you are wanting to achieve is for active_users.asp to display that a Visitor/Member is currently at your Guestbook page, then you need to edit your inc_top.asp.
You will need to find the section of code that should begin with this line:
' TRY AND FIND OUT WHAT PAGE THEY ARE ON
Under this line, there will be a number of lines that look similar to this:
ElseIf lcase(Right(strOnlinePathInfo, 11)) = "pm_view.asp" Then strOnlineLocation = "<a href=""pm_view.asp"">Private Message Inbox</a>" ElseIf lcase(Right(strOnlinePathInfo, 14)) = "pm_options.asp" Then strOnlineLocation = "<a href=""pm_view.asp"">Private Messages Options</a>" ElseIf lcase(Right(strOnlinePathInfo, 15)) = "privatesend.asp" Then strOnlineLocation = "<a href=""privatesend.asp"">Sending Private Message</a>" ElseIf lcase(Right(strOnlinePathInfo, 16)) = "active_users.asp" Then strOnlineLocation = "<a href=""active_users.asp"">Active Users</a>" ElseIf lcase(Right(strOnlinePathInfo, 10)) = "events.asp" Then strOnlineLocation = "<a href=""events.asp"">Events Calendar</a>" ElseIf lcase(Right(strOnlinePathInfo, 8)) = "chat.asp" Then strOnlineLocation = "<a href=""chat.asp"">Chat Entry</a>" ElseIf lcase(Right(strOnlinePathInfo, 12)) = "bookmark.asp" Then strOnlineLocation = "<a href=""bookmark.asp"">Personal Bookmarks</a>" ElseIf lcase(Right(strOnlinePathInfo, 9)) = "links.asp" Then strOnlineLocation = "<a href=""links.asp"">Members Links</a>" ElseIf lcase(Right(strOnlinePathInfo, 13)) = "guestbook.asp" Then strOnlineLocation = "<a href=""guestbook.asp"">Guestbook</a>"
You will see by the above that I have already added my Guestbook to be included in the Active Users page, so you could just copy that line and add it if you like, but the following may be helpful if you want to add more pages in the future.
For each simple asp page, you would just add this line:
ElseIf lcase(Right(strOnlinePathInfo, 12)) = "pagename.asp" Then strOnlineLocation = "<a href=""pagename.asp"">Page Name</a>"
Of course, you replace the 'pagename.asp' with the correct name of the page you want to add, and the number in red above needs to be changed to reflect the number of characters in your page name, which in the case of pagename.asp is 12, in the case of guestbook.asp it is 13, etc.
I'm sorry that I am unable to explain it in better terminology - I'm sure someone else will do so if needed 
Hope this helps!
*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind * |
 |
|