phpBB Garage

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
77
76%
Very Good
13
13%
Good
9
9%
Fair
1
1%
Poor
1
1%
 
Total votes: 101

CeeReD
Registered User
Posts: 6
Joined: Tue Jun 13, 2006 11:07 pm

Post by CeeReD » Wed Jun 14, 2006 3:32 am

I have an error when viewing the profile.

Parse error: parse error, unexpected ';' in /home/bouncea/public_html/includes/usercp_viewprofile.php on line 569

Also when viewing admin:
Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/bouncea/public_html/language/lang_english/lang_admin.php on line 795


It occurs when I add the following code.

Code: Select all

//-- mod start : Garage ----------------------------------------------------------------------------------------------------
//-- add
require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_garage.' . $phpEx);
require($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_garage_error.' . $phpEx);
require($phpbb_root_path . 'includes/class_garage.' . $phpEx);
require($phpbb_root_path . 'includes/class_garage_image.' . $phpEx);

$sql = "SELECT g.*, images.*, makes.make, models.model, user.username, user.user_avatar_type,
	user.user_allowavatar, user.user_avatar,
        count(mods.id) AS total_mods,  
        ( SUM(mods.price) + SUM(mods.install_price) ) AS total_spent 
        FROM " . GARAGE_TABLE . " g  
		LEFT JOIN " . USERS_TABLE ." user ON (g.member_id = user.user_id)
                LEFT JOIN " . GARAGE_MODS_TABLE . " mods ON (g.id = mods.garage_id)
                LEFT JOIN " . GARAGE_MAKES_TABLE . " makes ON (g.make_id = makes.id)
                LEFT JOIN " . GARAGE_MODELS_TABLE . " models ON (g.model_id = models.id)
		LEFT JOIN " . GARAGE_IMAGES_TABLE . " images ON (images.attach_id = g.image_id)
        WHERE g.member_id = " . $profiledata['user_id'] . " AND g.main_vehicle = 1
                GROUP BY g.id";

if ( !($result = $db->sql_query($sql)) )
{
       	message_die(GENERAL_ERROR, 'Could Not Select Vehicle Data', '', __LINE__, __FILE__, $sql);
}

$vehicle_row = $db->sql_fetchrow($result);

if ( $db->sql_numrows($result) > 0 )
{
	$template->assign_block_vars('garage_vehicle', array());
	$total_spent = $vehicle_row['total_spent'] ? $vehicle_row['total_spent'] : 0;

	//Display Just Thumbnails Of All Images Or Just One Main Image
	if ( $garage_config['profile_thumbs'] == 1 )
	{

		$gallery_data = $garage_image->select_gallery_data($vehicle_row['id']);
        	while ( $i=0; $i < count($gallery_data); $i++ )
	       	{
            		if ( $gallery_data[$i]['attach_is_image'] )
           		{
                		// Do we have a thumbnail?  If so, our job is simple here :)
				if ( (empty($gallery_data[$i]['attach_thumb_location']) == FALSE) AND ($gallery_data[$i]['attach_thumb_location'] != $gallery_data[$i]['attach_location']) AND ( $vehicle_images_found <= 12) )
                		{
                    			// Form the image link
					$thumb_image = GARAGE_UPLOAD_PATH . $gallery_data[$i]['attach_thumb_location'];
					$id = $gallery_data[$i]['attach_id'];
					$title = $gallery_data[$i]['attach_file'];
					$hilite_image .= '<a href=garage.php?mode=view_gallery_item&type=garage_gallery&image_id='. $id .' title=' . $title .' target="_blank"><img hspace="5" vspace="5" src="' . $thumb_image .'" class="attach"  /></a> ';
               			} 
			}
	        }

		$mod_query = "SELECT m.*,images.attach_id, images.attach_hits, images.attach_ext, 
                        images.attach_file, images.attach_thumb_location, images.attach_is_image,
                        images.attach_location
         		FROM " . GARAGE_MODS_TABLE . " m
                        LEFT JOIN " . GARAGE_IMAGES_TABLE . " images ON (images.attach_id = m.image_id)
	       		WHERE garage_id = " . $vehicle_row['id'] .";";
		if ( !($result = $db->sql_query($mod_query)) )
      		{
         		message_die(GENERAL_ERROR, 'Could Not Select Image Data For Vehicle', '', __LINE__, __FILE__, $sql);
	      	}

        	while ( $mod_gallery = $db->sql_fetchrow($result) )
	       	{
            		if ( $mod_gallery['attach_is_image'] )
           		{
                		// Do we have a thumbnail?  If so, our job is simple here :)
				if ( (empty($mod_gallery['attach_thumb_location']) == FALSE) AND ($mod_gallery['attach_thumb_location'] != $gallery_data['attach_location']) AND ( $vehicle_images_found <= 12) )
                		{
                    			// Form the image link
					$thumb_image = GARAGE_UPLOAD_PATH . $mod_gallery['attach_thumb_location'];
					$id = $mod_gallery['attach_id'];
					$title = $mod_gallerya['attach_file'];
					$hilite_image .= '<a href=garage.php?mode=view_gallery_item&type=garage_gallery&image_id='. $id .' title=' . $title .' target="_blank"><img hspace="5" vspace="5" src="' . $thumb_image .'" class="attach"  /></a> ';
               			} 
			}
	        }
	}
	//Looks Like We Only Need To Draw One Main Image
	else
	{
		if ( ($vehicle_row['image_id']) AND ($vehicle_row['attach_is_image']) AND (!empty($vehicle_row['attach_thumb_location'])) AND (!empty($vehicle_row['attach_location'])) )
		{
			// Check to see if this is a remote image
			if ( preg_match( "/^http:\/\//i", $vehicle_row['attach_location']) )
			{
				$image = $vehicle_row['attach_location'];
				$id = $vehicle_row['attach_id'];
				$title = $vehicle_row['attach_file'];
				$total_image_views = $vehicle_row['attach_hits'];
				$hilite_image = '<a href=garage.php?mode=view_gallery_item&type=garage_mod&image_id='. $id .' title=' . $title .' target="_blank"><img hspace="5" vspace="5" src="' . $image .'" class="attach"  /></a>';
			}
			else
			{
				$image = GARAGE_UPLOAD_PATH . $vehicle_row['attach_location'];
				$id = $vehicle_row['attach_id'];
				$title = $vehicle_row['attach_file'];
				$total_image_views = $vehicle_row['attach_hits'];
				$hilite_image = '<a href=garage.php?mode=view_gallery_item&type=garage_mod&image_id='. $id .' title=' . $title .' target="_blank"><img hspace="5" vspace="5" src="' . $image .'" class="attach"  /></a>';
			}
		}
	}

	$garage_img ='<a href="' . append_sid("garage.$phpEx?mode=browse&search=yes&user=".urlencode($profiledata['username'])."") . '"><img src="' . $images['icon_garage'] . '" alt="'.$lang['Garage'].'" title="'.$lang['Garage'].'" border="0" /></a>';

	$template->assign_vars(array(
		'L_VEHICLE' => $lang['Vehicle'],
		'L_GARAGE' => $lang['Garage'],
		'L_COLOUR' => $lang['Colour'],
		'L_MILEAGE' => $lang['Mileage'],
		'L_PRICE' => $lang['Purchased_Price'],
		'L_TOTAL_MODS' => $lang['Total_Mods'],
		'L_TOTAL_SPENT' => $lang['Total_Spent'],
		'L_DESCRIPTION' => $lang['Description'],
		'L_SEARCH_USER_GARAGE' => $lang['Search_User_Garage'],
		'YEAR' => $vehicle_row['year'],
		'MAKE' => $vehicle_row['make'],
		'MODEL' => $vehicle_row['model'],
       		'COLOUR' => $vehicle_row['color'],
	       	'HILITE_IMAGE' => $hilite_image,
        	'MILEAGE' => $vehicle_row['mileage'],
	        'MILEAGE_UNITS' => $vehicle_row['mileage_unit'],
        	'PRICE' => $vehicle_row['price'],
	        'CURRENCY' => $vehicle_row['currency'],
        	'TOTAL_MODS' => $vehicle_row['total_mods'],
	        'TOTAL_SPENT' => $total_spent,
        	'TOTAL_VIEWS' => $vehicle_row['views'],
	        'DESCRIPTION' => $vehicle_row['comments'],
	        'GARAGE_IMG' => $garage_img,
		'U_SEARCH_USER_GARAGE' => append_sid("garage.$phpEx?mode=browse"))
	);
}
//-- mod finish: Garage ----------------------------------------------------------------------------------------------------
If I remove it the profile works fine minus the garage. :P

eacruise
Registered User
Posts: 12
Joined: Fri Mar 25, 2005 2:42 pm
Contact:

Post by eacruise » Wed Jun 14, 2006 3:27 pm

Code: Select all

Warning: getimagesize(./garage/upload/garage_gallery-1-1150298444.jpg): failed to open stream: No such file or directory in /home/www/******/******/includes/functions_garage.php on line 1595

Warning: Cannot modify header information - headers already sent by (output started at /home/www/*****/******/includes/functions_garage.php:1595) in /home/www/*****/******/includes/functions.php on line 832
i get this code when i try and upload a picture so i changed it to upload from a url not off the pc and it still says the same please could you help

User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Post by poyntesm » Wed Jun 14, 2006 3:42 pm

eacruise -> You have not created the garage/upload folder or set the permissions correctly to 777

CeeReD -> Make sure all the edits are correct and it will work. Look and see what line 569 is? Same for the lang file. Sounds like it is just missing a ; from a line..sometimes when you paste I have seen this happen...So double check all the edits.

eacruise
Registered User
Posts: 12
Joined: Fri Mar 25, 2005 2:42 pm
Contact:

Post by eacruise » Wed Jun 14, 2006 4:02 pm

oh i made the folder just didnt set it to 777
im a bit of a n00b at this how do u set it to 777 lol

CeeReD
Registered User
Posts: 6
Joined: Tue Jun 13, 2006 11:07 pm

Post by CeeReD » Wed Jun 14, 2006 5:13 pm

Is there a good editor you reccomend? I am using my old html editor which is the old school way of doing things.

I deleted the whole thing and starting again and THANK GOD it worked!!!

Forgive me for being a pain the butt! BUt are there any mods that will have conflicts with this script? I dont want to run into any errors later!

BTW: Thank You - Awesome Script!!!

User avatar
Brenakie
Registered User
Posts: 77
Joined: Mon Mar 15, 2004 12:08 am
Location: Pascoag, RI - USA
Contact:

couple of issues, help needed

Post by Brenakie » Fri Jun 23, 2006 4:27 pm

I just wanted to say that I just installed the mod and it's great ( www.rideinri.com/forum/garage.php ). I just have an issues and one request.

Q1) Garage Access Permissions Control: Permissions aren't taking, any ideas? i.e. I deselect GUEST Interact, Add & Upload, click save and nothing takes.

