Support Forums - Classified Ads Script Osclass

Osclass theme support => Stela Osclass Theme => Topic started by: slicer on February 15, 2018, 01:28:48 AM

Title: Reporting bug with user rating on premium
Post by: slicer on February 15, 2018, 01:28:48 AM
Hey @frosticeck I noticed theres a lil bug with home and premium blocks with STELA, if a user is rated for example 5.0 premium block will show a different value.

for instance  an ad premium is 4.8 rating  - the same item inside premium blocks is 3.9

I'm using this code 
Code: [Select]
<?php if(function_exists('ur_show_rating_stars')) { echo ur_show_rating_stars(); } ?>
on loop-single-premium.php
Title: Re: Reporting bug with user rating on premium
Post by: MB Themes on February 15, 2018, 12:50:03 PM
@slicer
Go to this file:
oc-content/plugins/user_rating/functions.php

Find this code:
Code: [Select]
function ur_show_rating_stars() {
  $user_id = osc_item_user_id();

Change it to:
Code: [Select]
function ur_show_rating_stars($user_id = '') {
  if($user_id <= 0) { $user_id = osc_item_user_id(); }
  if($user_id <= 0) { $user_id = osc_premium_user_id(); }

You can now define ID of user directly in function as parameter.
Title: Re: Reporting bug with user rating on premium
Post by: slicer on February 15, 2018, 02:10:06 PM
YESS like a charm!