[ABD] phpBB Garage 2.0

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
Acziom
Registered User
Posts: 2
Joined: Wed Jun 09, 2010 3:42 pm
Location: U.S.A.

Re: [BETA] phpBB Garage 2.0

Post by Acziom »

Love the phpBB Garage mod. Have used the version 1.0.5 for years. So I have upgraded a phpBB2 board with Garage 1.0.5 on it to phpBB 3.0.7-PL1 and installed Garage 2.0. Did the conversion between the two garages, everything shows up perfectly. I am getting one error that I am completely stumped on:

Code: Select all

General Error
SQL ERROR [ mysqli ]

Unknown column 'g.id' in 'field list' [1054]

SQL

SELECT u.*, z.friend, z.foe, p.*, g.id as garage_id, g.made_year, makes.make, models.model FROM (phpbb_users u, phpbb_posts p) LEFT JOIN phpbb_zebra z ON (z.user_id = 2 AND z.zebra_id = p.poster_id) WHERE p.post_id = 8 AND u.user_id = p.poster_id

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: viewtopic.php
LINE: 1007
CALL: dbal_mysqli->sql_query()
I have redone the conversion and also redone viewtopic.php to make sure I didn't miss anything with no luck. Any insight would be greatly appreciated. Always loved this mod!
User avatar
thejdm
Registered User
Posts: 438
Joined: Sun Dec 21, 2003 4:18 pm
Location: pennsylvania
Contact:

Re: [BETA] phpBB Garage 2.0

Post by thejdm »

matt, i have been putting that off for quite some time. i also hate how the white was around the backside of the tabs. haha thanks for the quick little edit. ill be doing this someday soon. (just like i said ill finish the highslide edit, hahahahaha)
www.thejdm.com ...turn it on, y0
mercer
Registered User
Posts: 29
Joined: Fri Mar 30, 2007 7:53 pm

Re: [BETA] phpBB Garage 2.0

Post by mercer »

Hi I've installed garage on www.fordtorque.co.uk phpbb3 and I'm having problems. The view profile doesn't display and I cannot add anything in the garage or find any options for it in the admin panel.

Any ideas?
mercer
Registered User
Posts: 29
Joined: Fri Mar 30, 2007 7:53 pm

Re: [BETA] phpBB Garage 2.0

Post by mercer »

Ok I've now got another problem since converting. The side panel on a topic which shows profile info has become really long and it's putting location titles at the top of the topic for some reason - any ideas?
mercer
Registered User
Posts: 29
Joined: Fri Mar 30, 2007 7:53 pm

Re: [BETA] phpBB Garage 2.0

Post by mercer »

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

Re: [DEV] phpBB Garage 2.0

Post by poyntesm »

OK, one final push to complete this :)

I have decided to return to active development (again) and lets see how we go. Will take me a few days to sweep the spam from my site and update the core code for 3.07-PL1 and then start development again.

I really want this project to be a team effort so ANYONE interested in helping come on board let me know. When its a one man effort the risk of one person stopping is high, when we have a team its much lower.
panhead
Registered User
Posts: 950
Joined: Sat Dec 20, 2003 8:17 pm

Re: [DEV] phpBB Garage 2.0

Post by panhead »

Great! What help do you need?
User avatar
matt1206
Registered User
Posts: 213
Joined: Wed Mar 08, 2006 3:04 pm
Location: Sheffield, UK
Name: Matt Worthington

Re: [DEV] phpBB Garage 2.0

Post by matt1206 »

I'll help as much as possible.
User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Re: [DEV] phpBB Garage 2.0

Post by poyntesm »

Well first things first I will need to get any critical bugs fixed.. stuff that is causing error pages.

So if you have any repeatable bugs let me know. Second I still wuold love a CSS person or someone with good CSS skills to help me.

I am not adding any features or adjusting how it works. Goal no.1 is get this into mod DB in a working state. Improvements are for later. So stuff like hilight boxes or whatever need to wait.

My own site is still spam filled so post them here for now.
panhead
Registered User
Posts: 950
Joined: Sat Dec 20, 2003 8:17 pm

Re: [DEV] phpBB Garage 2.0

Post by panhead »

I have no CSS skills but can help to clean your site
User avatar
matt1206
Registered User
Posts: 213
Joined: Wed Mar 08, 2006 3:04 pm
Location: Sheffield, UK
Name: Matt Worthington

