vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Custom WOL for index.php (https://vborg.vbsupport.ru/showthread.php?t=296519)

evenmonkeys 03-26-2013 03:24 AM

Custom WOL for index.php
 
Currently, index.php points to "Viewing Forum Index" which is okay. I'd like to know if there's a way to make it so if they're on "index.php?page=example" that it would show "Viewing Page: Example" or something of the sort. I just can't figure out how to do it.

Thanks.

CoffeeLovesYou 03-26-2013 08:16 AM

The way I learned how to do this;
Make a new plugin with any name
hook it to online_location_process
PHP Code:

if ($filename == 'index.php?page=example')
{
    
$userinfo['activity'] = 'pageexample';


now make another plugin with a new name
hook to online_location_unknown
PHP Code:

if($userinfo['activity'] == 'pageexample')
{
    
$userinfo['where'] = 'Example';
    
$userinfo['action'] = "Viewing Page:";
    
$handled true;


This should work. Let me know if it doesn't. I only used it where the file ended with .php (for example, custompage.php), not when it didn't end with an extension (it's ending with ?page=example), but it may work still.

evenmonkeys 03-30-2013 11:34 PM

Thanks for the reply. It doesn't appear to work though. I even tried adding to the first part.
Code:

if ($filename == 'index.php' && $_REQUEST_['page'] == 'example')
This did not work either.

CoffeeLovesYou 03-31-2013 08:56 PM

What you added looks like it'd work. But why the extra underscore?

PHP Code:

if ($filename == 'index.php' && $_REQUEST['page'] == 'example'


evenmonkeys 04-01-2013 12:17 AM

Oh, I didn't mean to type that when I wrote it here. That doesn't work.


All times are GMT. The time now is 01:14 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.01714 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete