Advertisement:

Author Topic: [PLUGIN] Motorcycles attributes Ver. 1.2.2 Update: Sept. 11, 2013  (Read 17352 times)

mortaza2006

  • Newbie
  • *
  • Posts: 8
  • faosclass.com
Re: [PLUGIN] Motorcycles attributes (UPDATED)
« Reply #15 on: May 28, 2013, 12:10:34 am »
hi mmcsus

Sorry I can't speak good English

Quote
Known problems:

1. Can not delete makes and models from admin (This problem existed in cars attributes plugin.)

Please check it it out and let me know what can make it better.

To fix this problem
You do

open file conf.php

and changes this lines
Code: [Select]
                                                        echo '<li><input name="make[' . $make['pk_i_id'] . ']" id="' . $make['pk_i_id'] . '" type="text" value="' . $make['s_name'] . '" /> <a href="' . osc_admin_base_url(true) . '?page=plugins&action=renderplugin&file=motorcycles_attributes/conf.php?section=makes&plugin_action=make_delete&id=' . $make['pk_i_id'] . '" ><button class="benderbtn">' . __('Delete', 'motorcycles_attributes') . '</button></a> </li>';   

to

Code: [Select]
                                                        echo '<li><input name="make[' . $make['pk_i_id'] . ']" id="' . $make['pk_i_id'] . '" type="text" value="' . $make['s_name'] . '" /> <a class="benderbtn" href="' . osc_admin_base_url(true) . '?page=plugins&action=renderplugin&file=motorcycles_attributes/conf.php?section=makes&plugin_action=make_delete&id=' . $make['pk_i_id'] . '" >' . __('Delete', 'motorcycles_attributes') . '</a> </li>';


in fact
delete <button> in codes

Code: [Select]
<button class="benderbtn">' . __('Delete', 'motorcycles_attributes') . '</button>

Change your

Code: [Select]
' . __('Delete', 'motorcycles_attributes') . '


mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source

Aficionado

  • Guest
Re: [PLUGIN] Motorcycles attributes (UPDATED)
« Reply #17 on: May 28, 2013, 02:17:03 am »
The above bug fix from Mortaza solves the delete in Car Makes and Car Model Types.

But the 3rd option (Vehicle Type) still has the delete problem.

« Last Edit: May 28, 2013, 03:26:06 am by Aficionado »

mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #18 on: May 28, 2013, 06:57:56 am »
Motorcycles Attributes

Author: mmcsus_Osclass

version 1.1
Update:
Motorcycles attributes

Version 1.1

Changes:

1. Corrected "Makes" delete function.

2. Corrected "Models" delete function.

3. Corrected "Motorcycle types" delete function.

4. Changed vehicle types in admin to Motorcycle types.

5. Changed style of "Edit button".

6. Kept style of delete button for Makes, Models, and Motorcycle types by using span tag.

Reference:

https://github.com/faosclass/osclass-plugins/commit/af70b0b718a2513506b8a429bc62d1089a58ab5c

Download from first post.



mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #19 on: May 28, 2013, 06:33:52 pm »
@potoco

Quote
Both plugins left four tables into database, then I delete them manually....


I would like to run a little experiment, if your willing?

Find attached potocos_attributes plugin.

This is nothing more than motorcycles_attributes just without the name.

I would like for you to install it on your system and tell me if it works.

I have checked to make sure when you uninstall it the tables will be removed from mysql.


Aficionado

  • Guest
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #20 on: May 28, 2013, 06:42:37 pm »
Apparently something IS wrong with uninstall. Because i can't install the 1.1 after uninstalling the plugin.

And i see 4 tables in the db that i had to manually delete ..

just FYI,

Aficionado

  • Guest
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #21 on: May 28, 2013, 06:44:59 pm »
I also see that there is a limit of 10 Vehicle types (as with car plugin) and that is a problem for localized osclass installations.

