vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How would I make a page show on WOL (https://vborg.vbsupport.ru/showthread.php?t=210615)

BBR-APBT 04-07-2009 11:24 PM

How would I make a page show on WOL
 
How would I make a page show on the whos on line.
I have my main site that is tied in with vbulletin but I dont use the skin templates.
How ever I would like to show people on these pages on the WOL.
I already include my global.php
I added the plugin to add custom pages to the WOL but the page has to show there first as Unknown location before I can do the plugin to show what I want.

I tried adding

Code:

define('THIS_SCRIPT', 'test');
Any suggestions would be great.

Lynne 04-08-2009 02:28 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=157329&highlight=online" target="_blank">Display Users Viewing non-vBulletin Pages in "Online Users"</a>

If you include global.php, all you should need to do is step 3 (along with defining THIS_SCRIPT at the top of your custom page).

BBR-APBT 04-08-2009 02:50 AM

I have and its not working.

I have added
Code:

define('THIS_SCRIPT', 'test');
in my head file above the php include for my global.php

It wont even show as unknown location.

Lynne 04-08-2009 03:03 AM

Are you sure that you are including global.php correctly? If so, you should be able to print out your userid in the page. If you can't get it to print out the userid, then global.php is not included correctly.

BBR-APBT 04-08-2009 08:35 AM

yes I am sure you can login and out on the page. I have other scripts I coded that post the users id and username to another database where I am storing information.

Now if I call a template it will show on WOL with unknown location(which I can fix). But I don't want to call a template from vbulletin if I don't plan on using it that would be a waste of resources of the server.

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

I can get it to show if I add the following.

Code:

$navbits = array();
$navbits[$parent] = 'Test Page';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('test') . '");');


But then that messes up the whole page its either blank or if I make the template it still isnt what I want to do. The pages are made I just want to show them in WOL.

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

No one has any ideas?

BBR-APBT 04-09-2009 07:56 PM

No help on this one?

Lynne 04-09-2009 08:45 PM

It's hard to say what is wrong with the little bit of info in this thread. I've never made a page without using a template when I wanted it to show up on the WOL, so I really can't say why it won't work without a template. Perhaps post your page and someone may be able to see what is wrong.

BBR-APBT 04-10-2009 12:33 AM

This is what I have the login works the bbcode parses and I pull other data.
Just cant get it to show on WOL. I don't get it. I can only get it to show if I use VB templates.

Code:

<?php
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'test');

chdir('path/to/dir');
$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();
require_once('/path/to/dir/global.php');
require_once('/path/to/dir/forums/includes/class_bbcode.php');
chdir ('path/to/dir');
?>

Then from here down is the html/php code for the website.

EnIgMa1234 04-10-2009 12:45 AM

Online users is called from index.php

Check lines #432 - 550 in your index.php

BBR-APBT 04-10-2009 01:05 AM

Ok I see all the code but how would I add that to that the pages on the other parts of my site are shown there.

I am sure I don't have to copy all that to my pages. I don't want to show the WOL on other pages of my site I want the other pages of my site to show on WOL.

Lynne 04-10-2009 01:18 AM

These lines are incorrect. You've already chdir, so don't put the whole path in there:
PHP Code:

require_once('/path/to/dir/global.php');
require_once(
'/path/to/dir/forums/includes/class_bbcode.php'); 

I'm not sure if that has anything to do with the problem though.

BBR-APBT 04-10-2009 01:21 AM

I have to use the whole path otherwise it don't work.
No bbcode parses and logins don't work.

Quote:

Originally Posted by Lynne (Post 1787877)
These lines are incorrect. You've already chdir, so don't put the whole path in there:
PHP Code:

require_once('/path/to/dir/forums/global.php');
require_once(
'/path/to/dir/forums/includes/class_bbcode.php'); 

I'm not sure if that has anything to do with the problem though.

I posted the correct paths I took out an extra forum dir when editing the real path.

Lynne 04-10-2009 02:31 AM

You don't need to use the whole path in those lines. I use this on one of my pages outside of the /forums directory and it works just fine:

PHP Code:

chdir('/home/path/to/my/forums');
require_once(
'./global.php'); 


BBR-APBT 04-10-2009 03:07 AM

ok but if the login works and it pulls the user name for the chat room etc. That cant be a problem.

BBR-APBT 04-11-2009 11:05 AM

Still doesn't work.

Lynne 04-11-2009 01:39 PM

I am guessing that when you call a template that has a header, headinclude, and footer in it, that there is something in the page that triggers the plugins you created for the WOL to work. Since you aren't calling those templates, then your WOL isn't working.

Andreas 04-11-2009 02:04 PM

To cut a log story short:

You must call
PHP Code:

exec_shut_down(); 

right before the end of your script.

Lynne 04-11-2009 02:13 PM

Thanks, Andreas. I was kinda out of ideas here!

BBR-APBT 04-11-2009 02:38 PM

wow umm lol. That was easy thanks a lot man all is working swell.

Thanks for trying to help lynne.


All times are GMT. The time now is 05:23 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.01648 seconds
  • Memory Usage 1,757KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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