R1) Does anyone have the button master image files? I need to tweak all the buttons for my black background.

Thanks in advance for your help and an AWESOME MOD!!!

User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Post by poyntesm » Sun Jun 25, 2006 1:00 pm

Brenakie -> What version are you running? There was a small bug in 1.0.0 that stopped permissions being saved 1.0.2 or later fixed it. The image sources can be found over at http://www.phpbbgarage.com in the download section.

User avatar
Brenakie
Registered User
Posts: 77
Joined: Mon Mar 15, 2004 12:08 am
Location: Pascoag, RI - USA
Contact:

Post by Brenakie » Sun Jun 25, 2006 1:17 pm

poyntesm wrote: Brenakie -> What version are you running? There was a small bug in 1.0.0 that stopped permissions being saved 1.0.2 or later fixed it. The image sources can be found over at http://www.phpbbgarage.com in the download section.


Thanks for the info, let me poke around and I report back!!!

Thanks again!!!

westcruise
Registered User
Posts: 37
Joined: Sat Dec 04, 2004 8:06 pm

problem!

Post by westcruise » Mon Jun 26, 2006 5:55 pm

Parse error: parse error, unexpected $ in /home/w/e/westcruise_co_uk/phpBB2/install_garage.php on line 447



any tips??

User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Post by poyntesm » Mon Jun 26, 2006 8:01 pm