Re: [DEV] phpBB Garage 2.0

Post by matt1206 »

Some problems I came across when I put the garage on my site:

==================================================================


OK, since going live, I've found that if you try adding a modification to the database, and you don't select a "Shop" from where it was purchased from, it would give you the following MySQL error:

Code: Select all

General Error
SQL ERROR [ mysqli ]

Incorrect integer value: '' for column 'shop_id' at row 1 [1366]

SQL

INSERT INTO phpbb_garage_modifications (vehicle_id, user_id, category_id, product_id, shop_id, installer_id, price, purchase_rating, comments, install_price, install_rating, install_comments, product_rating, date_created, date_updated) VALUES ('1', '2', '1', '1', '', '3', '100.0', 10, '1', '0.0', 10, '', 10, 1235512178, 1235512178)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/mods/class_garage_modification.php
LINE: 54
CALL: dbal_mysqli->sql_query()

FILE: garage_modification.php
LINE: 212
CALL: garage_modification->insert_modification()
This is trying to insert an empty value into the array. All the other values are being checked to see if they are empty, and then directing you to the EID=3 page.

To fix this, you need to add the value shop_id to the array that is passed to the check_required_vars function

garage_modification.php

Line 206
Find:

Code: Select all

$params = array('category_id', 'manufacturer_id', 'product_id');
   
Change To:

Code: Select all

$params = array('category_id', 'manufacturer_id', 'shop_id', 'product_id');
   

==========================================================================

All trace of the rating system has been removed from the template files now.

This is what has been removed

Code: Select all

