PDA

View Full Version : How would I make a page show on WOL


BBR-APBT
04-08-2009, 12:24 AM
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

define('THIS_SCRIPT', 'test');

Any suggestions would be great.

Lynne
04-08-2009, 03: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, 03:50 AM
I have and its not working.

I have added
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, 04: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, 09: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 1239197151 at 1239197151 ---------------

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


$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 1239229628 at 1239229628 ---------------

No one has any ideas?

BBR-APBT
04-09-2009, 08:56 PM
No help on this one?

Lynne
04-09-2009, 09: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, 01: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.


<?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, 01:45 AM
Online users is called from index.php

Check lines #432 - 550 in your index.php

BBR-APBT
04-10-2009, 02: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, 02:18 AM
These lines are incorrect. You've already chdir, so don't put the whole path in there:
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, 02:21 AM
I have to use the whole path otherwise it don't work.
No bbcode parses and logins don't work.

These lines are incorrect. You've already chdir, so don't put the whole path in there:
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, 03: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:

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

BBR-APBT
04-10-2009, 04: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, 12:05 PM
Still doesn't work.

Lynne
04-11-2009, 02: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, 03:04 PM
To cut a log story short:

You must call

exec_shut_down();

right before the end of your script.

Lynne
04-11-2009, 03:13 PM
Thanks, Andreas. I was kinda out of ideas here!

BBR-APBT
04-11-2009, 03:38 PM
wow umm lol. That was easy thanks a lot man all is working swell.

Thanks for trying to help lynne.