PDA

View Full Version : Problem with 'Unknown Location'


Veteranich
06-07-2008, 07:36 AM
Hello, I have a problem. I see the message 'Unknown location' on the WOL page. I understood the problem, a code of plugin that hook is 'online_location_unknown' doesn't include in php file. Other hooks do.

Example:
<plugin active="1" executionorder="5">
<title>Hack</title>
<hookname>online_location_unknown</hookname>
<phpcode><![CDATA[// The code]]></phpcode>
</plugin>

The code doesn't include in a functions_online.php. If I include the code manually in the php file, all will be ok, it will be work. But the code of plugin doesn't include, I don't know why. Other codes that have other hooks include.

I hope you can help me.

Opserty
06-07-2008, 09:42 AM
Start again, try following these instructions and see if you have any luck: https://vborg.vbsupport.ru/showthread.php?t=121776&highlight=location

Veteranich
06-07-2008, 09:55 AM
No, all plugins have been installed yet.

Example:
<plugin active="1">
<title>downloads_location_process</title>
<hookname>online_location_process</hookname>
<phpcode><![CDATA[if ($filename == 'downloads.php')
{
$userinfo['activity'] = 'downloads';
}]]></phpcode>
</plugin>
<plugin active="1">
<title>downloads_location_unknown</title>
<hookname>online_location_unknown</hookname>
<phpcode><![CDATA[if ($userinfo['activity'] == 'downloads')
{
$userinfo['where'] = '<a href="downloads.php?'.$vbulletin->session->vars[sessionurl].'">'.$vbphrase['ecdownloads'].'</a>';
$userinfo['action'] = 'Viewing downloads;
$handled = true;
}]]></phpcode>
</plugin>

That code is actived now.

Opserty
06-07-2008, 10:15 AM
You are adding these Plugins through the AdminCP correct? (and not through the XML)

If so, I don't know where the code is going wrong, as it looks similar to the one given in that article.

Veteranich
06-07-2008, 10:27 AM
And through ACP and through XML - one result - nothing.

Lynne
06-07-2008, 01:59 PM
Could this line be wrong? Maybe do without the sessionurl info:
$userinfo['where'] = '<a href="downloads.php?'.$vbulletin->session->vars[sessionurl].'">'.$vbphrase['ecdownloads'].'</a>';

Veteranich
06-08-2008, 05:13 PM
No different. It isn't the reason of it.

Lynne
06-08-2008, 05:29 PM
So what do you have now? And should I assume you fixed this line (sorry, I didn't comment on it before, but possibly you picked up on it):
$userinfo['action'] = 'Viewing downloads;

You are missing the second apostrophe:
$userinfo['action'] = 'Viewing downloads';

Veteranich
06-08-2008, 06:14 PM
:rolleyes:

I put the second apostroph, but the problem didn't disappear.

Lynne
06-08-2008, 06:35 PM
What is showing up in the source code? I'm wondering if maybe the phrase is not available there and therefore the link is in the source code but with no text to show it? (if that makes sense - but check the source code or try putting something in place of the phrase for testing purposes.)

Veteranich
06-09-2008, 05:07 AM
I tried to switch off all plugins that hooks are 'online_location_process', 'online_location_unknown', 'online_location_preprocess' and then I switched on it and it works! (perhaps, the apostroph was the reason of it :rolleyes:). Thank you, Lynne :)