Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Add new button to nav bar after log on
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Add new button to nav bar after log on

 Post Reply Post Reply
Author
Hitek View Drop Down
Newbie
Newbie


Joined: 29 July 2003
Location: Netherlands
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hitek Quote  Post ReplyReply Direct Link To This Post Topic: Add new button to nav bar after log on
    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



Edited by Hitek
Back to Top
Hitek View Drop Down
Newbie
Newbie


Joined: 29 July 2003
Location: Netherlands
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hitek Quote  Post ReplyReply Direct Link To This Post Posted: 21 August 2003 at 3:35pm
hmm, is this a silly question or just plain difficult?
Back to Top
God_Struth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
Post Options Post Options   Thanks (0) Thanks(0)   Quote God_Struth Quote  Post ReplyReply Direct Link To This Post 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!



Edited by God_Struth
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.