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 01-11-2013, 12:33 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, this seems to work: name your script home.php, add a call to exec_shut_down(), then in the online_location_process plugin use case 'home.php' (with no path). Then just make sure whatever string you use for $userinfo['activity'] is the same one you use in the case in the online_location_unknown plugin.
Reply With Quote
  #12  
Old 01-11-2013, 02:06 AM
Mko's Avatar
Mko Mko is offline
 
Join Date: May 2009
Location: East Coast, USA
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
OK, this seems to work: name your script home.php, add a call to exec_shut_down(), then in the online_location_process plugin use case 'home.php' (with no path). Then just make sure whatever string you use for $userinfo['activity'] is the same one you use in the case in the online_location_unknown plugin.
Still doesn't work. For the plugins I'm calling inside vB:
online_location_process:
PHP Code:
switch ($filename)
{
    case 
'home.php':
        
$userinfo['activity'] = 'homepage';
        break;

online_location_unknown:
PHP Code:
switch ($userinfo['activity'])
{
    case 
'homepage':
        
$userinfo['where'] = '<a href="home.php?'.$vbulletin->session->vars[sessionurl].'">Homepage</a>';
        
$userinfo['action'] = "Viewing Homepage";
        break;

Thanks for the continued help ^_^
Reply With Quote
  #13  
Old 01-11-2013, 12:11 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...I don't see anything wrong with that. When you look at the session table what does it say now? If it doesn't say home.php (possibly with a path in front of it) then I think it means it's still some issue with your home.php script. If it does have home.php in it then it's something to do with one of the plugins.
Reply With Quote
  #14  
Old 01-11-2013, 06:46 PM
Mko's Avatar
Mko Mko is offline
 
Join Date: May 2009
Location: East Coast, USA
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Hmm...I don't see anything wrong with that. When you look at the session table what does it say now? If it doesn't say home.php (possibly with a path in front of it) then I think it means it's still some issue with your home.php script. If it does have home.php in it then it's something to do with one of the plugins.
The location that's stored in the database when I view home.php is:
/

Not sure how I'd get around that :s
Reply With Quote
  #15  
Old 01-11-2013, 07:11 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mko View Post
The location that's stored in the database when I view home.php is:
/

Not sure how I'd get around that :s

Yeah, I'm not sure why that is. I created a file named 'test.php' that just does a chdir to the forum directory and includes global.php, then calls exec_shut_down(), and when I browse to that file then look at the session table it says "./test4.php".

Is there anything else in your script that might access a vbulletin page?
Reply With Quote
  #16  
Old 01-11-2013, 07:14 PM
Mko's Avatar
Mko Mko is offline
 
Join Date: May 2009
Location: East Coast, USA
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Yeah, I'm not sure why that is. I created a file named 'test.php' that just does a chdir to the forum directory and includes global.php, then calls exec_shut_down(), and when I browse to that file then look at the session table it says "./test4.php".

Is there anything else in your script that might access a vbulletin page?
Whoops, was an error on my part. Sorry
Now, when I go to mysite.com/home.php, the value in the `session` table is actually /home.php! So, the value's getting stored in the table. All that we need to do is to get rid of that pesky Unknown Location :c

Do you think this can still be accomplished through those two plugins, or would there need to be some other modifications done to accomplish this?

Thanks for your continued help

--------------- Added [DATE]1357935560[/DATE] at [TIME]1357935560[/TIME] ---------------

I've fixed it! Turns out that the plugins I had added didn't work - they were designed for vB4, not vB3 :c

My final result:
online_location_process:
PHP Code:
if ($filename == 'home.php') { 
    
$userinfo['activity'] = 'homepage'

online_location_unknown:
PHP Code:
if ($userinfo['activity'] == 'homepage') { 
    
$userinfo['action'] = "Viewing Homepage";
    
$userinfo['where'] = "<a href='google.com'>Google</a>";
    
$handled true

As always, thanks for your help! I really appreciate it
Reply With Quote
Благодарность от:
kh99
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 12:25 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.03836 seconds
  • Memory Usage 2,237KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_php
  • (4)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
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete