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

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2009, 02:33 AM
HG-ILUSION HG-ILUSION is offline
 
Join Date: Apr 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default External vB Page

Hi, I follow the example of phgstats integration (https://vborg.vbsupport.ru/showthread.php?t=183096) and I "modified" this page (file attached).

The problem is if I on the external page I don't see me on "Who's Online" page

I put this code as plugin:

Hook Location: online_location_process

PHP Code:
if ($filename == 'prueba.php')
{
        
$userinfo['activity'] = 'prueba';


Hook Location:
online_location_unknown

PHP Code:
if ($userinfo['activity'] == 'prueba')
{
        
$userinfo['action'] = 'Contactando al Staff de Hunter Gamers';
        
$userinfo['where'] = '<a href="/foro/prueba.php'.$vbulletin->session->vars['sessionurl_q'].'">"Contactar al Staff"</a>';
        
$handled true;

Screen #1: Unlogged, display no permission in custom page. Link
Screen #2: Logged, displays me as "loggin in" Link

Sorry if you can't understand me. I have very bad english

Thanks
Attached Images
File Type: jpg 1.jpg (19.4 KB, 0 views)
File Type: jpg 2.jpg (88.8 KB, 0 views)
Attached Files
File Type: php prueba.php (1.6 KB, 8 views)
Reply With Quote
  #2  
Old 05-10-2009, 08:50 AM
HG-ILUSION HG-ILUSION is offline
 
Join Date: Apr 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone can help me?
Reply With Quote
  #3  
Old 05-10-2009, 03:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm guessing it's because you aren't using a template to spit out the page and thus you are missing some call at the end of the file. Someone else posted a problem where the who's online wasn't working corrected on a page and they weren't using a template for the external page either and the problem was traced to that. The fix was posted in the thread. Do a search in this forum for another thread about this issue - search on the name of one of those hook locations - and you should find it.
Reply With Quote
  #4  
Old 05-10-2009, 04:33 PM
HG-ILUSION HG-ILUSION is offline
 
Join Date: Apr 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not using a template because I need use a php code in that page.

I can't find that thread. Have you got the link?

I have this php code but it says "Unknow Location"

PHP Code:
require_once('./includes/functions_user.php'); 

if(
$vbulletin->userinfo['userid'] > 0
    
$location $vbulletin->db->query_first("SELECT location,sessionhash FROM " TABLE_PREFIX "session WHERE userid = ".$vbulletin->userinfo['userid']." ORDER BY lastactivity DESC LIMIT 1");
else
    
$location $vbulletin->db->query_first("SELECT location,sessionhash FROM " TABLE_PREFIX "session WHERE sessionhash = '".$vbulletin->session->vars['dbsessionhash']."' ORDER BY lastactivity DESC LIMIT 1");

if(
$location['sessionhash'] != "") {
    
$vbulletin->db->query_first("UPDATE " TABLE_PREFIX "session SET location = 'prueba.php?"$_SERVER["QUERY_STRING"] ."', lastactivity = '"TIMENOW ."' WHERE sessionhash = '"$location['sessionhash'] ."' LIMIT 1");
} else {
    
$vbulletin->db->query_first("INSERT INTO `session` ( `sessionhash` , `userid` , `host` , `idhash` , `lastactivity` , `location` , `useragent` , `styleid` , `languageid` , `loggedin` , `inforum` , `inthread` , `incalendar` , `badlocation` , `bypass` , `profileupdate` ) 
        VALUES ( '"
$vbulletin->session->vars['dbsessionhash']."', ".$vbulletin->userinfo['userid'].",  '".IPADDRESS."' , '".$vbulletin->session->vars['idhash']."', '".TIMENOW."', 'prueba.php?"$_SERVER["QUERY_STRING"] ."', '".$_SERVER["HTTP_USER_AGENT"]."', '0', '0', '1', '0', '0', '0', '0', '0', '0');");

Thanks for your reply.
Reply With Quote
  #5  
Old 05-10-2009, 04:42 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the thread I was thinking of - https://vborg.vbsupport.ru/showthread.php?t=210615


With that code you have above... have you looked in the database to see what is getting input, if anything?
Reply With Quote
  #6  
Old 05-10-2009, 05:12 PM
HG-ILUSION HG-ILUSION is offline
 
Join Date: Apr 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot.

Now it works fine ^^!

Thanks Lynne
Reply With Quote
  #7  
Old 05-10-2009, 05:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So it was the "exec_shut_down(); " line?
Reply With Quote
  #8  
Old 05-10-2009, 05:39 PM
HG-ILUSION HG-ILUSION is offline
 
Join Date: Apr 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I put that line in the bottom of the page
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 05:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04016 seconds
  • Memory Usage 2,268KB
  • Queries Executed 14 (?)
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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (3)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete