PDA

View Full Version : Custom Current Location Error HELP!!!


LinChang
12-10-2010, 07:14 PM
Crap... I post this on the wrong section.. Mod can you move it to 4.x section???

Ok I am adding code for Current Activity for my custom page so that when a user view another persons profile they can see the Current Activity and where that user is currently doing. I came across a few problems

Here is where my code is located
Hook Location : online_location_process
Plugin PHP Code :

if($filename == 'films.php')
{
$userinfo['activity'] = 'films';
}elseif($filename == 'watch.php')
{
$userinfo['activity'] = 'watch';
}

Here is the second code location
Hook Location : online_location_unknown
Plugin PHP Code :

if($userinfo['activity'] == 'films')
{
$userinfo['action'] = "Viewing <a href='films.php?". QUERY STRING ."'>Films Page</a>";
}
elseif($userinfo['activity'] == 'watch')
{
$userinfo['action'] = "Watching <a href='watch.php?". QUERY STRING ."'>Film</a>";
}


Now when I visit one of those pages, and go to the profile section their is a error on top that says

Parse error: parse error in C:\wamp\www\forum\includes\functions_online.php(12 14) : eval()'d code on line 8
How do i fix this error?
Also how do I Add the QUERY STRING of the current page in the above QUERY STRING in red, so that when a user click on the Current activity it will bring them to the exact page that the user is in