Landing Page
(BlaB! AX Pro v21.01+)
A landing page displays a page with a list of rooms to choose from instead of loading room #1. A landing page is not displayed when you load the chat with a preselected room: index.php?room=2. To enable the landing page you need at least one symbol in the HEADER/FOOTER boxes under AdminCP ยป Additions ยป Landing page. A template that loads the list of rooms + who's online widget and another one that displays an advertisement for a few seconds are provided below the FOOTER box.
You can add any additional content and hide/display/alter rooms conditionally with JavaScript.
Any scripting must be inserted in the FOOTER box between <script></script> tags!
- ID, groupID and username of the current user are provided as an array:
userinfo=new Array(ID,groupID,'USERNAME')
- The content of a room element:
<div> <div>TITLE</div> <span>Description</span> </div>
- The parent DIV that contain all room elements is called rooms_container
- The number of enabled rooms for the current user:
de('rooms_container').children.length
- Access to the first room element as a DOM object:
de('rooms_container').children[0]
- Access to the last room element as a DOM object:
de('rooms_container').children[de('rooms_container').children.length-1]
- A loop that changes the title color of all rooms:
for(i=0;i<de('rooms_container').children.length;i++){ de('rooms_container').children[i].children[0].style.color='#a00' }
Page updated: 2022-10-05