SOLVED Hide Chat-Button For Bots


Subject: Hide Chat-Button For Bots
Hello.
Style: rainbow pearl and black pearl.

I have a chat in my forum (ajax_chat-0.8.3_phpBB3).
I would like to hide the chat button for guests and bots.
How can I do that?

The line for the chat button in the menu_block.html:
Code: [Download] [Hide] [Select]
<a target="_blank" href="chat/index.php">Chat</a> <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> 

The complete menu_block.html:
Code: [Download] [Hide] [Select]
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="forum-buttons" colspan="3" width="100%">
<!-- IF not S_IS_BOT -->
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><a href="{U_REGISTER}">{L_REGISTER}</a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> <!-- ENDIF -->
<a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> 
<!-- IF S_USER_LOGGED_IN --><a href="{U_PROFILE}">{L_PROFILE}</a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> <!-- ENDIF -->
<!-- ENDIF -->
<!-- IF U_RESTORE_PERMISSIONS --><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> <!-- ENDIF -->

<a target="_blank" href="chat/index.php">Chat</a> <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> 


<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
<!-- IF S_DISPLAY_PM --><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a><!-- IF PRIVATE_MESSAGE_INFO_UNREAD --><a href="#"> / </a><a href="{U_PRIVATEMSGS}" class="PM-new-link">{PRIVATE_MESSAGE_INFO_UNREAD}</a><!-- ENDIF -->  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> <!-- ENDIF -->
<!-- ENDIF -->
<!-- IF S_DISPLAY_MEMBERLIST --><a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> <!-- ENDIF -->
<!-- ENDIF -->
<!-- IF S_DISPLAY_SEARCH --><a href="{U_SEARCH}">{L_SEARCH}</a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" /> <!-- ENDIF -->
<a href="{U_FAQ}">{L_FAQ}</a></a>  <img src="{T_THEME_PATH}/images/menu_sep.png" alt=""/> <!-- IF S_VIEW_STATS --><a href="{U_STATS}">{L_STATISTICS}</a><!-- ENDIF -->






</td>
</tr>
</table>

Thank you.
Greetings Piet


edit: One more question about it. What I have to change, so the link will not open in a new window?

Profile PM  
Subject: Re: Hide Chat-Button For Bots
Try this:


Replace:

Code: [Download] [Hide] [Select]
<a target="_blank" href="chat/index.php">Chat</a> <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" />


With:

Code: [Download] [Hide] [Select]
<!-- IF not S_IS_BOT -->
<!-- IF S_USER_LOGGED_IN -->
<a target="_blank" href="chat/index.php">Chat</a> <img src="{T_THEME_PATH}/images/menu_sep.png" alt="" />
<!-- ENDIF --><!-- ENDIF -->


Quote:
What I have to change, so the link will not open in a new window?


Remove: target="_blank"

Pretty basic stuff! Maybe you should spend some at phpbb.com reading about these things? :roll:

Profile PM  
Subject: Re: Hide Chat-Button For Bots
Many thanks for the reply. This has helped me a lot. :mrgreen:

I am not a php expert. Learning while doing.
A lot of help I get myself in fact at phpbb.com.
Much also at this place, here was helped me very well because this is exactly the place for such questions is:Link
And yet there are forums to do exactly what I asked. :idea:

Profile PM  
Subject: Re: Hide Chat-Button For Bots
Piet wrote: [View Post]
A lot of help I get myself in fact at phpbb.com.


I keep forgetting how daunting phpBB template code must be for people who are trying to learn it as they go. :mryellow:

It's not the easiest to read and follow! :(

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.0804s (PHP: 21% SQL: 79%)
SQL queries: 11 - Debug Off - GZIP Enabled