View Full Version : unknown location in whos online...
scr2000ge
09-18-2005, 07:54 PM
id like to know if that issue will be fixed officially in the next release of cmps for vbulletin... :D
eclectica
09-20-2005, 05:34 AM
The Who's Online is actually run by vBulletin and not the CMPS. I think that happens when someone clicks on a file that isn't part of the standard vBulletin files. For example, if you have mycookies.php (http://www.vbulletin.com/forum/showthread.php?t=91523) on your forum and someone clicks on it, it will show up as "unknown location".
Gary Bolton
09-20-2005, 01:09 PM
You can fix this yourself by adding custom entries into the includes/functions_online.php
To show were people are located, rather than saying unknown location.
Gary Bolton
09-20-2005, 01:16 PM
As long as you have not renamed the cmps_index.php to another name (if you have you will have to edit the code below).
In: includes/functions_online.php (based on vBulletin 3.0.8)
Search for:
case 'bugs':
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'Bugs'); // Don't report 'bugs' as needing to be translated please :p
break;
After Add:
case 'cmps index':
$userinfo['action'] = 'Viewing CMPS Index';
$userinfo['where'] = "<a href=\"cmps_index.php?$session[sessionurl]\">$vboptions[hometitle]</a>";
break;
Look For:
case 'bugs.php':
$userinfo['activity'] = 'bugs';
break;
After Add:
case 'cmps_index.php':
$userinfo['activity'] = 'cmps index';
break;
FleaBag
10-03-2005, 12:10 PM
There is a product [hack] on vB.org that allows you to add locations without file edits. :)
scr2000ge
10-06-2005, 12:19 AM
url? thanks :)
glorify
10-08-2005, 11:50 AM
There is a product [hack] on vB.org that allows you to add locations without file edits. :)
But it only allows you to make a custom location for (for example) /gallery.php and not a pages like /gallery/gallery.php or index.php?page=links.
Avalon111
10-17-2005, 04:24 PM
thank you gary! thats what i was looking for!!!
Has anyone found a solution for this with vB 3.5? Currently, all the vBAdvanced pages are reported as "Viewing Index" and I need to hover over the ? icon to see the path/page.
Gary Bolton
10-21-2005, 01:55 PM
Here is the fix for vB 3.5 (untested but should work fine)
Keep in mind that this fix persumes you have the cmps_index.php file located in your forums folder (not the root). And you have not re-named the cmps_index.php file to another name. Otherwise you'll have to make the changes in the code below to suit you. To be honest I think its the same things your searching for as the original post I made above. :)
Look For:
case 'bugs':
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'Bugs'); // Don't report 'bugs' as needing to be translated please :p
break;
Below Add
case 'cmps index':
$userinfo['action'] = 'Viewing CMPS Index';
$userinfo['where'] = "<a href=\"cmps_index.php?$session[sessionurl]\">$vboptions[hometitle]</a>";
break;
Look For:
case 'bugs.php':
$userinfo['activity'] = 'bugs';
break;
Below Add
case 'cmps_index.php':
$userinfo['activity'] = 'cmps index';
break;
Thanks Gary. I've got CMPS set up in my site's root and vB in a /forum/ directory so it didn't quite work for me. I've also renamed the cmps_index.php page to index.php so it would serve as the home page for the whole site.
After studying your work for a while, I managed to hack something together that is working well:
Look for: case 'index':
$userinfo['action'] = $vbphrase['viewing_index'];
$userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . '</a>';
break;Replace with: case 'index':
if ($userinfo[location] == '/') {
$userinfo['action'] = 'Viewing CMPS Home Page';
$userinfo['where'] = '<a href="' . $userinfo[location] . '">CMPS Home Page</a>';
}
else {
$userinfo['action'] = $vbphrase['viewing_index'];
$userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . '</a>';
}
break;
case 'privacy':
$userinfo['action'] = 'Viewing Privacy Page';
$userinfo['where'] = '<a href="' . $userinfo[location] . '">Privacy Policy</a>';
break;Look for: case '/':
case '':
case 'cron.php': // this shouldn't occur but just to be sane
case $vbulletin->options['forumhome'] . '.php':
$userinfo['activity'] = 'index';
break;Replace with: case '/':
case '':
case 'cron.php': // this shouldn't occur but just to be sane
case $vbulletin->options['forumhome'] . '.php':
if ($values['page'] == 'privacy')
{
$userinfo['activity'] = 'privacy';
}
else
{
$userinfo['activity'] = 'index';
}
break;This code also shows how to set up CMPS custom pages. I've set up a CMPS custom page for the privacy policy and now it shows in Who's Online as a named page.
bouncingpeanut
11-20-2005, 03:42 PM
Thanks Gary. I've got CMPS set up in my site's root and vB in a /forum/ directory so it didn't quite work for me. I've also renamed the cmps_index.php page to index.php so it would serve as the home page for the whole site.
After studying your work for a while, I managed to hack something together that is working well:
Look for: case 'index':
$userinfo['action'] = $vbphrase['viewing_index'];
$userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . '</a>';
break;Replace with: case 'index':
if ($userinfo[location] == '/') {
$userinfo['action'] = 'Viewing CMPS Home Page';
$userinfo['where'] = '<a href="' . $userinfo[location] . '">CMPS Home Page</a>';
}
else {
$userinfo['action'] = $vbphrase['viewing_index'];
$userinfo['where'] = '<a href="' . $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'] . '">' . $vbulletin->options['bbtitle'] . '</a>';
}
break;
case 'privacy':
$userinfo['action'] = 'Viewing Privacy Page';
$userinfo['where'] = '<a href="' . $userinfo[location] . '">Privacy Policy</a>';
break;Look for: case '/':
case '':
case 'cron.php': // this shouldn't occur but just to be sane
case $vbulletin->options['forumhome'] . '.php':
$userinfo['activity'] = 'index';
break;Replace with: case '/':
case '':
case 'cron.php': // this shouldn't occur but just to be sane
case $vbulletin->options['forumhome'] . '.php':
if ($values['page'] == 'privacy')
{
$userinfo['activity'] = 'privacy';
}
else
{
$userinfo['activity'] = 'index';
}
break;This code also shows how to set up CMPS custom pages. I've set up a CMPS custom page for the privacy policy and now it shows in Who's Online as a named page.
Thanks pmkb - not sure about the custom page part but needed this as my cmps was in the root - really helpful post thank you (+ thanks to Gary for original code) you guys rock!
coolman
11-21-2005, 07:55 PM
I won't hack the php file if its only a small need, it gives me a hard time to upgrade later on. This is a little XML file that can solve the unknown location in WOL. Just import it to product.
da prez
12-28-2005, 12:59 AM
this plug-in works great, but i want the WOL to say Viewing Home Page, not Viewing Index,
because that is what it says when they are viewing forum index.
i have tried removing and changing different bits of code, but had no luck,
does anyone know the answer for this one ?
Freesteyelz
03-09-2006, 12:22 AM
You can edit the .XML file where it says:
$vbulletin->options[hometitle]
Change it to anything. I just tested it by replacing the code with "lala" and it worked. The second solution is to go into your Plugins and find "Hook Locations Unknown" and find that piece of code.
Using the plugin I created redundancies in "Hook Locations Unknown" and "Hook Locations Process" for each page that I want to show in WOL. Just edit the variables to point to the file. :)
Joey805
07-20-2006, 01:51 PM
You can edit the .XML file where it says:
$vbulletin->options[hometitle]
Change it to anything. I just tested it by replacing the code with "lala" and it worked. The second solution is to go into your Plugins and find "Hook Locations Unknown" and find that piece of code.
Using the plugin I created redundancies in "Hook Locations Unknown" and "Hook Locations Process" for each page that I want to show in WOL. Just edit the variables to point to the file. :)
Which part of this do I edit? When I replace $vbulletin->options[hometitle] with test, it then shows unknown location again.
Paulo
08-07-2006, 07:09 AM
Don't work for Vb 3.6
Have you a solution ?
Thank you
Kirby
09-04-2006, 06:57 AM
The Plugin works fine - as long as your CMPS Script is named cmps_index.php.
If you rename it, it will not work without editing the Plugin code.
Keep in mind that the filename must be different from the filename used for your forumhome.
If both files are named index.php for example, it won't ever work.
Joey805
09-07-2006, 02:06 PM
Which part of this do I edit? When I replace $vbulletin->options[hometitle] with test, it then shows unknown location again.
I would like to know this too. Can someone tell us exactly which part to edit to change the display name?
navjotjsingh
11-30-2006, 08:57 AM
Tried the plugin on 3.6.4 but it didn't work...in my case my vba index is index.php and I renamed cmps_index.php to index.php everywhere in xml file but still refused to work.
Any new ideas?
yuriy
11-30-2006, 02:56 PM
i have 3.6.3 and it doesn't work, someone please help, I know members can't see the Unknown location, but admins can, and it is kind of annoying, Brian should of fixed this with CMPS package. please help
Tom_S
01-20-2007, 07:32 PM
The Plugin works fine - as long as your CMPS Script is named cmps_index.php.
If you rename it, it will not work without editing the Plugin code.
Keep in mind that the filename must be different from the filename used for your forumhome.
If both files are named index.php for example, it won't ever work.
Sorry but that is quite UN-true. I did not rename mine and the error still occurs. I would really like to know the fix for this issue. It seems there should be a simple fix yet I can't find one.
EDIT:
However this fix did work. I changed one thing.
case 'cmps index':
$userinfo['action'] = 'Viewing Main Page';
$userinfo['where'] = "<a href=\"cmps_index.php?$session[sessionurl]\">$vboptions[hometitle]</a>";
break;
As long as you have not renamed the cmps_index.php to another name (if you have you will have to edit the code below).
In: includes/functions_online.php (based on vBulletin 3.0.8)
Search for:
case 'bugs':
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'Bugs'); // Don't report 'bugs' as needing to be translated please :p
break;
After Add:
case 'cmps index':
$userinfo['action'] = 'Viewing CMPS Index';
$userinfo['where'] = "<a href=\"cmps_index.php?$session[sessionurl]\">$vboptions[hometitle]</a>";
break;
Look For:
case 'bugs.php':
$userinfo['activity'] = 'bugs';
break;
After Add:
case 'cmps_index.php':
$userinfo['activity'] = 'cmps index';
break;
RetroDreams
01-25-2007, 10:49 PM
Can someone link to the hack on vB.org? I cannot seem to find it.
kamikage
02-10-2009, 09:23 AM
The Plugin works fine - as long as your CMPS Script is named cmps_index.php.
If you rename it, it will not work without editing the Plugin code.
Keep in mind that the filename must be different from the filename used for your forumhome.
If both files are named index.php for example, it won't ever work.
Ok so I edited your product becuase my cmps is at index.php
NOW: how can I get my forum.php to show up correctly in the WOL?
When someone is view the forum main page is shows as: "Viewing Index" which is wrong.
How can this be fixed using the latest vba and vb3.8x?
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.