Advertisement:

Author Topic: CERTIFIED USER OPTION [Based on plugin RATING]  (Read 2106 times)

ezybusy

  • Full Member
  • ***
  • Posts: 193
CERTIFIED USER OPTION [Based on plugin RATING]
« on: August 15, 2016, 02:55:16 am »
Hi everyone,
I wasn't able to make user-verification plugin work on my website, so i have done a very simple modification to the plugin Rating and added an option Certified user.

In fact when using the plugin user-verification, only the admin has the mighty power to set a user as certified. And i thought that's not best. To me members/users of your website should be the ones to recognize a particular seller as verified/certified.

So i decided to apply the following approach:
- When a seller gets 10 ratings/votes then the rating results change to Certified user. So in that way "certified user recognition" is granted by buyers and other sellers, not only by the site admin. Fair enough.

How to do it:

1 - Just download the modified plugin attached, and follow the normal installation as describe by the author (OSCLASS). And that is it.
The voting will just work fine till a user hits 10 votes. Then the text Certified user will be attached to his name on all places where the voting results is set to be displayed.

2 - If you want to do it manually, then get the original plugin at https://market.osclass.org/plugins/reviews-ratings/rating_35 and add the following code:
in the file view_votes_user.php from the plugin folder
replace:
Code: [Select]
<div class="votes_results">
                <?php
                    $avg_vote 
$vote['vote'];
                    if(
$avg_vote==5) {
                        
$tooltip  __('Essential''voting');
                    } else if(
$avg_vote>=&& $avg_vote<5) {
                        
$tooltip __('Very interesting''voting');
                    } else if(
$avg_vote>=&& $avg_vote<4) {
                        
$tooltip __('Interesting''voting');
                    } else if(
$avg_vote>=&& $avg_vote<3) {
                        
$tooltip __('Uninteresting''voting');
                    } else if(
$avg_vote>=&& $avg_vote<2) {
                        
$tooltip __('Without interest''voting');
                    } else {
                        
$tooltip __('Without information''voting');
                    }
                
?>

                <img title="<?php echo $tooltip?>" src="<?php voting_star(1$avg_vote); ?>">
                <img title="<?php echo $tooltip?>" src="<?php voting_star(2$avg_vote); ?>">
                <img title="<?php echo $tooltip?>" src="<?php voting_star(3$avg_vote); ?>">
                <img title="<?php echo $tooltip?>" src="<?php voting_star(4$avg_vote); ?>">
                <img title="<?php echo $tooltip?>"  src="<?php voting_star(5$avg_vote); ?>">
                <span style="float:left; padding-right: 4px; padding-left: 4px;"><?php echo $vote['total'];?> <?php _e('votes''voting');?></span>
            </div>
        </div>
with:
Code: [Select]
<?php if ( $vote['total']>) { ?>
<div style="display:inline-block; color:#f00; font-weight:600;">
<?php echo '&#38;#10004;Certified user';?>
</div>
<?php } else { ?>
            <div class="votes_results">
                <?php
                    $avg_vote 
$vote['vote'];
                    if(
$avg_vote==5) {
                        
$tooltip  __('Essential''voting');
                    } else if(
$avg_vote>=&& $avg_vote<5) {
                        
$tooltip __('Very interesting''voting');
                    } else if(
$avg_vote>=&& $avg_vote<4) {
                        
$tooltip __('Interesting''voting');
                    } else if(
$avg_vote>=&& $avg_vote<3) {
                        
$tooltip __('Uninteresting''voting');
                    } else if(
$avg_vote>=&& $avg_vote<2) {
                        
$tooltip __('Without interest''voting');
                    } else {
                        
$tooltip __('Without information''voting');
                    }
                
?>

                <img title="<?php echo $tooltip?>" src="<?php voting_star(1$avg_vote); ?>">
                <img title="<?php echo $tooltip?>" src="<?php voting_star(2$avg_vote); ?>">
                <img title="<?php echo $tooltip?>" src="<?php voting_star(3$avg_vote); ?>">
                <img title="<?php echo $tooltip?>" src="<?php voting_star(4$avg_vote); ?>">
                <img title="<?php echo $tooltip?>"  src="<?php voting_star(5$avg_vote); ?>">
                <span style="float:left; padding-right: 4px; padding-left: 4px;"><?php echo $vote['total'];?> <?php _e('votes''voting');?></span>
            </div>
<?php }; ?>
        </div>

if you want to change the number of votes/rates then change the 9 at line 29 with the number you like.
Code: [Select]
<?php if ( $vote['total']>) { ?> <!-- change the 9 the the number you want -->
NB: The same logic can be apply item rating if you want to use it as you recognition criteria instead of user rating.

The first image is a capture of item-page. The second one is a capture of User-public-profile page. On both pages you can clearly see the text Certified User

Lastly don't forget that the default behaviour of the orignal plugin is set to allow only registered and logged in users to vote for a user (that's how it work on my site, I don't know if it will be the same for yours too).

I am sure there could be a better and cleaner way to achieve this, but that's how far my beginner knowledge allowed me to do.
« Last Edit: August 15, 2016, 03:46:02 am by ezybusy »

ezybusy

  • Full Member
  • ***
  • Posts: 193
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #1 on: August 15, 2016, 03:54:18 am »
I think the greatest advantage of this modification is that, instead of using 2 plugins (user-verification plugin and rating plugin), you use only one (rating plugin) to achieve the whole thing. :D

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #2 on: August 22, 2016, 12:39:27 am »
Interesting change ezybusy.
I was thinking about a way to get 'verified users' the other day and my thoughts were towards a link with PayPal. Using Payments plugin for example, someone paying a dollar cent for example to website would be considered a verified user since all information directly linked to 'user' is shared through the use of PayPal and in addition the site owner is paid a dollarcent. 8)

Regards,
Eric

ezybusy

  • Full Member
  • ***
  • Posts: 193
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #3 on: August 22, 2016, 01:43:05 am »
Thanks SMARTEY,
i believe your approach is also a perfect one. I am sure it will come to live as a plugin.
I would be glad to be informed when such plugin is ready. ;) ;)

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #4 on: August 22, 2016, 02:22:03 am »
hehe we'll see.... ;)

xop32

  • Jr. Member
  • **
  • Posts: 77
  • trend following
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #5 on: September 04, 2016, 05:20:25 am »
I was thinking of user verification on one of my sites

I was thinking of making users take a image of themselves holding there username and the date written on a piece of paper

this image is uploaded to users profile and the admin verifies all the users to confirm the images match the user / date etc and then sets the user as verified status

this was for a website that was listing prfoiles of people so it was easy for the admin to match the images on a advert to the users verification image

and of course on a website such as this users would benefit from being verified so would go threw the process

when the user is verified, they can have  the option to allow other users to see there verication image, if they opt out it is not shown

after a user has been verified they get verified status on the website, in my case a big green V for verified

 

campusmart

  • Newbie
  • *
  • Posts: 34
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #6 on: September 22, 2016, 11:18:59 am »
Nice one, but I was thinking... is it possible to add icon to the "certified user" in word?  just to make it spicy. what y'all think?

ezybusy

  • Full Member
  • ***
  • Posts: 193
Re: CERTIFIED USER OPTION [Based on plugin RATING]
« Reply #7 on: September 23, 2016, 12:12:20 pm »
Some little css trick can take care of the icone.