Plugin Directory

Changeset 1513332


Ignore:
Timestamp:
10/12/2016 11:54:49 AM (9 years ago)
Author:
reviewbuilder
Message:

New version relesed 1.1.5

Location:
review-builder/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • review-builder/trunk/app.php

    r1508588 r1513332  
    44 * Plugin URI: https://sygnoos.com
    55 * Description: Review Builder will allow you to add reviews section to your site. Build a reviews section so customers can leave reviews for your products.
    6  * Version: 1.1.5
     6 * Version: 1.1.6
    77 * Author: Sygnoos
    88 * Author URI: https://www.sygnoos.com
  • review-builder/trunk/assets/page/scripts/save.js

    r1508588 r1513332  
    407407    else if (jQuery('.sgrb-one-field').length == 1 || (jQuery('.sgrb-field-name').first().val() == '')) {
    408408        if (jQuery('.sgrb-field-name').val() == '') {
    409             sgrbError = 'At least one category is required';
     409            sgrbError = 'At least one feature is required';
    410410        }
    411411    }
    412412    if (sgrbError) {
    413413        alert(sgrbError);
    414         if ((sgrbError == 'At least one category is required') || (sgrbError == 'Empty category fields')) {
     414        if ((sgrbError == 'At least one feature is required') || (sgrbError == 'Empty feature fields')) {
    415415            jQuery('.sgrb-field-name:last').focus();
    416416        }
  • review-builder/trunk/com/config/config.php

    r1508588 r1513332  
    33define('SGRB_COMMENTS_PER_PAGE', 10);
    44define('SGRB_PRO_VERSION', 0);
    5 define('SGRB_VERSION', '1.1.5');
     5define('SGRB_VERSION', '1.1.6');
    66define('SG_REVIEW_BANNER', 'sg-review-banner');
    77define('SGRB_RATE_TYPE_STAR', 1);
  • review-builder/trunk/com/controllers/Review.php

    r1508612 r1513332  
    3636    {
    3737        global $sgrb;
    38 
     38       
    3939        $attributes = shortcode_atts(array(
    4040            'id' => '1',
     
    6969        global $sgrb;
    7070        $sgrb->includeCore('Template');
    71 
     71       
    7272        $tempOptions = array();
    7373        $options = array();
     
    9292            $review = new SGRB_ReviewModel();
    9393            $isUpdate = false;
    94 
     94           
    9595            if ($reviewId) {
    9696                $isUpdate = true;
     
    105105
    106106            $tempId = $review->getTemplate_id();
    107 
     107           
    108108            if ($tempId) {
    109109                $template = new Template($tempName,$tempId);
     
    134134            $requiredEmailCheckbox = isset($_POST['required-email-checkbox']);
    135135            $requiredTitleCheckbox = isset($_POST['required-title-checkbox']);
     136            $requiredLoginCheckbox = isset($_POST['required-login-checkbox']);
    136137            $autoApprove = isset($_POST['auto-approve-checkbox']);
    137138            $shadowOn = isset($_POST['template-field-shadow-on']);
     
    152153            $successCommentText = @$_POST['success-comment-text'];
    153154            $totalRatingText = @$_POST['total-rating-text'];
     155            $addReviewText = @$_POST['add-review-text'];
    154156            $nameText = @$_POST['name-text'];
    155157            $namePlaceholderText = @$_POST['name-placeholder-text'];
     
    162164            $postButtonText = @$_POST['post-button-text'];
    163165            $captchaText = @$_POST['captcha-text'];
     166            $loggedInText = @$_POST['logged-in-text'];
    164167            $noCategoryText = @$_POST['no-category-text'];
    165168            $noNameText = @$_POST['no-name-text'];
     
    182185            if (SGRB_PRO_VERSION) {
    183186                $options['captcha-text'] = $captchaText;
     187                $options['logged-in-text'] = $loggedInText;
    184188                $options['no-captcha-text'] = $noCaptchaText;
    185189                if ($commentsCount) {
     
    221225                $options['required-email-checkbox'] = 1;
    222226            }
     227            if ($requiredLoginCheckbox) {
     228                $options['required-login-checkbox'] = 1;
     229            }
    223230            if ($autoApprove) {
    224231                $options['auto-approve-checkbox'] = 1;
     
    228235            $options['success-comment-text'] = $successCommentText;
    229236            $options['total-rating-text'] = $totalRatingText;
     237            $options['add-review-text'] = $addReviewText;
    230238            $options['name-text'] = $nameText;
    231239            $options['name-placeholder-text'] = $namePlaceholderText;
     
    271279                wp_create_tag($tags);
    272280            }
    273 
     281           
    274282            $review->save();
    275283
     
    338346
    339347            $sgrbDataArray = array();
    340 
     348           
    341349            $fields = SGRB_CategoryModel::finder()->findAll('review_id = %d', $sgrbId);
    342350            $sgrbOptions = $sgrbRev->getOptions();
     
    364372
    365373            $options = $sgrbRev->getOptions();
    366             $options = json_decode($options, true);
     374            $options = json_decode($options, true);         
    367375
    368376            $sgrbDataArray['title'] = $title;
     
    370378            $sgrbDataArray['required-title-checkbox'] = @$options["required-title-checkbox"];
    371379            $sgrbDataArray['required-email-checkbox'] = @$options["required-email-checkbox"];
     380            $sgrbDataArray['required-login-checkbox'] = @$options["required-login-checkbox"];
    372381            $sgrbDataArray['auto-approve-checkbox'] = @$options["auto-approve-checkbox"];
    373382            $sgrbDataArray['sgrb-google-search-on'] = @$options["sgrb-google-search-on"];
     
    388397            //localization
    389398            $sgrbDataArray['success-comment-text'] = @$options["success-comment-text"];
     399            $sgrbDataArray['add-review-text'] = @$options["add-review-text"];
    390400            $sgrbDataArray['total-rating-text'] = @$options["total-rating-text"];
    391401            $sgrbDataArray['name-text'] = @$options["name-text"];
     
    399409            $sgrbDataArray['post-button-text'] = @$options["post-button-text"];
    400410            $sgrbDataArray['captcha-text'] = @$options["captcha-text"];
     411            $sgrbDataArray['logged-in-text'] = @$options["logged-in-text"];
    401412            $sgrbDataArray['no-category-text'] = @$options["no-category-text"];
    402413            $sgrbDataArray['no-name-text'] = @$options["no-name-text"];
     
    497508            $html .= $this->createReviewHtml($sgrbDataArray, true);
    498509        }
    499 
     510       
    500511        return $html;
    501512    }
     
    524535    {
    525536        global $sgrb;
     537        $userLoggedIn = false;
    526538        if (SGRB_PRO_VERSION) {
    527539            $sgrb->includeStyle('page/styles/bootstrap-formhelpers.min');
     
    580592            $sgrbWidgetWrapper = 'sgrb-widget-wrapper';
    581593        }
    582 
     594       
    583595        if ($review[0]['options']['total-rate'] == 1 || SGRB_PRO_VERSION) {
    584596            $countRates = 0;
     
    612624                $totalRate = round($rating / $countRates);
    613625            }
    614 
     626           
    615627        }
    616628        $commentsArray = array();
     
    626638                $approvedComments = SGRB_CommentModel::finder()->findAll('review_id = %d && approved = %d', array($review[0]['id'], 1));
    627639            }
    628 
     640           
    629641            $commentsArray = $approvedComments;
    630642        }
     
    665677        }
    666678
     679        $user = wp_get_current_user();
     680        if (@$review[0]['options']['required-login-checkbox']) {
     681            if ($user->exists()) {
     682                $userLoggedIn = true;
     683            }
     684            else {
     685                $userLoggedIn = false;
     686            }
     687        }
     688        else {
     689            $userLoggedIn = true;
     690        }
    667691        //localization
    668692        $thankText = 'Thank You for Your Comment';
    669693        $totalText = 'Total rating';
     694        $addReviewText = 'Add your own review';
    670695        $nameText = 'Your name';
    671696        $namePlaceholderText = 'name';
     
    683708        $noCommentText = 'Comment text is required';
    684709        $noCaptchaText = 'Invalid captcha text';
     710        $notLoggedInText = 'Sorry, to leave a review you need to log in';
    685711        if (@$review[0]['options']['success-comment-text']) {
    686712            $thankText = @$review[0]['options']['success-comment-text'];
     
    689715            $totalText = @$review[0]['options']['total-rating-text'];
    690716        }
     717        if (@$review[0]['options']['add-review-text']) {
     718            $addReviewText = @$review[0]['options']['add-review-text'];
     719        }
    691720        if (@$review[0]['options']['name-text']) {
    692721            $nameText = @$review[0]['options']['name-text'];
     
    733762        if (@$review[0]['options']['no-captcha-text']) {
    734763            $noCaptchaText = @$review[0]['options']['no-captcha-text'];
     764        }
     765        if (@$review[0]['options']['logged-in-text']) {
     766            $notLoggedInText = @$review[0]['options']['logged-in-text'];
    735767        }
    736768
     
    772804        }
    773805        $sgrbEachEditableRate = array();
    774 
     806       
    775807        if ($currentCommentId) {
    776808            $hideForm = false;
     
    897929
    898930        $mainStyles = '';
    899 
     931       
    900932        if ($review[0]['options']['rate-type'] == SGRB_RATE_TYPE_STAR) {
    901933            $sgrb->includeScript('core/scripts/jquery.rateyo');
     
    938970                    }
    939971                    $html .= '<div class="sgrb-rate-each-skin-wrapper"><input class="sgrb-each-category-total" name="" type="hidden" value="'.$eachCategoryRate.'"><div class="rateYoTotal"></div><div class="sgrb-counter"></div></div></div>';
    940 
     972                   
    941973                    $categoriesToRate .= '<input class="sgrb-fieldId" name="field[]" type="hidden" value="'.esc_attr($category->getId()).'">';
    942974                    $categoriesToRate .= '<div class="sgrb-row-category" '.$eachCategoryHide.'>
     
    11311163            }
    11321164        }
    1133 
     1165       
    11341166        $commentForm = '<div class="sgrb-user-comment-wrapper" style="background-color: '.@$review[0]['options']['total-rate-background-color'].';color: '.$review[0]['options']['rate-text-color'].';">
    11351167                            <div class="sgrb-hide-show-wrapper">
    11361168                                <div id="sgrb-review-form-title" class="sgrb-front-comment-rows">
    1137                                     <span class="sgrb-comment-title">Add your own review</span>
     1169                                    <span class="sgrb-comment-title">'.$addReviewText.'</span>
    11381170                                </div>
    11391171                                <div class="sgrb-notice-rates"><span class="sgrb-notice-rates-text"></span></div>';
     1172        if (!$userLoggedIn) {
     1173            $categoriesToRate = $notLoggedInText;
     1174        }
    11401175        $commentForm .= '<div class="sgrb-show-hide-comment-form">'.$categoriesToRate;
    11411176        $captchaHtml = '';
     
    11591194            $sgrvNotApprovedMessage = '<span class="sgrb-not-approved-message">Your comment has not been approved yet</span>';
    11601195        }
    1161         $commentForm .= @$sgrvNotApprovedMessage.'<div class="sgrb-front-comment-rows">
    1162                                 <span class="sgrb-comment-title">'.@$nameText.' </span>'.@$commentFieldAsterisk.'
    1163                                 <span class="sgrb-each-field-notice">
    1164                                     <input class="sgrb-add-fname" name="addName" type="text" value="'.@$UserComName.'" placeholder="'.@$namePlaceholderText.'">
    1165                                     <i></i>
    1166                                 </span>
    1167                             </div>
    1168                             <div class="sgrb-front-comment-rows">
    1169                                 <span class="sgrb-comment-title">'.@$emailText.' </span>'.@$emailRequiredAsterisk.'
    1170                                 <span class="sgrb-each-field-notice">
    1171                                     <input class="sgrb-add-email" name="addEmail" type="email" value="'.@$UserComEmail.'" placeholder="'.@$emailPlaceholderText.'">
    1172                                     <i></i>
    1173                                 </span>
    1174                             </div>
    1175                             <div class="sgrb-front-comment-rows">
    1176                                 <span class="sgrb-comment-title">'.@$titleText.' </span>'.@$titleRequiredAsterisk.'
    1177                                 <span class="sgrb-each-field-notice">
    1178                                     <input class="sgrb-add-title" name="addTitle" type="text" value="'.@$UserComTitle.'" placeholder="'.@$titlePlaceholderText.'">
    1179                                     <i></i>
    1180                                 </span>
    1181                             </div>
    1182                             <div class="sgrb-front-comment-rows">
    1183                                 <span class="sgrb-comment-title">'.@$commentText.' </span>'.$commentFieldAsterisk.'
    1184                                 <textarea class="sgrb-add-comment" name="addComment" placeholder="'.@$commentPlaceholderText.'">'.@$UserComComment.'</textarea><i></i>'.@$captchaHtml.'
    1185                             </div>
    1186                             <input name="addPostId" type="hidden" value="'.@$postId.'">
    1187                             <div class="sgrb-post-comment-button">
    1188                                 <input type="hidden" class="sgrb-captchaOn" name="captchaOn" value="'.@$review[0]['options']['captcha-on'].'">
    1189                                 <input type="hidden" name="currentUserCommentId" value="'.@$currentCommentId.'">
    1190                                 <input type="hidden" class="sgrb-thank-text" value="'.@$thankText.'">
    1191                                 <input type="hidden" class="sgrb-no-rate-text" value="'.@$noRateText.'">
    1192                                 <input type="hidden" class="sgrb-no-name-text" value="'.@$noNameText.'">
    1193                                 <input type="hidden" class="sgrb-no-email-text" value="'.@$noEmailText.'">
    1194                                 <input type="hidden" class="sgrb-no-title-text" value="'.@$noTitleText.'">
    1195                                 <input type="hidden" class="sgrb-no-comment-text" value="'.@$noCommentText.'">
    1196                                 <input type="hidden" class="sgrb-no-captcha-text" value="'.@$noCaptchaText.'">
    1197                                 <input data-sgrb-id="'.@$review[0]['id'].'" type="button" value="'.@$postCommentText.'" onclick="SGRB.prototype.ajaxUserRate('.@$review[0]['id'].')" class="sgrb-user-comment-submit" style="background-color: '.$review[0]['options']['total-rate-background-color'].';color: '.$review[0]['options']['rate-text-color'].';">
    1198                             </div>
    1199                             </div>
    1200                         </div>
    1201                     </div>';
    1202 
    1203 
     1196        if (!$userLoggedIn) {
     1197            $commentForm .= '<div class="sgrb-show-hide-comment-form" style="display:block"></div>';
     1198        }
     1199        else {
     1200            $commentForm .= @$sgrvNotApprovedMessage.'<div class="sgrb-front-comment-rows">
     1201                        <span class="sgrb-comment-title">'.@$nameText.' </span>'.@$commentFieldAsterisk.'
     1202                        <span class="sgrb-each-field-notice">
     1203                            <input class="sgrb-add-fname" name="addName" type="text" value="'.@$UserComName.'" placeholder="'.@$namePlaceholderText.'">
     1204                            <i></i>
     1205                        </span>
     1206                    </div>
     1207                    <div class="sgrb-front-comment-rows">
     1208                        <span class="sgrb-comment-title">'.@$emailText.' </span>'.@$emailRequiredAsterisk.'
     1209                        <span class="sgrb-each-field-notice">
     1210                            <input class="sgrb-add-email" name="addEmail" type="email" value="'.@$UserComEmail.'" placeholder="'.@$emailPlaceholderText.'">
     1211                            <i></i>
     1212                        </span>
     1213                    </div>
     1214                    <div class="sgrb-front-comment-rows">
     1215                        <span class="sgrb-comment-title">'.@$titleText.' </span>'.@$titleRequiredAsterisk.'
     1216                        <span class="sgrb-each-field-notice">
     1217                            <input class="sgrb-add-title" name="addTitle" type="text" value="'.@$UserComTitle.'" placeholder="'.@$titlePlaceholderText.'">
     1218                            <i></i>
     1219                        </span>
     1220                    </div>
     1221                    <div class="sgrb-front-comment-rows">
     1222                        <span class="sgrb-comment-title">'.@$commentText.' </span>'.$commentFieldAsterisk.'
     1223                        <textarea class="sgrb-add-comment" name="addComment" placeholder="'.@$commentPlaceholderText.'">'.@$UserComComment.'</textarea><i></i>'.@$captchaHtml.'
     1224                    </div>
     1225                    <input name="addPostId" type="hidden" value="'.@$postId.'">
     1226                    <div class="sgrb-post-comment-button">
     1227                        <input type="hidden" class="sgrb-captchaOn" name="captchaOn" value="'.@$review[0]['options']['captcha-on'].'">
     1228                        <input type="hidden" name="currentUserCommentId" value="'.@$currentCommentId.'">
     1229                        <input type="hidden" class="sgrb-thank-text" value="'.@$thankText.'">
     1230                        <input type="hidden" class="sgrb-no-rate-text" value="'.@$noRateText.'">
     1231                        <input type="hidden" class="sgrb-no-name-text" value="'.@$noNameText.'">
     1232                        <input type="hidden" class="sgrb-no-email-text" value="'.@$noEmailText.'">
     1233                        <input type="hidden" class="sgrb-no-title-text" value="'.@$noTitleText.'">
     1234                        <input type="hidden" class="sgrb-no-comment-text" value="'.@$noCommentText.'">
     1235                        <input type="hidden" class="sgrb-no-captcha-text" value="'.@$noCaptchaText.'">
     1236                        <input data-sgrb-id="'.@$review[0]['id'].'" type="button" value="'.@$postCommentText.'" onclick="SGRB.prototype.ajaxUserRate('.@$review[0]['id'].')" class="sgrb-user-comment-submit" style="background-color: '.$review[0]['options']['total-rate-background-color'].';color: '.$review[0]['options']['rate-text-color'].';">
     1237                    </div>
     1238                    </div>
     1239                </div>
     1240            </div>';
     1241        }
     1242
     1243       
    12041244        if ($isWidget) {
    12051245            $commentForm = '';
     
    13061346                $currentUser = wp_get_current_user();
    13071347                $currentUserName = $currentUser->user_nicename;
    1308                 $subject = 'Review Builder Wordpress plugin.';
     1348                $subject = 'Review Builder Wordpress plugin.'; 
    13091349                $blogName = get_option('blogname');
    13101350                $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId;
     
    13191359                $currentUser = wp_get_current_user();
    13201360                $currentUserName = $currentUser->user_nicename;
    1321                 $subject = 'Review Builder Wordpress plugin.';
     1361                $subject = 'Review Builder Wordpress plugin.'; 
    13221362                $blogName = get_option('blogname');
    13231363                $editUrl = $sgrb->adminUrl('Comment/index').'sgrb_allComms&id='.$reviewId;
     
    13611401                }
    13621402            }
    1363 
     1403           
    13641404            // if new insert, save the rater
    13651405            if ($lastComId) {
  • review-builder/trunk/com/core/SGRB.php

    r1508588 r1513332  
    122122            $selected = '';
    123123            foreach ($reviewsArray as $review) {
    124                 $options = $review->getOptions();
    125                 $options = json_decode($options, true);
    126                 $categoryId = $options['post-category'];
    127                 if ($currentPostCategory) {
    128                     if ($categoryId == $currentPostCategory[0]->term_id) {
    129                         $selected = ' selected';
    130                         $html .= '<option value="'.$review->getId().'"'.$selected.'>'.$review->getTitle().'</option>';
     124                if ($review) {
     125                    $options = $review->getOptions();
     126                    $options = json_decode($options, true);
     127                    $categoryId = $options['post-category'];
     128                    if ($currentPostCategory) {
     129                        if ($categoryId == $currentPostCategory[0]->term_id) {
     130                            $selected = ' selected';
     131                            $html .= '<option value="'.$review->getId().'"'.$selected.'>'.$review->getTitle().'</option>';
     132                        }
    131133                    }
    132134                }
     
    159161            $arr = SGRB_TemplateModel::finder()->findAll('name = %s', 'post_review');
    160162
    161             foreach ($arr as $ar) {
    162                 $reviews = SGRB_ReviewModel::finder()->find('template_id = %d', $ar->getId());
    163                 $reviewsArray[] = $reviews;
    164             }
    165             foreach ($reviewsArray as $review) {
    166                 $options = $review->getOptions();
    167                 $options = json_decode($options, true);
    168                 $categoryId = $options['post-category'];
    169                 $disableComments = $options['disableWPcomments'];
    170 
    171                 $category = get_the_category($currentPost->ID);
    172                 if ($categoryId == $category[0]->cat_ID) {
    173                     $rev = new SGRB_ReviewController();
    174                     $html = $rev->createPostReviewHtml($review);
     163            if (!empty($arr)) {
     164                foreach ($arr as $ar) {
     165                    $reviews = SGRB_ReviewModel::finder()->find('template_id = %d', $ar->getId());
     166                    $reviewsArray[] = $reviews;
    175167                }
    176             }
    177             if ($html) {
    178                 if ($disableComments) {
    179                     add_filter('comments_open', array($this, 'disableComments'));
     168                foreach ($reviewsArray as $review) {
     169                    if ($review) {
     170                        $options = $review->getOptions();
     171                        $options = json_decode($options, true);
     172                        $categoryId = $options['post-category'];
     173                        $disableComments = $options['disableWPcomments'];
     174
     175                        $category = get_the_category($currentPost->ID);
     176                        if ($categoryId == $category[0]->cat_ID) {
     177                            $rev = new SGRB_ReviewController();
     178                            $html = $rev->createPostReviewHtml($review);
     179                        }
     180                    }
    180181                }
    181                 else {
    182                     remove_filter('comments_open', array($this, 'disableComments'));
     182                if ($html) {
     183                    if ($disableComments) {
     184                        add_filter('comments_open', array($this, 'disableComments'));
     185                    }
     186                    else {
     187                        remove_filter('comments_open', array($this, 'disableComments'));
     188                    }
     189                    $content = $content.'<div>'.$html;
     190                    return '<div>'.$content.'<div>';
    183191                }
    184                 $content = $content.'<div>'.$html;
    185                 return '<div>'.$content.'<div>';
    186192            }
    187193        }
  • review-builder/trunk/com/layouts/Review/save.php

    r1508588 r1513332  
    277277                                    <p><label for=""><input id="" class="sgrb-email-notification-checkbox" value="true" type="checkbox"><?php echo _e('Notify for new comments to this email:', 'sgrb');?></label>
    278278                                    <input class="sgrb-email-notification"></p>
     279                                    <p><label for="sgrb-required-login-checkbox"><input id="sgrb-required-login-checkbox" class="sgrb-email-notification-checkbox" type="checkbox"><?php echo _e('Require login for new comments', 'sgrb');?></label>
    279280                                </div>
    280281                            </div>
     
    302303                                <input class="sgrb-email-notification" type="email" value="<?php echo (@$sgrbRevId != 0) ? @$sgrbDataArray['notify'] : get_option('admin_email');?>" name="email-notification"></p>
    303304                                <input class="sgrb-admin-email" type="hidden" value="<?php echo get_option('admin_email') ;?>">
     305                                <p><label for="sgrb-required-login-checkbox"><input id="sgrb-required-login-checkbox" class="sgrb-email-notification-checkbox" value="true" type="checkbox" name="required-login-checkbox"<?php echo (@$sgrbDataArray['required-login-checkbox']) ? ' checked' : '';?><?php echo (@$sgrbRevId != 0) ? '' : ' checked';?>><?php echo _e('Require login for new comments', 'sgrb');?></label>
    304306                            </div>
    305307                        <?php endif ; ?>
     
    312314                            </div>
    313315                            <div class="sgrb-require-options-fields sgrb-categories-title"<?php echo (@$sgrbRevId != 0) ? ' style="margin-bottom:30px;"' : '';?>>
    314                                 <p><b><?php echo _e('Categories to rate', 'sgrb');?>: </b><a class="button-primary sgrb-add-field"<?php echo (@$sgrbRevId != 0) ? ' style="pointer-events:none;" disabled' : '';?>><span class="dashicons dashicons-plus-alt button-icon"></span> Add new</a></p>
    315                                 <i class="sgrb-category-empty-warning"> <?php echo (@$sgrbRevId != 0) ? '' : _e('At least one category is required', 'sgrb');?></i>
     316                                <p><b><?php echo _e('Features to rate', 'sgrb');?>: </b><a class="button-primary sgrb-add-field"<?php echo (@$sgrbRevId != 0) ? ' style="pointer-events:none;" disabled' : '';?>><span class="dashicons dashicons-plus-alt button-icon"></span> Add new</a></p>
     317                                <i class="sgrb-category-empty-warning"> <?php echo (@$sgrbRevId != 0) ? '' : _e('At least one feature is required', 'sgrb');?></i>
    316318                            </div>
    317319                            <div class="sgrb-field-container">
     
    322324                                        <input class="sgrb-fieldId" name="fieldId[]" type="hidden" value="0">
    323325                                        <p>
    324                                             <input name="field-name[]" type="text" value="" placeholder="<?php echo _e('Category name', 'sgrb');?>" class="sgrb-field-name">
     326                                            <input name="field-name[]" type="text" value="" placeholder="<?php echo _e('e.g quality/speed/price of review item', 'sgrb');?>" class="sgrb-field-name">
    325327                                            <a class="button-secondary sgrb-remove-button" onclick="SGRB.remove('clone_1')"><span class="sgrb-dashicon dashicons dashicons-trash button-icon"></span> Remove</a>
    326328                                        </p>
     
    335337                                        <input class="sgrb-fieldId" name="fieldId[]" type="hidden" value="<?php echo esc_attr(@$field->getId());?>">
    336338                                    <p>
    337                                         <input<?php echo (@$sgrbRevId != 0) ? ' readonly' : '';?> name="field-name[]" type="text" value="<?php echo esc_attr(@$field->getName());?>"placeholder="<?php echo _e('Category name', 'sgrb');?>" class="sgrb-border sgrb-field-name">
     339                                        <input<?php echo (@$sgrbRevId != 0) ? ' readonly' : '';?> name="field-name[]" type="text" value="<?php echo esc_attr(@$field->getName());?>"placeholder="<?php echo _e('e.g quality/speed/price of review item', 'sgrb');?>" class="sgrb-border sgrb-field-name">
    338340                                        <a class="button-secondary sgrb-remove-button" onclick="SGRB.remove(<?php echo esc_attr(@$field->getId());?>)"><span class="sgrb-dashicon dashicons dashicons-trash button-icon"></span> Remove</a>
    339341                                    </p>
     
    399401                                <div class="sg-row">
    400402                                    <div class="sg-col-4">
     403                                        <span class="sgrb-comments-count-options"><?php echo _e('Add review:', 'sgrb');?></span>
     404                                    </div>
     405                                    <div class="sg-col-8">
     406                                        <input class="sgrb-comments-count-to-show sgrb-localization-input" name="add-review-text" value="<?php echo (@$sgrbDataArray['add-review-text']) ? @$sgrbDataArray['add-review-text'] : 'Add your own review';?>" type="text">
     407                                    </div>
     408                                </div>
     409                                <div class="sg-row">
     410                                    <div class="sg-col-4">
    401411                                        <span class="sgrb-comments-count-options"><?php echo _e('Name:', 'sgrb');?></span>
    402412                                    </div>
     
    471481                                <?php if (!SGRB_PRO_VERSION) :?>
    472482                                <div style='position: relative;overflow: hidden;'>
    473                                     <div class="sgrb-version"><input type="button" class="sgrb-upgrade-button" style="font-size: 17px;height: 100%;" value="PRO" onclick="window.open('<?php echo SGRB_PRO_URL;?>')"></div>
     483                                    <div class="sgrb-version"><input type="button" class="sgrb-upgrade-button" style="font-size: 17px;height: 50%;" value="PRO" onclick="window.open('<?php echo SGRB_PRO_URL;?>')"></div>
    474484                                    <div class="sg-row">
    475485                                        <div class="sg-col-4">
     
    477487                                        </div>
    478488                                        <div class="sg-col-8">
    479                                             <input class="sgrb-comments-count-to-show sgrb-localization-input" value="Type here" type="text">
     489                                            <input class="sgrb-comments-count-to-show sgrb-localization-input" value="Change image" type="text">
     490                                        </div>
     491                                    </div>
     492                                    <div class="sg-row">
     493                                        <div class="sg-col-4">
     494                                            <span class="sgrb-comments-count-options"><?php echo _e('Not logged in users:', 'sgrb');?></span>
     495                                        </div>
     496                                        <div class="sg-col-8">
     497                                            <input class="sgrb-comments-count-to-show sgrb-localization-input" value="Sorry, to leave a review you need to log in" type="text">
    480498                                        </div>
    481499                                    </div>
     
    487505                                        </div>
    488506                                        <div class="sg-col-8">
    489                                             <input class="sgrb-comments-count-to-show sgrb-localization-input" name="captcha-text" value="<?php echo (@$sgrbDataArray['captcha-text']) ? @$sgrbDataArray['captcha-text'] : 'Type here';?>" type="text">
     507                                            <input class="sgrb-comments-count-to-show sgrb-localization-input" name="captcha-text" value="<?php echo (@$sgrbDataArray['captcha-text']) ? @$sgrbDataArray['captcha-text'] : 'Change image';?>" type="text">
     508                                        </div>
     509                                    </div>
     510                                    <div class="sg-row">
     511                                        <div class="sg-col-4">
     512                                            <span class="sgrb-comments-count-options"><?php echo _e('Not logged in users:', 'sgrb');?></span>
     513                                        </div>
     514                                        <div class="sg-col-8">
     515                                            <input class="sgrb-comments-count-to-show sgrb-localization-input" name="logged-in-text" value="<?php echo (@$sgrbDataArray['logged-in-text']) ? @$sgrbDataArray['logged-in-text'] : 'Sorry, to leave a review you need to log in';?>" type="text">
    490516                                        </div>
    491517                                    </div>
  • review-builder/trunk/readme.txt

    r1508588 r1513332  
    11=== Review ===
    22Plugin Name: Review
    3 Version: 1.1.5
     3Version: 1.1.6
    44Donate link: http://plugins.sygnoos.com/wordpress-review-builder/
    55URI: http://plugins.sygnoos.com/wordpress-review-builder/
     
    128128== Changelog ==
    129129
     130= 1.1.6 =
     131* Added placeholders for inputs.
     132* Code optimization and cleanup.
     133
    130134= 1.1.5 =
    131135* New: Availability to add tags to review.
     
    193197== Upgrade Notice ==
    194198
    195 Current version of Review Builder is v1.1.5
     199Current version of Review Builder is v1.1.6
    196200
    197201== Other Notes ==
Note: See TracChangeset for help on using the changeset viewer.