Changeset 1702300
- Timestamp:
- 07/25/2017 10:42:41 AM (9 years ago)
- Location:
- chartsbeds/trunk
- Files:
-
- 7 edited
-
admin_widget_bar.php (modified) (1 diff)
-
chartsbeds-plugin-circle.php (modified) (2 diffs)
-
chartsbeds-plugin-page.php (modified) (1 diff)
-
chartsbeds-widget-bar.php (modified) (2 diffs)
-
chartsbeds-widget-review.php (modified) (1 diff)
-
hotelrev.php (modified) (1 diff)
-
styles/style.css (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
chartsbeds/trunk/admin_widget_bar.php
r1701364 r1702300 37 37 // Use shortcode in a PHP file (outside the post editor). 38 38 echo do_shortcode( '[chartsbeds-review-bar key="'.$key.'"]' ); 39 40 39 echo $after_widget."</div>"; 41 40 } -
chartsbeds/trunk/chartsbeds-plugin-circle.php
r1701364 r1702300 16 16 } 17 17 18 $obj = json_decode($json, true); 18 $obj = json_decode($json, true); 19 $arrPercent =''; 20 $cssafter = ''; 21 echo "<script type='text/javascript' src='".plugins_url( 'scripts/circles.js', __FILE__ )."'></script>"; 22 echo '<div id="canvas">'; 23 24 for ($i=1; $i<=5; $i++){ 19 25 20 $clean = $obj['reviews_average']['cleanliness']; 21 $loca = $obj['reviews_average']['location']; 22 $staf = $obj['reviews_average']['staff']; 23 $room = $obj['reviews_average']['rooms']; 24 $fun = $obj['reviews_average']['fun']; 26 27 $qname = $obj['questions']['question'.$i.'']; 28 $qval = $obj['reviews_average']['question'.$i.'']; 29 30 if(empty($qval)){ 31 $qval = '5.0000'; 32 } 33 34 $cssafter .= " #circles-".$i.":after {content: '".$qname."';} "; 25 35 26 $arrPercent = array( 27 "cleanliness" => $clean, 28 "location" => $loca, 29 "staff" => $staf, 30 "rooms" => $room, 31 "fun" => $fun, 32 ); 33 34 echo "<script type='text/javascript' src='".plugins_url( 'scripts/circles.js', __FILE__ )."'></script>"; 35 echo '<div id="canvas">'; 36 echo '<div class="wrap_circle" style="float:left;"><div class="circle" id="circles-1">cleanliness</div></div>'; 37 echo '<div class="wrap_circle" style="float:left;"><div class="circle" id="circles-2">location</div></div>'; 38 echo '<div class="wrap_circle" style="float:left;"><div class="circle" id="circles-3">staff</div></div>'; 39 echo '<div class="wrap_circle" style="float:left;"><div class="circle" id="circles-4">rooms</div></div>'; 40 echo '<div class="wrap_circle" style="float:left;"><div class="circle" id="circles-5">fun</div></div>'; 41 echo '</div>'; 42 36 $arrPercent[''.$qname.''] = $qval; 37 echo '<div class="wrap_circle" style="float:left;"><div class="circle" id="circles-'.$i.'">'.$qname.'</div></div>'; 38 } 39 echo '</div>'; 40 echo "<style type=\"text/css\" media=\"screen\">".$cssafter."</style>"; 43 41 44 42 echo '<script type="application/javascript">'; … … 47 45 $i = 1; 48 46 foreach($arrPercent as $k=>$v){ 49 $c_value = $v*20;47 $c_value = intval($v*20); 50 48 echo "var child = document.getElementById('circles-".$i."'), percentage = '".$c_value."',"; 51 49 $h_color = $i-1; -
chartsbeds/trunk/chartsbeds-plugin-page.php
r1701364 r1702300 91 91 echo '<span class="testimonials-time">'.$reviewsArray['country'].'</span>'; 92 92 echo '<span class="testimonials-post">'.$reviewsArray['timestamp'].'</span>'; 93 echo '<span class="testimonials-post"><i class="fa fa-heart recommends" aria-hidden="true"></i> '.$reviewsArray['name'].' recommends this hotel</span></div></div>'; 94 95 echo "</div> \n </div> \n </div> \n "; 93 94 if($reviewsArray['recommends']){ 95 echo '<span class="testimonials-post"><i class="fa fa-heart recommends" aria-hidden="true"></i> '.$reviewsArray['name'].' recommends this hotel</span>'; 96 } 97 98 echo "</div></div></div> \n </div> \n </div> \n "; 96 99 $counter++; 97 100 } -
chartsbeds/trunk/chartsbeds-widget-bar.php
r1701364 r1702300 19 19 //$json = file_get_contents('http://dashboard.chartspms.com/REVIEWS.json.php?apiKey='.get_option("charts_key").''); 20 20 $obj = json_decode($json, true); 21 $arrPercent =''; 22 23 for ($i=1; $i<=5; $i++){ 21 24 22 $clean = $obj['reviews_average']['cleanliness']; 23 $loca = $obj['reviews_average']['location']; 24 $staf = $obj['reviews_average']['staff']; 25 $room = $obj['reviews_average']['rooms']; 26 $fun = $obj['reviews_average']['fun']; 25 $qval = $obj['reviews_average']['question'.$i.'']; 26 $qname = $obj['questions']['question'.$i.'']; 27 28 if(empty($qval)){ 29 $qval = '5.0000'; 30 } 27 31 28 $arrPercent = array( 29 "cleanliness" => $clean, 30 "location" => $loca, 31 "staff" => $staf, 32 "rooms" => $room, 33 "fun" => $fun, 34 ); 32 $arrPercent[''.$qname.'']= $qval; 33 34 } 35 35 36 36 echo '<script>'; … … 42 42 echo '</script>'; 43 43 44 44 45 45 $pl = 1; 46 46 foreach($arrPercent as $k=>$v){ 47 $the_value = $v*20;47 $the_value = intval($v*20); 48 48 echo '<div class="progress skill-bar ">'; 49 49 echo '<div class="progress-bar progress-'.$pl.' progress-bar-striped active" role="progressbar" aria-valuenow="'.$the_value.'" aria-valuemin="0" aria-valuemax="100">'; 50 echo '<span class="skill">'.$k.'<i class="val">'.$the_value.' </i></span>';50 echo '<span class="skill">'.$k.'<i class="val">'.$the_value.'%</i></span>'; 51 51 echo '</div></div>'; 52 52 $pl++; } -
chartsbeds/trunk/chartsbeds-widget-review.php
r1701364 r1702300 59 59 echo $res['review']; 60 60 echo '</p>'; 61 echo '<p class="charts-widg" ><small><span class="fa fa-heart" style="color:red"> </span>'; 62 echo ucfirst($res['name']); 63 echo ' recommends this hotel</small></p>'; 61 62 if($res['recommends']){ 63 echo '<p class="charts-widg" ><small><span class="fa fa-heart" style="color:red"> </span>'; 64 echo ucfirst($res['name']); 65 echo ' recommends this hotel</small></p>'; 66 } 67 64 68 echo '</div></li><hr>'; 65 69 } -
chartsbeds/trunk/hotelrev.php
r1701364 r1702300 3 3 * Plugin Name: Chartsbeds 4 4 * Description: Chartsbeds reviews plugin. 5 * Version: 1.0. 75 * Version: 1.0.8 6 6 * Author: ChartsBeds 7 7 * Author URI: https://chartsbeds.com -
chartsbeds/trunk/styles/style.css
r1665959 r1702300 114 114 line-height: 18px; 115 115 padding: 0; 116 margin: 0 0 0 20px;117 116 text-transform: uppercase; 118 117 } … … 120 119 float: right; 121 120 font-weight: 600; 122 margin: 0 20px 0 0;121 margin: 0 10px 0 0; 123 122 } 124 123 … … 172 171 /*Circles CSS*/ 173 172 174 #circles-1:after{ 175 content: " cleanliness"; 173 #circles-1:after, #circles-2:after, #circles-3:after, #circles-4:after, #circles-5:after { 176 174 font-size: 16px; 177 175 position: relative; 178 176 display: block; 179 177 } 180 #circles-2:after{181 content: " location";182 font-size: 16px;183 position: relative;184 display: block;185 }186 #circles-3:after{187 content: " staff";188 font-size: 16px;189 position: relative;190 display: block;191 }192 #circles-4:after{193 content: " rooms";194 font-size: 16px;195 position: relative;196 display: block;197 }198 #circles-5:after{199 content: " fun";200 font-size: 16px;201 position: relative;202 display: block;203 }204 205 /*.chartsbeds-circle{206 min-height: 180px;207 }*/208 178 209 179 .wrap_circle{ … … 219 189 left: 3%; 220 190 position: relative; 221 min-height: 240px;191 height: 0px; 222 192 } 223 193
Note: See TracChangeset
for help on using the changeset viewer.