westcruise -> Can you show me that line?? Never had that error before. Maybe reupload the file?

User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Post by poyntesm » Tue Jun 27, 2006 9:19 am

Brenakie -> Thanks for the access. It turned out to be you still had the global box ticked. That will always override other permissions. Next version will use javascript to make sure this situation is covered and the globa gets unticked as you set other permissions.

guignol
Registered User
Posts: 14
Joined: Tue Jun 13, 2006 7:43 am

Post by guignol » Tue Jun 27, 2006 4:58 pm

hi,

sorry in advance for my english i native french !
in first time : you're mod is exellent ! congratulation ! a must !

and my question is : do you know if existe a translation in french ?

thank you in advance

User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Post by poyntesm » Tue Jun 27, 2006 7:16 pm

Hi I believe there might be one somewhere..I do not have the files though. I am trying to get people to send me the translations so I have them centrally and included in the download.

rrasco
Registered User
Posts: 63
Joined: Fri Jun 23, 2006 7:34 pm
Contact:

Not able to edit vehicles

Post by rrasco » Tue Jun 27, 2006 7:48 pm

Hey Poyntesm, just wanted to say great mod. i am going to have alot of fun with this one. I did notice someting i didnt see covered yet. after i add a vehicle to the garage, then go to edit vehicle there are no makes or models listed in the dropdowns. if you submit it, it will give you a 'required field missing' error. any ideas?

also, do you know where i have to make the change to the variable {L_COLOUR} it displays the word colour instead of color. which i know is correct in other spellings but not mine.

cantfindausername
Registered User
Posts: 64
Joined: Thu Oct 20, 2005 8:20 am

Post by cantfindausername » Tue Jun 27, 2006 10:28 pm

I'm getting this error

Code: Select all

Could not query Garage config information

DEBUG MODE

SQL Error : 1146 Table 'jpugdnat_phpbb1.GARAGE_CONFIG_TABLE' doesn't exist

SELECT config_name, config_value FROM GARAGE_CONFIG_TABLE

Line : 32
File : functions_garage.php
I've read the replies a few pages back, and have tried doing a few things, but still get this error when I try and click any of the Garage options in the Admin Menu.

I've changed both the garage and the garage/upload folders to 777 just incase. I've looked on the database and there is no table called garage_config_table. There is phbb_garage_config.

I also can't find the garage.txt file that was referenced.

Please help.

Thanks,
Ant

Post Reply

Return to “[2.0.x] MOD Database Releases”