[root@www template]# diff garage_view_vehicle.html garage_view_vehicle.html.old
153a154,167
>                               <dl>
>                                       <dt><strong>{L_VEHICLE_RATING}</strong></dt>
>                                       <dd>{RATING}</dd>
>                               </dl>
>                               <!-- IF ! S_DISPLAY_VEHICLE_OWNER -->
>                               <dl>
>                                       <dt><strong>{L_PLEASE_RATE}</strong></dt>
>                                       <dd><form method="post" name="view_vehicle" action="{S_MODE_ACTION}"><select id="vehicle_rating" name="vehicle_rating"><option value="">{L_SELECT_RATING}</option><option value="">------</option><!-- BEGIN rating --><option value="{rating.VALUE}" <!-- IF rating.S_SELECTED -->selected="selected"<!-- ENDIF -->>{rating.TEXT}</option><!-- END rating --></select>&nbsp;<input type="hidden" value="rate_vehicle" name="mode" /><input type="hidden" value="{VID}" name="VID" />
>                                       <!-- IF S_DISPLAY_RATE -->
>                                       <input name="submit" type="submit" value="{L_RATE}" class="liteoption" />
>                                       <!-- ENDIF -->
>                                       <i> {L_RATING_NOTICE}</i>{S_FORM_TOKEN}</form></dd>
>                               </dl>
>                               <!-- ENDIF -->
195a210
>                                       <!-- IF S_DISPLAY_RATING_TAB --><li class="garage_preset_yes" id="tab009"><a href="#ratings" onclick="swap_options('0','0','9');"><span class="tabbg">{L_RATINGS}</span></a></li><!-- ENDIF -->
197a213
>                                       <!-- IF S_DISPLAY_RATINGS_TAB --><li class="garage_preset_yes" id="tab009"><a href="#ratings" onclick="swap_options('0','0','9');"><span class="tabbg">{L_RATINGS}</span></a></li>  <!-- ENDIF -->
201c217
<                       <!-- IF S_DISPLAY_IMAGE_TAB or S_DISPLAY_MODIFICATION_TAB or S_DISPLAY_QUARTERMILE_TAB or S_DISPLAY_DYNORUN_TAB or S_DISPLAY_LAP_TAB or S_DISPLAY_PREMIUM_TAB or S_DISPLAY_SERVICE_TAB or S_DISPLAY_BLOG_TAB or S_DISPLAY_GUESTBOOK_TAB -->
---
>                       <!-- IF S_DISPLAY_IMAGE_TAB or S_DISPLAY_MODIFICATION_TAB or S_DISPLAY_QUARTERMILE_TAB or S_DISPLAY_DYNORUN_TAB or S_DISPLAY_LAP_TAB or S_DISPLAY_PREMIUM_TAB or S_DISPLAY_SERVICE_TAB or S_DISPLAY_BLOG_TAB or S_DISPLAY_GUESTBOOK_TAB or S_DISPLAY_RATINGS_TAB -->
685a702,744
>                                               <div id="options009" style="display: none;">
>                                                       <div class="panel">
>                                                               <div class="inner">
>                                                                       <span class="corners-top"><span></span></span>
>                                                                       <!-- BEGIN rating_history -->
>                                                                       <h3>{L_VEHICLE_RATINGS}</h3>
>                                                                       <div class="forabg">
>                                                                               <div class="inner">
>                                                                                       <span class="corners-top"><span></span></span>
>                                                                                       <ul class="garage_list">
>                                                                                               <li class="header">
>                                                                                                       <dl>
>                                                                                                               <dt class="gwidth-20">{L_GARAGE}</dt>
>                                                                                                               <dd class="gwidth-20">{L_TYPE}</dd>
>                                                                                                               <dd class="gwidth-10">{L_COST}</dd>
>                                                                                                               <dd class="gwidth-10">{L_RATING}</dd>
>                                                                                                               <dd class="gwidth-10">{L_MILEAGE}</dd>
>                                                                                                               <!-- IF S_DISPLAY_VEHICLE_OWNER--><dd></dd><dd></dd><!-- ENDIF -->
>                                                                                                       </dl>
>                                                                                               </li>
>                                                                                       </ul>
>                                                                                       <ul class="garage_list">
>                                                                                               <!-- BEGIN rated -->
>                                                                                               <!-- IF rated.ROW_NUMBER is even --><li class="row bg1"><!-- ELSE --><li class="row bg2"><!-- ENDIF -->
>                                                                                                       <dl>
>                                                                                                               <dt class="gwidth-20"><a href="{service_history.service.U_GARAGE}">{service_history.service.TITLE}</a></dt>
>                                                                                                               <dd class="gwidth-20">{service_history.service.TYPE}</dd>
>                                                                                                               <dd class="gwidth-10">{service_history.service.PRICE}</dd>
>                                                                                                               <dd class="gwidth-10">{service_history.service.RATING}</dd>
>                                                                                                               <dd class="gwidth-10">{service_history.service.MILEAGE}</dd>
>                                                                                                               <!-- IF S_DISPLAY_VEHICLE_OWNER --><dd><!-- IF service_history.service.U_EDIT --><a href="{service_history.service.U_EDIT}" class="garage-edit-icon"></a><!-- ENDIF --></dd><dd><!-- IF service_history.service.U_DELETE--><a href="{service_history.service.U_DELETE}" class="garage-delete-icon"></a><!-- ENDIF --></dd><!-- ENDIF -->
>                                                                                                       </dl>
>                                                                                               </li>
>                                                                                               <!-- END service -->
>                                                                                       </ul>
>                                                                               </div>
>                                                                               <span class="corners-bottom"><span></span></span>
>                                                                       </div>
>                                                                       <!-- END service_history -->
>                                                                       <span class="corners-bottom"><span></span></span>
>                                                               </div>
>                                                       </div>
>                                               </div>

================================================================

Code: Select all

General Error
SQL ERROR [ mysqli ]

Unknown column 'p.business_id' in 'where clause' [1054]

SQL

SELECT v.*, i.*, mk.make, md.model, u.username, u.user_colour, count(m.id) AS total_mods FROM (phpbb_garage_vehicles v, phpbb_garage_makes mk, phpbb_garage_models md, phpbb_users u) LEFT JOIN phpbb_garage_modifications m ON (v.id = m.vehicle_id) LEFT JOIN phpbb_garage_vehicles_gallery vg ON (v.id = vg.vehicle_id AND vg.hilite = 1) LEFT JOIN phpbb_garage_images i ON (vg.image_id = i.attach_id) WHERE v.pending = 0 AND (v.make_id = mk.id and mk.pending = 0) AND (v.model_id = md.id and md.pending = 0) AND v.user_id = u.user_id AND p.business_id = 4 GROUP BY v.id ORDER BY date_created ASC LIMIT 30

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/db/mysqli.php
LINE: 205
CALL: dbal_mysqli->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysqli->_sql_query_limit()

FILE: includes/mods/class_garage.php
LINE: 757
CALL: dbal->sql_query_limit()

FILE: garage.php
LINE: 474
CALL: garage->perform_search()
I got it after using of garage search function for Modification Manufacturer. If you select Modification Manufacturer and click search you will get this error

