Aller à la page: [-1] 1 - 2

Fin
two problems in pn_zclassifieds
  • Envoyé: 09.11.2006, 02:12
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    Is there anyone else that might be able to post a link to the pntables.php file that I need for this block to work?

    thanks,
    json
  • Envoyé: 09.11.2006, 20:28
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    09.10.08
    Messages:
    266
    Looking at the version of PN_zClassifieds in the downloads section of this website, I realized it lacks a lot of features I did for the one used on this website.
    Unfortunately I work more than 10 hours per day for my real job so I am unable to do a "real" release.
    What I did was to call this version 2.3 beta, zip it and put it in the downloads section.
    But beware ! I didn't really tested it ! So if you choose to install this version (or upgrade from the 2.2 version), I don't want to have any responsability if you loose som data, the only thing I can say is that it works for me on my own website. So if you choose to use it :
    - backup your website and database first
    - delete all the old modules files in modules/PN_zClassifieds
    - upload the new files
    - in Administration upgrade, then activate (no more need to run a speciel upgrade.php file as in the old 2.2 version)
    - report in this forum any problem.
    You can find this version here:http://www.vedr...&show=15
  • Envoyé: 10.11.2006, 06:49
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    09.10.08
    Messages:
    266
    For PN_zClassifieds' users not wanting to upgrade to the 2.3 version but just have the blocks working, I have modified the zip file "Modifieds blocks for PN_zClassifieds" in the downloads section to include the missing pntables.php, so now you have the choice
    - to continue using the 2.2 version, just downloading the new zip file for the blocks to work
    - upgrade to the 2.3 version wich also include the working blocks
  • Envoyé: 05.01.2007, 11:34
     
    sutan
    enregistré depuis:
     janvier 2007
    Status:
    hors ligne
    dernière visite:
    05.01.07
    Messages:
    1
    What about this problem

    in PN-0764: PN_zClassifieds 2.3. during installation

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in F:\xampp\xampp\htdocs\xampp\intakus\modules\PN_zClassifieds\pninit.php on line 350

    Fragment kodu
    Code
    $table = $pntable['classifieds_ads'];
              $column = $pntable['classifieds_ads_column'];
              $sql = "ALTER TABLE $table CHANGE condition $column['itemcondition'] varchar(50) DEFAULT '' NOT NULL";
    line 350          $dbconn->Execute($sql);
                // Check for an error with the database code, and if so set an
                // appropriate error message and return
                if ($dbconn->ErrorNo() != 0) {
                    pnSessionSetVar('errormsg',"query: $sql error: " . $dbconn->ErrorMsg());
                    return false;

  • Envoyé: 05.01.2007, 13:22
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    09.10.08
    Messages:
    266
    Hello,
    in the pninit.php file downloadable from this website line 350 of pninit.php is
    Code
    $sql = "ALTER TABLE $table CHANGE condition $column['itemcondition'] varchar(50) DEFAULT '' NOT NULL";
    And not :
    Code
    $dbconn->Execute($sql);
    Did you make any change to that file ? Anyway if this line is giving you an error I need to know the version of MySQL your website is using because all the problem of PN_zClassifieds was that one of the fields in the classifieds_ads table was using "condition" as name and this is a reserved name underMySQL 5 (it wasn't in previous MySQL versions !) so I decided to change this field name to "itemcondition" and this is what the upgrade is trying to do. But the problem is that I don't have any website running under MySQL 5 so I am not currently able to test that code ! A workaround would be to use PhpMyAdmin to change by hand the name of the field from condtion to itemcondtion and to edit the pninit.php so that the upgrade do nothing replacing all the lines :
    Code
    function PN_zClassifieds_upgrade($oldversion)
    {
        // Upgrade dependent on old version number
        switch($oldversion) {
            case '2.1':
            case '2.2':

              $dbconn = pnDBGetConn(true);
              $pntable = pnDBGetTables();

              $table = $pntable['classifieds_ads'];
              $column = $pntable['classifieds_ads_column'];
              $sql = "ALTER TABLE $table CHANGE condition $column['itemcondition'] varchar(50) DEFAULT '' NOT NULL";
              $dbconn->Execute($sql);
                // Check for an error with the database code, and if so set an
                // appropriate error message and return
                if ($dbconn->ErrorNo() != 0) {
                    pnSessionSetVar('errormsg',"query: $sql error: " . $dbconn->ErrorMsg());
                    return false;
                }
              return PN_zClassifieds_upgrade('2.3');
              break;
            case '2.3':
              break;
        }
        // Update successful
        return true;
    }
    With just :
    Code
    function PN_zClassifieds_upgrade($oldversion)
    {
        // Update successful
        return true;
    }

    If you try this and it works can you please report oin this forum ? Thanks.

Aller à la page: [-1] 1 - 2

Réponse rapide
 
  • Options
Code:
Couleur de la police:  
Taille de la police: