![]() |
display script code in navgiation tab
I'd like to display total number of users in chat. The code is below.
<script language="javascript" src="somepath/connections.php"></script> I want to display it (float right) in the chat tab. The chat tab is created using the default navigation manger. See www.talkjesus.com So it says "chat" in the green tab", I want the displayed total users displayed on the right of it like this chad (space in middle) 10 10 = example of number of users in chat. My question now, how can I integrate that script code so it displays in the tab specifically? I'm using amend tabid to URL too. The ID is #tab_oda5_837 Thanks! |
Just wondering if anyone can help?
|
You should be able to edit the tab in the Navigation Manager and put your javascript code in the Title box, like maybe:
Code:
Chat <script language="javascript" src="somepath/connections.php"></script> |
That doesn't work
Error: The navigation element title is invalid. |
OK, it turns out that error is because you can only have 50 characters in that field. So you'll have to use a plugin. Try this: create a new plugin using hook build_navigation_data and this code:
Code:
if (!defined('VB_AREA') OR VB_AREA != 'AdminCP') |
Doesn't output anything.
Used this (active too) Code:
if (!defined('VB_AREA') OR VB_AREA != 'AdminCP') |
As a test, try changing the code like this:
Code:
$navdata['tab_oda5_837']['text'] .= ' X<script language="javascript" src="/logon_users.php"></script>'; You're specifying a php file as a javascript source file, so unless your logon_users.php outputs javascript code (and that code somehow displays a number), it's not going to work. |
Nevermind, got it working thanks. Was missing one file.
--------------- Added [DATE]1365432155[/DATE] at [TIME]1365432155[/TIME] --------------- I spoke too soon. It shows 0, even when I'm logged in. |
It seems like that would have to be a problem with the script you're calling.
|
I noticed I was missing the chat's 2 files, functions and config, which I've uploaded. However, config says
Code:
$chat_data_path = "C:/Program Files/123FlashChatServer6.9.4/server/data/default/"; [~/TopCMM/123FlashChat9.6 What should the path be from there in config file which is placed inside my forum's root folder? I got it displaying "0", but it stays 0 even when I was logged in chat |
All times are GMT. The time now is 06:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|