OK, it looks like the bug is with how you tell the search to display the results. You get the sql error when you search on product, and set the "Display Results As" Vehicle

Doing the same search, but setting "Display Results As" Modifications shows the correct results.



===========================================================================


Fixed another little bug with the garage.

On the main page, where it shows the top 5 Total Spent, it wasn't showing the currency of the total.

The data is pulled with this function

Code: Select all

        /**
        * Return limited array of vehicle with most money spent
        *
        * @param int $limit number of rows to return
        *
        */
        function get_most_spent_vehicles($limit)
        {
                global $db;

                $data = null;

                $sql = $db->sql_build_query('SELECT',
                        array(
                        'SELECT'        => 'v.id, v.made_year, mk.make, md.model, v.user_id, (SUM(m.install_price) + SUM(m.price)) AS POI, u.username, v.currency, u.user_colour, u.user_id',
                        'FROM'          => array(
                                GARAGE_VEHICLES_TABLE           => 'v',
                                GARAGE_MAKES_TABLE              => 'mk',
                                GARAGE_MODELS_TABLE             => 'md',
                                USERS_TABLE                     => 'u',
                                GARAGE_MODIFICATIONS_TABLE      => 'm',
                        ),
                        'WHERE'         => 'm.vehicle_id = v.id
                                                AND v.make_id = mk.id AND mk.pending = 0 
                                                AND v.model_id = md.id AND md.pending = 0
                                                AND v.user_id = u.user_id',
                        'GROUP_BY'      => 'v.id',
                        'ORDER_BY'      => 'POI DESC'
                ));

                $result = $db->sql_query_limit($sql, $limit);
                while ($row = $db->sql_fetchrow($result) )
                {
                        if (!empty($row))
                        {
                                $row['vehicle'] = "{$row['made_year']} {$row['make']} {$row['model']}";
                        }
                        $data[] = $row;
                }
                $db->sql_freeresult($result);

                return $data;
        }
  
and the data is displayed with the below function

Code: Select all

function show_most_spent()
        {
                global $required_position, $user, $template, $db, $SID, $lang, $phpEx, $garage_config, $board_config;

                if ( $garage_config['enable_most_spent'] != true )
                {
                        return;
                }

                $template_block = 'block_'.$required_position;
                $template_block_row = 'block_'.$required_position.'.row';
                $template->assign_block_vars($template_block, array(
                        'BLOCK_TITLE'   => $user->lang['MOST_MONEY_SPENT'],
                        'COLUMN_1_TITLE'=> $user->lang['VEHICLE'],
                        'COLUMN_2_TITLE'=> $user->lang['OWNER'],
                        'COLUMN_3_TITLE'=> $user->lang['TOTAL_SPENT'])
                );

                $limit = $garage_config['most_spent_limit'] ? $garage_config['most_spent_limit'] : 10;

                $vehicle_data = $this->get_most_spent_vehicles($limit);

                for ($i = 0; $i < count($vehicle_data); $i++)
                {
                        $template->assign_block_vars($template_block_row, array(
                                'U_COLUMN_1'            => append_sid("garage_vehicle.$phpEx?mode=view_vehicle&VID=".$vehicle_data[$i]['id']),
                                'U_COLUMN_2'            => append_sid("memberlist.$phpEx?mode=viewprofile&u=".$vehicle_data[$i]['user_id']),
                                'COLUMN_1_TITLE'        => $vehicle_data[$i]['vehicle'],
                                'COLUMN_2_TITLE'        => $vehicle_data[$i]['username'],
                                'COLUMN_3_TITLE'        => number_format((empty($vehicle_data[$i]['POI'])) ? '0' : $vehicle_data[$i]['POI']),
                                'USERNAME_COLOUR'       => get_username_string('colour', $vehicle_data[$i]['user_id'], $vehicle_data[$i]['username'], $vehicle_data[$i]['user_colour']),
                        ));
                }
        
                $required_position++;
                return ;
        }
  
As the currency is already being selected via the SQL statement, I've simply added it to the end of the COLUMN_3_TITLE block in the array

Code: Select all

'COLUMN_3_TITLE'        => number_format((empty($vehicle_data[$i]['POI'])) ? '0' : $vehicle_data[$i]['POI']) . ' ' . $vehicle_data[$i]['currency'],
  
