Print Page | Close Window

Add new button to nav bar after log on

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4680
Printed Date: 02 April 2026 at 6:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Add new button to nav bar after log on
Posted By: Hitek
Subject: Add new button to nav bar after log on
Date Posted: 02 August 2003 at 8:42am

Hi there,

Question: I would like to display another button to the nav bar after a user has authenticated himself (has logged in). It will be a custom button that leads him to the chat box (to which he only has access when logged in). This seems to me the easiest way of integrating the chatbox (with some access control). So my question is:

1. How do I integrate this new button? I presume somewhere in includes/navigation_buttons_inc.asp but I am not ans ASP expert.

2. Is is possible to show that button just for specific (logged-in)private groups (such as the admin button that is just for administrators)?

3. Another way of giving access to the chatbox is testing if a user is logged in into the forum (with certain credentials i.e. the correct private group) and therefor allowing him to display the log-in page. How can I accomplish that? That seems to me the easiest way without messing up the original code ;-)

The chatbox i use is conquerchat (which has very limited access controll possibilities or mods, and to my knowledge no integration with this forum).

thanks in advance,

Theo Tekstra

Looked at Sith's mod for chat (line 87 in navigation_buttons_inc):

Response.Write ("&nbsp;&nbsp;<a href=""javascript:openWin('" & strForumPath & "/messenger.html?FID=" & intForumID & "','profil','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=450,height=290')""><img src=""" & strImagePath & "small_admin_icon.gif"" align=""absmiddle"" border=""0"" alt=""" & "[Chat]" & """>" & "Chat" & "</a>")

If I understand it correctly, it shows the chat button when logged in and open it in a new window when clicked on. This way the link to the chat is only displayed when logged in. I also do like the fact that the chatbox starts in a window of my size and choice. I got as far as:

Response.Write ("&nbsp;&nbsp;<a href=""javascript:openWin('../conquerchat/default.asp')""><img src=""" & strImagePath & "small_admin_icon.gif"" align=""absmiddle"" border=""0"" alt=""" & "[Chat]" & """>" & "Chat" & "</a>")

And that opens a chat window indeed, but without all the nice features like automatic login, not displaying borders etc.

I saw another post mentioning this line of code for automatically logging in:

<a href="../conquerchat/default.asp?username=<% = strLoggedInUsername %>&mode=userLogin" class="menu" target="_new">Chat Room</a>

And that works like a charm. So how do I combine the both? So i get a chat button when logged on (which already works), but with the nice new window without navigation options and the automatic log in... And possibly in the right lay-out as well... (now i get an alternative text link in different font style in the navigation bar)

 I am a bit a newbie to ASP so your help is very much appreciated.

tia!

Theo Tekstra



-------------
Smile.
Tomorrow will be worse



Replies:
Posted By: Hitek
Date Posted: 21 August 2003 at 3:35pm
hmm, is this a silly question or just plain difficult?

-------------
Smile.
Tomorrow will be worse


Posted By: God_Struth
Date Posted: 21 August 2003 at 4:11pm

I ain't 100% sure what your main aim is here, is it the 'hidden button', which is your original queery, or is it to integrate the login?

 

To only show the button when users are logged in just add a hyperlink next to the logged in user link, or private message link, or just write a link with authentication:

Like this:

<%
    
'If the user has logged in then the Logged In User ID number will not be 0 and not 2 for the guest account
If lngLoggedInUserID <> 0 AND lngLoggedInUserID <> 2 Then
 
 'Display a link for the chat
 Response.Write (&nbsp;<a href=""javascript:openpopup()"" class=""nav"" title=""Click here to launch the Chat Window"">Chat</a>")


'Else the user is not logged
Else
          Response.Write ("&nbsp;")
End If

%>

 

As for the integration, I would need to look at what you are using to have an idea!




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net