|
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 (" <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 (" <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
|