For one language 10 is ok, for two languages it is not.

(still i can't find any 10 items limitation in the code ....)

« Last Edit: May 28, 2013, 07:31:32 pm by Aficionado »

mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #22 on: May 29, 2013, 05:57:37 am »
Hi Aficionado,

Sorry for the late reply.

Quote
(still i can't find any 10 items limitation in the code ....)

There is no limitation in the code.

The problem is once  motorcycle types gets to 10  mysql starts over and you git DUPLICATE KEY errors.

So now you know the issue, I'am not a mysql Guru but I thought I was.  ;D

We all have a lot to learn.

Isn't that's what it's all about?



Aficionado

  • Guest
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #23 on: May 29, 2013, 06:01:02 am »
Hi Aficionado,

Sorry for the late reply.

Quote
(still i can't find any 10 items limitation in the code ....)

There is no limitation in the code.

The problem is once  motorcycle types gets to 10  mysql starts over and you git DUPLICATE KEY errors.

So now you know the issue, I'am not a mysql Guru but I thought I was.  ;D

We all have a lot to learn.

Isn't that's what it's all about?

Hi there !

You mean this is a bug of the Car Attributes plugin ? Why start over after 10 ?

You see i'm neither a mysql or php expert ...
 :-[ :-[

Aficionado

  • Guest
Re: [PLUGIN] Motorcycles attributes (UPDATED)
« Reply #24 on: May 29, 2013, 06:32:55 am »
Plugin could not be installed because: Error importSQL::Modelmotorcycles
motorcycles_attributes/basic_data.sql

ok, i found the problem with install (after uninstall) fails.

If you DISABLE the plugin and THEN uninstall, some tables are left and you can't install it again.

If you UNINSTALL the plugin while ENABLED everything is cleared.

Not sure why this happens. With Cars also.

potoco

  • Full Member
  • ***
  • Posts: 191
  • OSClass 3.5.3
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #25 on: May 29, 2013, 08:15:07 am »
@potoco

Quote
Both plugins left four tables into database, then I delete them manually....


I would like to run a little experiment, if your willing?

Find attached potocos_attributes plugin.

This is nothing more than motorcycles_attributes just without the name.

I would like for you to install it on your system and tell me if it works.

I have checked to make sure when you uninstall it the tables will be removed from mysql.

Hi mmcsus, this plugin has failed, sorry, I don't find the option to switch on the php debug so I don't know what to do to switch it. I am on an vserver, will be the reason?

I had to delete the four tables in the database again...

mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #26 on: May 29, 2013, 02:23:35 pm »
Quote
I had to delete the four tables in the database again...

Hi potoco,

Quote
I am on an vserver

Pardon my ignorance but what is a vserver?

I do not have these problems. I would like to understand what's going on.

I'm on a VPS server. (Unmanaged)

I would like to set up an account for you on my server. ( for testing only of course)

Let me see what I can do ...




« Last Edit: May 29, 2013, 02:35:17 pm by mmcsus »

mmcsus

  • Hero Member
  • *****
  • Posts: 704
  • Open Source
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #27 on: May 29, 2013, 04:07:46 pm »

Quote
I would like to set up an account for you on my server. ( for testing only of course)

Let me see what I can do ...


... done!

potoco

  • Full Member
  • ***
  • Posts: 191
  • OSClass 3.5.3
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #28 on: May 29, 2013, 06:40:27 pm »
Pardon my ignorance but what is a vserver?

The vserver is an virtual server, shared server, maybe something like yours, don't worry about it, I have a phisycal server too, so when I can I will move an OSClass installation in order to make more test. I don't have time this week so we keep in touch.

Thank you so much for your concern.

Hostingames

  • Full Member
  • ***
  • Posts: 189
Re: [PLUGIN] Motorcycles attributes Ver. 1.1
« Reply #29 on: June 18, 2013, 04:08:14 pm »
hi
the plugin t there before I install bug

thank you