ProtoGT
Registered User
Posts: 141
Joined: Thu May 21, 2009 6:34 pm

Re: [DEV] phpBB Garage 2.0

Post by ProtoGT »

If I hadn't switched to SMF and used SMF garage I would help.
User avatar
Steve
Registered User
Posts: 1481
Joined: Tue Apr 07, 2009 7:48 pm
Name: Steven Clark
Contact:

Re: [DEV] phpBB Garage 2.0

Post by Steve »

You should have pm on your site with included files ;)

phpbb3 version 3.0.7-PL
tested manually
tested with automod 1.0.0
install findings

fails to upload the garage language/en/mods/*.* because of the ./root/ should just be /root/

the new xml install sheet you can include garage/install/index.php when file edits are done direct link is created in success box.

Fails with automod because of the updated code for these two finds below.
1. includes/functions.php
find:

Code: Select all

function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
{
should be:

Code: Select all

function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
{
2. includes/functions_user.php

find:

Code: Select all

		set_config('num_users', $config['num_users'] - 1, true);
	}
should be:

Code: Select all

		set_config_count('num_users', -1, true);
	}
3. viewtopic.php the find for the 2nd age is not the same as the 1st also best to create a larger find

find:

Code: Select all

				'age'				=> '',
a better find:

Code: Select all

				'avatar'		=> ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
				'age'			=> '',
Now to admin control panel.

Extremely invalid html and fixed.
...removed

Prosilver style

template/viewtopic_body.html
find:

Code: Select all

		<!-- IF postrow.U_VEHICLE and postrow.S_DISPLAY_GARAGE_VIEWTOPIC --><dd><br /><a href={postrow.U_VEHICLE}>{postrow.VEHICLE}</a></dd><!-- ENDIF -->
replace with:

Code: Select all

		<!-- IF postrow.U_VEHICLE and postrow.S_DISPLAY_GARAGE_VIEWTOPIC --><dd><br /><a href="{postrow.U_VEHICLE}">{postrow.VEHICLE}</a></dd><!-- ENDIF -->
tamplate/garage_profile_integration.html

had two small html errors,fixed just replace with new file.

Garage html,css

A lot of html pages are invalid the use of an <!-- ELSE --> statement would prevent that if theres no submitted data.
I decided its just better if i repack the html files after ive validated them :lol: ,i will finish them soon also will sort corners images and css ,s needs a little work.once done will check subilver2.

visited the garage in IE6,F-Fox,Crome,safari

all pages

IE6 right corners top and bottom not visible,spelling mistake garge.
fixed with:

Code: Select all

    * html #garage-main .forabg span.corners-top, * html #garage-main .forabg span.corners-bottom { background-image: url("{T_THEME_PATH}/images/corners_left_garage.gif"); }
    * html #garage-main .forabg span.corners-top span, * html #garage-main .forabg span.corners-bottom span { background-image: url("{T_THEME_PATH}/images/corners_right_garage.gif"); }
toggle button 50% visible

Code: Select all

#garage-toggle {
	padding: 0px;
	width: 16%;
	height: 10px;
replace with:

Code: Select all

#garage-toggle {
	padding: 0px;
	width: 16%;
	height: 19px;
refrence to prosliver style only

Code: Select all

	background-image: url("styles/prosilver/imageset/garage_toggle.gif");
should be:

Code: Select all

	background-image: url("{T_IMAGESET_PATH}/garage_toggle.gif");
a bug when viewing your vehicle,and click on the the link to goto your user control panel takes you to your profile page.

language variable 'RATINGS' missing


if you could let me know what else needs done just let me know.
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
poyntesm
Registered User
Posts: 1671
Joined: Tue Jan 18, 2005 11:19 am
Location: Dublin, Ireland
Contact:

Re: [DEV] phpBB Garage 2.0

Post by poyntesm »

OK, thanks all for posts. Just made my first commit in a long time. Updated to UMIL 1.0.3 and MODX 1.2.5 :)

Have 3.0.7-PL1 up and AutoMOD 1.0.0 , so I have tested and fixed install to latest now.

So ... next to the real stuff :)
ProtoGT
Registered User
Posts: 141
Joined: Thu May 21, 2009 6:34 pm

Re: [DEV] phpBB Garage 2.0

Post by ProtoGT »

Will you be working with the SMF team again?
Locked

Return to “[3.0.x] Abandoned MODs”