View Full Version : Parse Error in List.php
shaun3000
13th of June 2006 (Tue), 15:07
Apparantly I screwed something up. I'd been adding Google Analytics to my page and I guess it doesn't like EE.
When viewing any gallery, say http://www.flamingduck.com/gallery/list.php?exhibition=10&u=965|6|..., I get this error:
Parse error: parse error, unexpected $ in /homepages/28/d94741124/htdocs/gallery/list.php on line 807
Any ideas?
Also, puting the Google Analytics token in Photo.php gives an Unexpected T_STRING error. Thoughs?
Thanks in advance!
Pekka
13th of June 2006 (Tue), 16:14
Well, take the custom code off to get things running.
I can't say anything without seeing the code, the error IS in line 807.
shaun3000
13th of June 2006 (Tue), 16:42
Here's the bit of code preceding 807, including 807, which is the last line in List.php
$resultcount = mysql_query("
SELECT
COUNT(DISTINCT ee_photo.ee_photo_id)
FROM
ee_photo_{$lazylang} {$index_force_ee_photo_id},
ee_photo {$index_force_ee_photo_id},
ee_lens,
ee_lens_{$lazylang},
ee_country_{$lazylang},
ee_location,
ee_camera,
ee_camera_{$lazylang},
ee_counter,
ee_photo_to_exhibition {$index_force_ee_photo_to_exhibition},
ee_exhibition,
ee_category_{$lazylang},
ee_photo_to_category,
ee_owner,
{$authorsort_table}
ee_light_{$lazylang}
WHERE
ee_photo.ee_photo_for_www = 'yes'
AND ee_photo_{$lazylang}.ee_photo_id = ee_photo.ee_photo_id
AND ee_exhibition.ee_exhibition_pass = '{$pass}'
AND ee_photo.ee_lens_id = ee_lens.ee_lens_id
AND ee_photo.ee_light_id = ee_light_{$lazylang}.ee_light_id
AND ee_photo.ee_camera_id = ee_camera.ee_camera_id
AND ee_photo.ee_country_id = ee_country_{$lazylang}.ee_country_id
AND ee_photo.ee_location_id = ee_location.ee_location_id
AND ee_counter.ee_counter_id = ee_photo.ee_counter_id
AND ee_photo_to_exhibition.ee_photo_id = ee_photo.ee_photo_id
AND ee_photo_to_exhibition.ee_exhibition_id = ee_exhibition.ee_exhibition_id
AND ee_photo_to_category.ee_category_id = ee_category_{$lazylang}.ee_category_id
AND ee_photo_to_caetgory.
The odd thing is the Analytics isn't added to list.php
Here is the Analytics code, which is to be added to every page you wish to track, just before the < /body> tag:<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "XX-XXXXXX-X";
urchinTracker();
</script>
Pekka
13th of June 2006 (Tue), 17:19
Well, that does not tell me anything. Better start with a clean list.php. For photo and list pages you need to add the javascript to templates, not list.php or photo.php.
mvrekum
14th of June 2006 (Wed), 03:00
On my old server I had Google analytics placed in the footer and it did not give any problems. I do not know where you placed the google code, but in the footer thats where it should go.
shaun3000
15th of June 2006 (Thu), 15:46
That did the trick. Thanks!
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.