Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-26-2007, 10:06 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you put $apichat[currentuserlocation] in the place where you want the number of users currently in chat in your FORUMHOME template to show on your page.
Reply With Quote
  #12  
Old 12-26-2007, 10:12 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes I have. It should appear on right side of shout box above 4 icons, in the blank small purple box next to "members currently in live chat".

Tried this code also

Code:
function getAPI($command) {
        $er = error_reporting(0);
        $result = file_get_contents("http://147.202.66.3:8085/?api.".$command);
        error_reporting($er);
        return $result;
    }

$apichat['currentuserslocation'] = getAPI("UserCount");
--------------- Added [DATE]1198714951[/DATE] at [TIME]1198714951[/TIME] ---------------

I also corrected the missing "s" in what you told me to put in forumhome template

currentuserslocation


That still didn't fix it.
Reply With Quote
  #13  
Old 12-26-2007, 10:23 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this page have this code
PHP Code:
    function getAPI($command) {
        
$er error_reporting(0);
        
$result file_get_contents("http://147.202.66.3:8085/?api.".$command);
        
error_reporting($er);
        return 
$result;
    }
     
    echo 
"Number of users: ".getAPI("UserCount")."<br/>";
    echo 
"Rooms available: ".getAPI("RoomList"); 
If it does, check to makesure your ip is allowed to access this page because it is not showing 0 or anything for me after Number of Users and Rooms available. This IP needs to be the IP address of your webserver.
Reply With Quote
  #14  
Old 12-26-2007, 10:29 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's because Usercount is supposed to be UserCount (case sensitive)

http://147.202.66.3:8085/?api.UserCount

The exact code in that rcplugin.php page is this:


Code:
<?php
    function getAPI($command) {
        $er = error_reporting(0);
        $result = file_get_contents("http://147.202.66.3:8085/?api.".$command);
        error_reporting($er);
        return $result;
    }
     
    echo "Number of users: ".getAPI("UserCount")."<br/>";
    echo "Rooms available: ".getAPI("RoomList"); 
?>
Reply With Quote
  #15  
Old 12-26-2007, 10:33 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes

but the problem is because of the ip
We are not allowed to view it
Reply With Quote
  #16  
Old 12-26-2007, 10:38 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://talkjesus.com:8085/?api.UserCount

It shows "1" properly, since I'm in chat.

However, still not showing up on forumhome
Reply With Quote
  #17  
Old 12-26-2007, 10:38 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes but the problem is this page is still outputting
Quote:
Number of users:
Rooms available:
with no numbers. So the problem is the connection between your webserver and the API Chat getting the data(numbers).
Reply With Quote
  #18  
Old 12-26-2007, 10:43 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok fixed! Thanks for all the help folks.

Actually, maybe you can help me get this in WOL area, a new section that is (kind of like FlashChat WOL's area) where it shows you the usernames in chat and if you hover, what room they're in.

I fixed the problem by adding the IP address to trusted IP in RC admin panel

i used this in forumhome

$apichat[currentuserlocation]

And this in plugin:

Code:
function getAPI($command) {
        $er = error_reporting(0);
        $result = file_get_contents("http://talkjesus.com:8085/?api.".$command);
        error_reporting($er);
        return $result;
    }

$apichat['currentuserlocation'] = getAPI("UserCount");
Reply With Quote
  #19  
Old 12-26-2007, 10:54 PM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well you can use this but it is not going to do what you are talking about.
WhoWhere - lists all of the users in all rooms; with one room per line, formatted as: roomID: roomName: userList.
Insert this code at the end of the plugin.
PHP Code:
$apichat['current_users'] = getAPI("WhoWhere"); 
That will get you the list of users and the room. What you are talking about would take some changes in how the API Chat works or some trial and error with PHP.
Reply With Quote
  #20  
Old 12-26-2007, 10:57 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, but how do I get it to appear in the WOL section (footer)?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04524 seconds
  • Memory Usage 2,277KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete