Plugin Directory

Changeset 3061816


Ignore:
Timestamp:
03/31/2024 08:39:24 PM (2 years ago)
Author:
petmatchpro
Message:

Add Setting for Max detail Thumbs

Location:
petmatchpro/trunk
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • petmatchpro/trunk/CHANGE-LOG.txt

    r3057448 r3061816  
     1Version 4.7.3 - March 31, 2024
     2+ /admin/class-pet-match-pro-admin-settings.php
     3    * Only include color css styles when the Colors tab is active. 
     4    * Add unique setting to General tab to control the max number of thumbnails displayed on the animal detail pages.
     5+ /admin/partials/pmp-option-levels-general.php
     6    * Add level value for new detail thumbnail max General setting.
     7+ /admin/partials/pmp-admin-info.php
     8    * Add help field value for new detail thumbnail max General setting.
     9+ /includes/pp/class-pet-match-pro-pp-api.php
     10    * Correct issue displaying animal details when key value does not exist.
     11    * Update to use new thumbnail max setting.
     12+ /includes/rg/class-pet-match-pro-rg-api.php
     13    * Update to use new thumbnail max setting.
     14    * Correct error when displaying animal detail that does not exist.
     15+ /public/templates/pp/*.php
     16    * Update detail templates to use new thumbnail max setting.
     17+ /public/templates/rg/*.php
     18    * Update detail templates to use new thumbnail max setting.
     19+ /includes/class-pet-match-pro-activator.php
     20    * Assign default value to new thumbnail max setting.
     21+ /admin/partials/pet-match-pro-public-color-css.php
     22    * Extend the Adoptable Details Title class to paragraphs and spans.
     23 
    124Version 4.7.2 - March 23, 2024
    225+ /public/class-pet-match-pro-public.php
  • petmatchpro/trunk/README.txt

    r3057448 r3061816  
    66Requires at least: 5.0
    77Tested up to: 6.4
    8 Stable tag: 4.7.2
     8Stable tag: 4.7.3
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • petmatchpro/trunk/admin/class-pet-match-pro-admin-settings.php

    r3057448 r3061816  
    546546            add_settings_field(
    547547                'Results per Row ',
    548                 __('Results per Row ', 'pet-match-pro-plugin'),
     548                __('Search Results per Row ', 'pet-match-pro-plugin'),
    549549                array($this, 'select_element_callback'),
    550550                'pet-match-pro-general-options',
     
    609609            )
    610610        );
    611                                
     611
     612        //echo 'level_detail_thumbs_max_adopt = ' . $pmpOptionLevelsGeneral['level_detail_thumbs_max_adopt'] . '<br>';
     613        if ( (array_key_exists('level_detail_thumbs_max_adopt', $pmpOptionLevelsGeneral)) && ($this->PMPLicenseTypeID <= $pmpOptionLevelsGeneral['level_detail_thumbs_max_adopt']) && (!empty($this->pmpLicenseKey)) ) {
     614            $classDetailThumbsMax = 'pmp-detail-thumbs-max-adopt';
     615        } else {
     616            $classDetailThumbsMax = 'pmp-option-disable';
     617        }
     618           
     619        add_settings_field(
     620            'adoptable_animal_detail_thumbs_max',
     621            __('Max Detail Thumbnails ', 'pet-match-pro-plugin'),
     622            array($this, 'select_element_callback'),
     623            'pet-match-pro-general-options',
     624            'general_settings_section',
     625                array('pet-match-pro-general-options',
     626                'adoptable_animal_detail_thumbs_max',
     627                array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12'),
     628                $this->pmpAdminInfo['adoptable_animal_detail_thumbs_max'],
     629                'class' => $classDetailThumbsMax                           
     630            )
     631        );
     632
    612633        //echo 'level_animal_detail_icons_adopt = ' . $pmpOptionLevelsGeneral['level_animal_detail_icons_adopt'] . '<br>';
    613634        if ( (array_key_exists('level_animal_detail_icons_adopt', $pmpOptionLevelsGeneral)) && ($this->PMPLicenseTypeID <= $pmpOptionLevelsGeneral['level_animal_detail_icons_adopt']) && (!empty($this->pmpLicenseKey)) ) {
     
    16181639        //$PMPLicenseTypeID = 4;
    16191640
     1641        /* Determine if Tab is Active */
     1642        $colorsActive = false;     
     1643        if (isset($_GET['subpage'])) {
     1644            $activeTab = sanitize_text_field( $_GET['subpage'] );
     1645            if ($activeTab == 'color_options') {
     1646                $colorsActive = true;
     1647            }
     1648        }
     1649
    16201650        /* Get the Settings for Use in Formatting the Labels */
    1621         if ( (is_array($this->colorOptions)) && (count($this->colorOptions) > 0) ) {
     1651        if ( ($colorsActive == true) && (is_array($this->colorOptions)) && (count($this->colorOptions) > 0) ) {
    16221652            echo '<style id="pmp-color-options">';     
    16231653            foreach ($this->colorOptions as $key=>$value) {
  • petmatchpro/trunk/admin/partials/pmp-admin-info.php

    r3057448 r3061816  
    1818$this->pmpAdminInfo['adoptable_animal_search_icons_max'] = 'Select maximum icons to display in adoptable search results.';
    1919/*$this->pmpAdminInfo['adoptable_animal_search_icon_fields'] = 'Check to display the icon data fields as well as their icons.';*/
    20 $this->pmpAdminInfo['detail_thumbnails'] = 'Select the number of thumbnails to display on the animal detail page.';
     20$this->pmpAdminInfo['adoptable_animal_detail_thumbs_max'] = 'Select the maximum thumbnails to display on the animal detail page.';
    2121$this->pmpAdminInfo['adoptable_animal_detail_icons'] = 'Check to show icons in adoptable detail page.';
    2222$this->pmpAdminInfo['adoptable_animal_detail_icons_max'] = 'Select maximum icons to display on adoptable detail page.';
  • petmatchpro/trunk/admin/partials/pmp-option-levels-general.php

    r3050057 r3061816  
    99'level_search_icons_max_adopt' => 2,
    1010/*'level_search_icon_fields_adopt' => 2, */
    11 'level_detail_thumbnails' => 2,         
     11'level_detail_thumbs_max_adopt' => 2,           
    1212'level_animal_detail_icons_adopt' => 2,
    1313'level_animal_detail_icons_max_adopt' => 2,
  • petmatchpro/trunk/includes/class-pet-match-pro-activator.php

    r3050057 r3061816  
    1717                'adoptable_animal_search_icons'         => '',
    1818                'adoptable_animal_search_icons_max'     => '3',
    19 /*              'detail_thumbnails'                     => '3', */
     19                'adoptable_animal_detail_thumbs_max'    => '3',
    2020                'adoptable_animal_detail_icons'         => '',
    2121                'adoptable_animal_detail_icons_max'     => '3',
     
    2525                'details_template_found'                => 'found-default',
    2626                'details_page_adopt'                    => '0',
    27                 'details_page_lost'                     => '0/',
     27                'details_page_lost'                     => '0',
    2828                'details_page_found'                    => '0',
    2929                'details_page_poster'                   => '0',
  • petmatchpro/trunk/includes/pp/class-pet-match-pro-pp-api.php

    r3057448 r3061816  
    13771377            //create search details based on details set by admin or shortcode
    13781378           
    1379           $detailsPage = $selfURLIN . '?method=' . $detailsFunc . '&animalID=' . $results['id'];
     1379            if (array_key_exists('id', $results)) {
     1380                $detailsPage = $selfURLIN . '?method=' . $detailsFunc . '&animalID=' . $results['id'];
     1381            } else {
     1382                $detailsPage = $selfURLIN . '?method=' . $detailsFunc . '&animalID=' . constant('ERROR');           
     1383            }
    13801384            //use override details to show $searchResultDetails if defined in admin and or shortcode
    13811385
     
    14021406           
    14031407            //if name is forced to be excluded get the name but dont include in array
     1408            if (!array_key_exists('name', $results)) {
     1409                $results['name'] = constant('EMPTY_VALUE');
     1410            }
    14041411            $animalName = $results['name'];
    14051412            if (!array_key_exists('name', $searchResultDetails)) {
     
    14241431                    //for sex in whole world used on found and lost
    14251432                    if ($key == constant('PETPOINT_SEX')) {
    1426                         if ($results[$key] == 'M') {
    1427                             $DetailsOutput[$key]['value'] = 'Male';
    1428                         } elseif ($results[$key] == 'F') {
    1429                             $DetailsOutput[$key]['value'] = 'Female';
    1430                         } elseif ($results[$key] == 'U') {
     1433                        if ( (array_key_exists($key, $results)) ) {
     1434                            if ($results[$key] == 'M') {
     1435                                $DetailsOutput[$key]['value'] = 'Male';
     1436                            } elseif ($results[$key] == 'F') {
     1437                                $DetailsOutput[$key]['value'] = 'Female';
     1438                            } elseif ($results[$key] == 'U') {
     1439                                $DetailsOutput[$key]['value'] = 'Unknown';
     1440                            }
     1441                        } else {
    14311442                            $DetailsOutput[$key]['value'] = 'Unknown';
    1432                         }
    1433                     }
     1443                        }
     1444                    }
    14341445                    //for age compute in years and months
    14351446                    if ($key == constant('PETPOINT_AGE')) {
    14361447                        //echo 'Results Age Value is ' . $results[$key] . '<br>';
    14371448                        //echo 'Converted Age is ' . $this->convertAge($results[$key], array_key_exists('age_in_years', $general_options)) . '<br>';
    1438                         $DetailsOutput[$key]['value'] = $this->convertAge($results[$key], array_key_exists('age_in_years', $general_options));
     1449                        if (array_key_exists($key, $results)) {
     1450                            $DetailsOutput[$key]['value'] = $this->convertAge($results[$key], array_key_exists('age_in_years', $general_options));
     1451                        } else {
     1452                            $DetailsOutput[$key]['value'] = constant('EMPTY_VALUE');
     1453                        }
    14391454                    //if (array_key_exists('age_in_years', $FilterAdminOptions)) { /* RMB - Switch to General Options */
    14401455//                    if ( (array_key_exists('age_in_years', $general_options)) && ($licenseTypeID != constant('FREE_LEVEL')) ) {
     
    19591974                        $animalDetails[$key]['value'] = $detailsItem[$key];
    19601975                    }
    1961                     if ( ($key == constant('PETPOINT_SEX')) && (array_key_exists('value', $animalDetails[$key])) ) {
    1962                         if ($animalDetails[$key]['value'] == 'M') {
    1963                             $animalDetails[$key]['value'] = 'Male';
    1964                         } elseif ($animalDetails[$key]['value'] == 'F') {
    1965                             $animalDetails[$key]['value'] = 'Female';
    1966                         }
     1976                    if ($key == constant('PETPOINT_SEX')) {
     1977                        if (array_key_exists('value', $animalDetails[$key])) {
     1978                            if ($animalDetails[$key]['value'] == 'M') {
     1979                                $animalDetails[$key]['value'] = 'Male';
     1980                            } elseif ($animalDetails[$key]['value'] == 'F') {
     1981                                $animalDetails[$key]['value'] = 'Female';
     1982                            }
     1983                        } else {
     1984                            $animalDetails[$key]['value'] = constant('EMPTY_VALUE');                       
     1985                        }
    19671986                    }
    19681987                    if (array_key_exists($key, $detailsItem)) {
     
    19842003                    }
    19852004                    if ($key == constant('PETPOINT_AGE')) {
    1986                         $animalDetails[$key]['value'] = $this->convertAge($detailsItem[$key], array_key_exists('age_in_years', $general_options));
    1987                     }
     2005                        if (array_key_exists(constant('PETPOINT_AGE'), $detailsItem)) {
     2006                            $animalDetails[$key]['value'] = $this->convertAge($detailsItem[$key], array_key_exists('age_in_years', $general_options));
     2007                        } else {
     2008                            $animalDetails[$key]['value'] = constant('EMPTY_VALUE');
     2009                        }
     2010                    }
    19882011                    /* RMB - Remove Time from Date Fields */
    19892012                    if (str_contains($key, 'date')) {
    1990                         //echo 'Removing Time from Key ' . $key . '<br>';
    1991                         $animalDetails[$key]['value'] = date("m-d-Y",strtotime($detailsItem[$key]));
     2013                        if (array_key_exists($key, $detailsItem)) {
     2014                            //echo 'Removing Time from Key ' . $key . '<br>';
     2015                            $animalDetails[$key]['value'] = date("m-d-Y",strtotime($detailsItem[$key]));
     2016                        } else {
     2017                            $animalDetails[$key]['value'] = constant('EMPTY_VALUE');
     2018                        }
    19922019                    }           
    19932020                    if (!is_array($item)) {
     
    20552082
    20562083        //include the photos
     2084        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     2085            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
     2086        } else {
     2087            $maxThumbs = 3;
     2088        }
     2089        //echo '<pre>DETAIL ITEMS<br>'; print_r($detailsItem); echo '</pre>';
     2090        $thumb = 1;       
    20572091        if ($callFunc == 'AdoptableDetails') {
    2058             if (!empty($detailsItem['photo1'])) {
    2059                 $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo1'];
    2060             }
    2061             if (!empty($detailsItem['photo2'])) {
    2062                 $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo2'];
    2063             }
    2064             if (!empty($detailsItem['photo3'])) {
    2065                 $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo3'];
    2066             }
     2092            while ($thumb <= $maxThumbs) {
     2093                $thumbKey = 'photo' . $thumb;
     2094                //echo 'Processing Thumb Key ' . $thumbKey . '<br>';
     2095                if (!empty($detailsItem[$thumbKey])) {
     2096                    $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem[$thumbKey];
     2097                    //echo 'Added Thumb Key ' . $thumbKey . ' to AnimalDetails Array.<br>';
     2098                }
     2099                $thumb = $thumb + 1;               
     2100            }
     2101//          if (!empty($detailsItem['photo1'])) {
     2102//                $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo1'];
     2103//            }
     2104//            if (!empty($detailsItem['photo2'])) {
     2105//                $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo2'];
     2106//            }
     2107//            if (!empty($detailsItem['photo3'])) {
     2108//                $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo3'];
     2109//            }         
    20672110            if (!empty($detailsItem[constant('PETPOINT_VIDEOS')])) {
    20682111                $animalDetails[constant('PETPOINT_VIDEOS')] = $detailsItem['videoid'];
     
    20722115        } else {
    20732116            if (!empty($detailsItem['photo'])) {
     2117                //echo 'Added 1st Thumb<br>';
    20742118                $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo'];
    2075             }
    2076             if (!empty($detailsItem['photo1'])) {
    2077                 $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo1'];
    2078             }
    2079             if (!empty($detailsItem['photo2'])) {
    2080                 $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo2'];
    2081             }
     2119                $maxThumbs = $maxThumbs - 1;
     2120                //echo 'Decremented Max Thumbs to ' . $maxThumbs . '<br>';
     2121            }
     2122            while ($thumb <= $maxThumbs) {
     2123                $thumbKey = 'photo' . $thumb;
     2124                //echo 'Processing Thumb Key ' . $thumbKey . '<br>';
     2125                if (!empty($detailsItem[$thumbKey])) {
     2126                    $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem[$thumbKey];
     2127                    //echo 'Added Thumb Key ' . $thumbKey . ' to AnimalDetails Array.<br>';
     2128                }
     2129                $thumb = $thumb + 1;
     2130            }
     2131           
     2132//            if (!empty($detailsItem['photo1'])) {
     2133//                $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo1'];
     2134//            }
     2135//            if (!empty($detailsItem['photo2'])) {
     2136//                $animalDetails[constant('PETPOINT_PHOTOS')][] = $detailsItem['photo2'];
     2137//            }
    20822138        }
    20832139
  • petmatchpro/trunk/includes/rg/class-pet-match-pro-rg-api.php

    r3057448 r3061816  
    11231123
    11241124        //include the photos
    1125         $numPhotos = intval($this->generalOptions['adoptable_animal_detail_icons_max']) + 1;
    1126         //echo 'Number of Photos is ' . $numPhotos . '<br>';
    1127         if ( is_int($numPhotos) ) {
     1125//      $numPhotos = intval($this->generalOptions['adoptable_animal_detail_icons_max']) + 1;       
     1126        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     1127            $maxThumbs = intval($this->generalOptions['adoptable_animal_detail_thumbs_max']);
     1128        } else {
     1129            $maxThumbs = 3;
     1130        }
     1131        //echo 'Max Thumbs is ' . $maxThumbs . '<br>';       
     1132        //echo '<pre>DETAIL ITEMS<br>'; print_r($detailsItem); echo '</pre>';
     1133        if ( is_int($maxThumbs) ) {
     1134            //echo 'Max thumbs is an Integer.<br>';
    11281135            $counter = 1;
    1129             while ($counter <= $numPhotos) {
     1136            while ($counter <= $maxThumbs) {
    11301137                $photoKey = $counter - 1;       
    1131                 //echo 'Processing Photo with Index ' . $photoKey . '<br>';
     1138                //echo 'Processing Counter ' . $counter . ' with Key ' . $photoKey . '<br>';   
    11321139                if (!empty($detailsItem[constant('RESCUEGROUPS_PHOTOS')][$photoKey])) {
    11331140                    $animalDetails[constant('RESCUEGROUPS_PHOTOS')][] = $detailsItem[constant('RESCUEGROUPS_PHOTOS')][$photoKey]['urlSecureThumbnail'];
     1141                    //echo 'Added Animal Photo<br>';
    11341142                }
    11351143                $counter = $counter + 1;
     
    11431151        }
    11441152           
    1145 
    11461153        //get template options if defined in shortcode
    11471154        if (is_array($items)) {
     
    12361243                            );
    12371244                $animalDetails = $this->fetch_rg_data($apiData, 'singleDetail', $item);
    1238                 $animalDetails = $animalDetails['data'][0];
     1245                if (is_array($animalDetails)) {
     1246                    if (array_key_exists('data', $animalDetails)) {
     1247                        $animalDetails = $animalDetails['data'][0];
     1248                    } else {
     1249                        return constant('ERROR');
     1250                    }
     1251                } else {
     1252                    return constant('ERROR');
     1253                }
    12391254                //echo '<pre>ANIMAL DETAILS<br>'; print_r($animalDetails); echo '</pre>';
    12401255                // $details = array(); - RMB
     
    12461261                //vd($details);
    12471262            } else { /* RMB */
    1248                 return null; /* RMB */
     1263                return constant('ERROR');
     1264//                return null; /* RMB */
    12491265            } /* RMB */
    12501266            // return $details[$item]; RMB
    1251         } else return null; /* RMB */
     1267        } else return constant('ERROR');
     1268//        } else return null; /* RMB */
    12521269    }
    12531270
  • petmatchpro/trunk/pet-match-pro.php

    r3057448 r3061816  
    1313 * Plugin Name:       PetMatchPro
    1414 * Description:        Integrates animal search and details from your PetPoint/Petango or RescueGroups account into your website with simple shortcodes.
    15  * Version:           4.7.2
     15 * Version:           4.7.3
    1616 * Author:            PetMatchPro
    1717 * Author URI:        https://PetMatchPro.com
     
    2828 * Current plugin version.
    2929 */
    30 define('PET_MATCH_PRO_VERSION', '4.7.2');
     30define('PET_MATCH_PRO_VERSION', '4.7.3');
    3131
    3232/* Define Global Variables */
  • petmatchpro/trunk/public/partials/pet-match-pro-public-color-css.php

    r3057448 r3061816  
    120120        $color = trim($colorOptions['detail_result_title']);
    121121        echo 'h1.pmp-adoptable-details-title {color:' . $color . '}';
     122        echo 'p.pmp-adoptable-details-title {color:' . $color . '}';   
     123        echo 'span.pmp-adoptable-details-title {color:' . $color . '}';
    122124    }
    123125
  • petmatchpro/trunk/public/templates/pp/adoptable-conversion-no-app.php

    r3057448 r3061816  
    6565   
    6666    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    67         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    68             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     67        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     68            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    6969        } else {
    7070            $maxThumbs = 6;
     
    8080        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8181
    82         $thumb = 1;     
     82        $thumb = 0;     
    8383        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt']) ) {       
    8484//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt'] ) {       
  • petmatchpro/trunk/public/templates/pp/adoptable-conversion-poster.php

    r3057448 r3061816  
    6565   
    6666    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    67         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    68             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     67        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     68            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    6969        } else {
    7070            $maxThumbs = 6;
     
    8181        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8282
    83         $thumb = 1;     
     83        $thumb = 0;     
    8484        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt']) && ($thumb <= $maxThumbs) ) {     
    8585//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt'] ) {       
  • petmatchpro/trunk/public/templates/pp/adoptable-conversion-with-app.php

    r3057448 r3061816  
    6565   
    6666    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    67         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    68             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     67        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     68            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    6969        } else {
    7070            $maxThumbs = 6;
     
    7979        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8080
    81         $thumb = 1;
     81        $thumb = 0;
    8282        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt']) && ($thumb <= $maxThumbs) ) {     
    8383//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt'] ) {       
  • petmatchpro/trunk/public/templates/pp/adoptable-conversion.php

    r3057448 r3061816  
    6565   
    6666    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    67         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    68             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     67        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     68            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    6969        } else {
    7070            $maxThumbs = 6;
     
    8080        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8181
    82         $thumb = 1;     
     82        $thumb = 0;     
    8383        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt']) && ($thumb <= $maxThumbs) ) {     
    8484//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt'] ) {       
  • petmatchpro/trunk/public/templates/pp/adoptable-default.php

    r3057448 r3061816  
    6868
    6969    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    70         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    71             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     70        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     71            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    7272        } else {
    7373            $maxThumbs = 6;
     
    8282        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8383
    84         $thumb = 1;     
     84        $thumb = 0;     
    8585        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt']) && ($thumb <= $maxThumbs) ) {     
    8686            foreach($animalDetails[constant('PETPOINT_PHOTOS')] as $photoURL){
  • petmatchpro/trunk/public/templates/pp/adoptable-wide.php

    r3057448 r3061816  
    6767
    6868    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    69         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    70             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     69        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     70            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    7171        } else {
    7272            $maxThumbs = 6;
     
    8181        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8282       
    83         $thumb = 1;     
     83        $thumb = 0;     
    8484        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt']) && ($thumb <= $maxThumbs) ) {     
    8585//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsAdopt['level_detail_photo_adopt'] ) {       
  • petmatchpro/trunk/public/templates/pp/found-default.php

    r3057448 r3061816  
    6666
    6767    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    68         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    69             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     68        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     69            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    7070        } else {
    7171            $maxThumbs = 6;
     
    8080        $gaParamArray['event_action'] = 'Select';
    8181        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    82         $thumb = 1;     
     82       
     83        $thumb = 0;     
    8384        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsFound['level_detail_photo_found']) && ($thumb <= $maxThumbs) ) {     
    8485//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsFound['level_detail_photo_found'] ) {       
  • petmatchpro/trunk/public/templates/pp/found-poster.php

    r3057448 r3061816  
    6666
    6767    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    68         $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
    69         if (!is_numeric($maxThumbs)) {
     68        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     69            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
     70        } else {
    7071            $maxThumbs = 6;
    7172        }
    7273    }
    73        
     74   
    7475    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    7576        $output .= '    <div class="pmp-details-thumbs">';
     
    8283        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8384
    84         $thumb = 1;     
     85        $thumb = 0;     
    8586        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsFound['level_detail_photo_found']) && ($thumb <= $maxThumbs) ) {
    8687//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsFound['level_detail_photo_found'] ) {       
  • petmatchpro/trunk/public/templates/pp/lost-default.php

    r3057448 r3061816  
    6666     
    6767    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    68         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    69             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     68        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     69            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    7070        } else {
    7171            $maxThumbs = 6;
     
    8080        $gaParamArray['event_action'] = 'Select';
    8181        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    82         $thumb = 1;     
     82       
     83        $thumb = 0;     
    8384        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsLost['level_detail_photo_lost']) && ($thumb <= $maxThumbs) ) {
    8485//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsLost['level_detail_photo_lost'] ) {     
  • petmatchpro/trunk/public/templates/pp/lost-poster.php

    r3057448 r3061816  
    6666
    6767    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    68         $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
    69         if (!is_numeric($maxThumbs)) {
     68        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     69            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
     70        } else {
    7071            $maxThumbs = 6;
    7172        }
     
    8283        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8384
    84         $thumb = 1;     
     85        $thumb = 0;     
    8586        if ( (array_key_exists(constant('PETPOINT_PHOTOS'), $animalDetails)) && ($this->PMPLicenseTypeID <= $pmpFieldLevelsLost['level_detail_photo_lost']) && ($thumb <= $maxThumbs) ) {
    8687//      if ( $this->PMPLicenseTypeID <= $pmpFieldLevelsLost['level_detail_photo_lost'] ) {     
  • petmatchpro/trunk/public/templates/rg/adoptable-cpa.php

    r3057448 r3061816  
    100100   
    101101    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    102         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    103             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     102        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     103            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    104104        } else {
    105105            $maxThumbs = 6;
     
    115115        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    116116
    117         $thumb = 1;
     117        $thumb = 0;
    118118        $photoLevelKey = constant('LEVEL_PREFIX_ANIMAL_DETAIL') . constant('RESCUEGROUPS_PHOTOS') . '_adopt';
    119119        //echo 'Photo Level Key = ' . $photoLevelKey . '<br>';
  • petmatchpro/trunk/public/templates/rg/adoptable-default.php

    r3057448 r3061816  
    7272
    7373    if ( !empty($this->PMPLicenseTypeID) && ($this->PMPLicenseTypeID != constant('FREE_LEVEL')) ) {
    74         if (array_key_exists('adoptable_animal_detail_icons_max', $this->generalOptions)) {
    75             $maxThumbs = $this->generalOptions['adoptable_animal_detail_icons_max'];
     74        if (array_key_exists('adoptable_animal_detail_thumbs_max', $this->generalOptions)) {
     75            $maxThumbs = $this->generalOptions['adoptable_animal_detail_thumbs_max'];
    7676        } else {
    7777            $maxThumbs = 6;
     
    8787        $gaParamArray['page_url'] = $_SERVER['REQUEST_URI'];
    8888
    89         $thumb = 1;     
     89        $thumb = 0;     
    9090        $photoLevelKey = constant('LEVEL_PREFIX_ANIMAL_DETAIL') . constant('RESCUEGROUPS_PHOTOS') . '_adopt';
    9191        //echo 'Photo Level Key = ' . $photoLevelKey . '<br>';
Note: See TracChangeset for help on using the changeset viewer.