Who is Online - Page Problem - FIXED

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

At the page viewonline.php i can see where people is in the forum.

But i have implanted some mods and i have never seen in the
viewonline.php page that users visit those pages, so i suppose
those mods are missing some code to create it on the Who is Online - Page


Like now for example:
Guest Mon Jun 12, 2006 11:30 am Viewing member list
Guest Mon Jun 12, 2006 11:23 am Feedbacks (Idéer)
Guest Mon Jun 12, 2006 11:28 am Forum index
Guest Mon Jun 12, 2006 11:29 am
As you can see one is empty, that could be that he is on any of the
General pages or another mod page that isent "a part" of the normal forum..

But how should i be able to know that for sure ?
How do i add in the mod files so i see if a person is on that page ?
Last edited by Leon on Sat Jun 17, 2006 6:02 pm, edited 1 time in total.
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

I have no idea, it would all depend on the MOD installed. Have you double checked to make sure you didn't miss something when installing?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

Well i did make all the "General Pages" myself =P

(Whit only one help for the first code)

A standard hack prevent

Code: Select all

General.php (Root file)

<?php 

// standard hack prevent 
define('IN_PHPBB', true); 
$phpbb_root_path = './'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// standard session management 
$userdata = session_pagestart($user_ip, PAGE_TEMPLATE); 
init_userprefs($userdata); 

// set page title 
$page_title = 'General Content - Volunteer Related Materials'; 

// standard page header 
include($phpbb_root_path . 'includes/page_header.'.$phpEx); 

// assign template 
$template->set_filenames(array( 
        'body' => 'general.tpl') 
); 

$template->pparse('body'); 

// standard page footer 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 

?>
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Leon wrote:Well i did make all the "General Pages" myself =P

(Whit only one help for the first code)

A standard hack prevent

Code: Select all

General.php (Root file)

<?php 

// standard hack prevent 
define('IN_PHPBB', true); 
$phpbb_root_path = './'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// standard session management 
$userdata = session_pagestart($user_ip, PAGE_TEMPLATE); 
init_userprefs($userdata); 

// set page title 
$page_title = 'General Content - Volunteer Related Materials'; 

// standard page header 
include($phpbb_root_path . 'includes/page_header.'.$phpEx); 

// assign template 
$template->set_filenames(array( 
        'body' => 'general.tpl') 
); 

$template->pparse('body'); 

// standard page footer 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 

?>
Looks okay to me. I don't see how it can affect your who is online section though.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

But thats the problem it dosent affect that page

I want to see if someone is on my created general page
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
Burian
A Forum Addict
A Forum Addict
Posts: 59
Joined: Sat Nov 05, 2005 3:50 am
Contact:

Leon wrote:Well i did make all the "General Pages" myself =P

(Whit only one help for the first code)

A standard hack prevent

Code: Select all

General.php (Root file)

<?php 

// standard hack prevent 
define('IN_PHPBB', true); 
$phpbb_root_path = './'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// standard session management 
$userdata = session_pagestart($user_ip, [b]PAGE_TEMPLATE[/b]); 
init_userprefs($userdata); 

// set page title 
$page_title = 'General Content - Volunteer Related Materials'; 

// standard page header 
include($phpbb_root_path . 'includes/page_header.'.$phpEx); 

// assign template 
$template->set_filenames(array( 
        'body' => 'general.tpl') 
); 

$template->pparse('body'); 

// standard page footer 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 

?>
The PAGE_TEMPLATE is the problem.....You need to have it set in (correct me if I am wrong battye) constants.php, then have a corresponding language variable for it. I had a problem with this in my first mod and thats what I did to fix it.
Burian
http://cool-downloads.uni.cc

BurianBB Forum Development

Image
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Ah I see what you mean. Yes, Burian is correct.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

Burian wrote:
The PAGE_TEMPLATE is the problem.....You need to have it set in (correct me if I am wrong battye) constants.php, then have a corresponding language variable for it. I had a problem with this in my first mod and thats what I did to fix it.
Aha, so how do i fix it ?
(More details for a noob plixor)
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Open viewonline.php and find

Code: Select all

				case PAGE_VIEWMEMBERS:
					$location = $lang['Viewing_member_list'];
					$location_url = "memberlist.$phpEx";
					break;
After that, add

Code: Select all

				case PAGE_TEMPLATE:
					$location = 'my page';
					$location_url = "mypage.$phpEx";
					break;

Of course, replace 'my page' and 'mypage' with the real page names.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

Can i also change the "case PAGE_TEMPLATE"
(PAGE_TEMPLATE) to the real page name ?
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

As long as you change $userdata = session_pagestart($user_ip, PAGE_TEMPLATE); as well
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

That was what i ment =P

Thanks for the info.. updated and implanted, just wait and see if i see
if someone visits those pages now then :)
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

I tested whit a friend of mine just now, this is ALL i have done:

Code: Select all

viewonline.php
						case PAGE_GENERAL: 
							$location = 'General Content'; 
							$location_url = "general.$phpEx"; 
							break;
						case PAGE_GENERALENG: 
							$location = 'General Content English'; 
							$location_url = "general_eng.$phpEx"; 
							break;
						case PAGE_GENERALSWE: 
							$location = 'General Content Swedish'; 
							$location_url = "general_swe.$phpEx"; 
							break;

Code: Select all

admin/index.php
						case PAGE_GENERAL: 
							$location = 'General Content'; 
							$location_url = "general.$phpEx"; 
							break;
						case PAGE_GENERALENG: 
							$location = 'General Content English'; 
							$location_url = "general_eng.$phpEx"; 
							break;
						case PAGE_GENERALSWE: 
							$location = 'General Content Swedish'; 
							$location_url = "general_swe.$phpEx"; 
							break;

Code: Select all

General.php
$userdata = session_pagestart($user_ip, PAGE_GENERAL); 

Code: Select all

General_eng.php
$userdata = session_pagestart($user_ip, PAGE_GENERALENG); 

Code: Select all

General_swe.php
$userdata = session_pagestart($user_ip, PAGE_GENERALSWE);
And when he is on ANY of those tree pages it says in "Who is online"
that he is on Forum index :?

Is there any other file i have to change in ?
Burian talked about constants.php for example

UPDATE:
Wait i forgot about the url thing

Coming back soon

Done and it still not working
Last edited by Leon on Sat Jun 17, 2006 1:42 pm, edited 4 times in total.
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Yes, admin/index.php
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Leon
Know-It-All
Know-It-All
Posts: 282
Joined: Tue Feb 07, 2006 11:09 am
Contact:

What should i add in admin/index.php ?

Update:
Aha i see now
Talk, discuss or debate everything about Volunteer 'ing at this forum!
Volunteer Forum Community
Post Reply