Changeset 8847


Ignore:
Timestamp:
Jan 23, 2011, 12:13:49 AM (13 years ago)
Author:
tiico
Message:

Version 1.0.2

  • Correct mail format error (slash)
  • Open function on specials pages (random items, best rates). For the moment, it's only possible if the plugin is active on all categories...
Location:
extensions/Piwecard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Piwecard/CHANGELOG

    r8812 r8847  
    77Version 1.0.x
    88-------------
     91.0.2 -->   - Correct format error (slash appears) on mail
     10            - Open this function on special cats like "random" or "best rated" and compatible with PWG Stuffs modules
     11                (This is only available if the plugin is active on "all categories")
    9121.0.1 -->   - Add EN, DE, ITlanguages
    1013            - Add fck editor integration (thanks to Pat)
     
    1417Version 0.0.x
    1518-------------
    16 0.0.1 --> Initial version (for testing) Contains functionnalities :
    17 - OK ajout date création carte
    18 - OK ajout duree validité carte (à partir date création)
    19 - OK ajout purge cartes périmèes unitairement (par rapport à date paramétrée)
    20 - OK Force suppression de ecard dans admin
    21 - OK Ajout date de fin validité dans la Bdd (par carte) + test de validité lors de la publication
    22 - OK Ajout message d'erreur si carte périmèe
    23 - OK Ajout paramétrage client validité des cartes (+ paramétrage admin pour ouvrir cette fonction)
    24 - OK ajout purge cartes périmèes en global (et automatique)
    25 - OK Ajout mail txt et html envoyé (uniquement lien)
    26 - OK ajout mail en HTML avec photo incluse (+ parametre qui va avec)
    27 - OK Ajout paramétrage de l'envoi du mail : lien ou message complet
    28 - OK IMPACT FCK EDITOR ajout admin : paramétrage message et sujet du mail (text/HTML) avec FCK Editor?
    29         Ajouter dans fckeditor.php
    30         elseif ($section == 'Piwecard/admin/admin.php')
    31     {
    32       $areas[] = 'ecard_message_html';
    33       $width = '99%';
    34       $height = '250px';
    35       $template->set_prefilter('module_options', 'add_remove_button');
    36     }
    37 - OK ajout possibilité de recevoir une copie (ou même mail) à son adresse
    38 - OK ajout nonpré renseignement de user et mail de l'émetteur (à partir infos de $user)
    39 - OK ajout possibilité activation sur toutes les catégories (sans exception)
    40 - OK correction des messages et sujets enregistrés (pb accents)
    41 - OK Ajout récusrivité sur les catégories (param et algo)
    42 - OK Ajout informations sous la photo d'une carte virtuelle (+ paramétrage!)
    43 - OK Changement nom "ecard" --> "Piwecard"
    44 - OK Ajout tests utilisateur/catégorie pour autoriser la fonction sur ces critères
    45 - OK Ajout fichiers langues FR
    46 - OK Revue templates pour noms paramétrés dans fichier langues
    47 
    48 
    49 
     190.0.1 --> Initial version (for testing)
  • extensions/Piwecard/include/ecard.class.php

    r8771 r8847  
    350350
    351351               
    352                 if (($page['section']) == 'categories' AND !empty($page['category']))           // only on category page!
     352//              if (($page['section']) == 'categories' AND !empty($page['category']))           // only on category page!
     353        if (isset($page['section']))
    353354                {
    354355               
    355356       
    356357                        $upper_names = null;
    357                         // get all upper categories from the image category to test
    358                         //      - if the parameter for "recursiv" is OK
    359                         //      - if the upper category is activated for this function
    360                         $query = 'SELECT *
    361                                                 FROM '.CATEGORIES_TABLE.'
    362                                                 WHERE id = '.$page['category']['id'].'
    363                                                 ;';
    364                         $cat = mysql_fetch_assoc(pwg_query($query));
    365                         if (empty($cat))
    366                         {
    367                                 $upper_ids = null;
     358           
     359            if ( !empty($page['category']))
     360            {
     361                // get all upper categories from the image category to test
     362                //      - if the parameter for "recursiv" is OK
     363                //      - if the upper category is activated for this function
     364                $query = 'SELECT *
     365                            FROM '.CATEGORIES_TABLE.'
     366                            WHERE id = '.$page['category']['id'].'
     367                            ;';
     368                $cat = mysql_fetch_assoc(pwg_query($query));
     369                if (empty($cat))
     370                {
     371                    $upper_ids = null;
     372                }
     373                else
     374                {
     375                    foreach ($cat as $k => $v)
     376                    {
     377                        // If the field is true or false, the variable is transformed into a
     378                        // boolean value.
     379                        if ($cat[$k] == 'true' or $cat[$k] == 'false')
     380                        {
     381                          $cat[$k] = get_boolean( $cat[$k] );
     382                        }
     383                    }
     384                    $upper_ids = explode(',', $cat['uppercats']);
     385                }
    368386                        }
    369                         else
    370                         {
    371                                 foreach ($cat as $k => $v)
    372                                 {
    373                                         // If the field is true or false, the variable is transformed into a
    374                                         // boolean value.
    375                                         if ($cat[$k] == 'true' or $cat[$k] == 'false')
    376                                         {
    377                                           $cat[$k] = get_boolean( $cat[$k] );
    378                                         }
    379                                 }
    380                                 $upper_ids = explode(',', $cat['uppercats']);
    381                         }
    382                        
     387           
    383388                        if ($this->my_config['user_cat'])       // !Function anly allowed on user image
    384389                        {
     
    432437                // only on available cats
    433438                        if ( $this->my_config['allcats']                // Available on all cats
    434                                 OR (in_array($page['category']['id'], $this->my_config['cats']))        // Available on specific cats
     439                                OR ( !empty($page['category']) AND in_array($page['category']['id'], $this->my_config['cats'])) // Available on specific cats
    435440                                OR ($this->my_config['recursive'] AND isset($upper_ids) AND                             // Available on upper cats this recursiv mode
    436441                                                (array_intersect($upper_ids, $this->my_config['cats']) != array()))
     
    566571                                                case 0 : // text
    567572                                                        // Get the standard message (in admin param) and parse it with the informations
    568                                                         $messagemail =  htmlspecialchars_decode($this->parse($this->my_config['message_link'], $_POST, $image_element));
     573                                                        $messagemail =  stripslashes(htmlspecialchars_decode($this->parse($this->my_config['message_link'], $_POST, $image_element)));
    569574
    570575                                                        $mail_arg=array('from' => $_POST['votremail'],
     
    577582                                                        break;
    578583                                                case 1 : // html
    579                                                         $messagemailHTML =  htmlspecialchars_decode($this->parse($this->my_config['message_HTML'], $_POST, $image_element));
     584                                                        $messagemailHTML =  stripslashes(htmlspecialchars_decode($this->parse($this->my_config['message_HTML'], $_POST, $image_element)));
    580585
    581586                                                        $mail_arg=array('from' => $_POST['votremail'],
Note: See TracChangeset for help on using the changeset viewer.