Staff Rates

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
hollandsedrop
Posts: 90
Joined: Tue Dec 30, 2008 11:29 am

Staff Rates

Post by hollandsedrop »

Staff his/her Rates display on main staff page.

How can we do?
MPH2008
Posts: 33
Joined: Thu Sep 04, 2008 12:58 pm

Post by MPH2008 »

You are wanting % of staff answers/completed tasks?
hollandsedrop
Posts: 90
Joined: Tue Dec 30, 2008 11:29 am

Post by hollandsedrop »

MPH2008 wrote:You are wanting % of staff answers/completed tasks?
No. Only rating display! (ex: 5 star)
MPH2008
Posts: 33
Joined: Thu Sep 04, 2008 12:58 pm

Post by MPH2008 »

I'm installing/updating our Hesk to the new version this week, so i'll look into what you are wanting to achieve and see if I can help out :)
hollandsedrop
Posts: 90
Joined: Tue Dec 30, 2008 11:29 am

Post by hollandsedrop »

MPH2008 wrote:I'm installing/updating our Hesk to the new version this week, so i'll look into what you are wanting to achieve and see if I can help out :)
Is there any progress on this issue?
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can add something like this in the admin_main.php file:

Code: Select all

<p>Your rating: <?php
	$myuser['rating'] = $_SESSION['rating'];
	$alt = $myuser['rating'] ? sprintf($hesklang['rated'], sprintf("%01.1f", $myuser['rating']), ($myuser['ratingneg']+$myuser['ratingpos'])) : $hesklang['not_rated'];
	echo '<img src="../img/star_'.(hesk_round_to_half($myuser['rating'])*10).'.png" width="85" height="16" alt="'.$alt.'" title="'.$alt.'" border="0" style="vertical-align:text-bottom" />';
?></p>
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
hollandsedrop
Posts: 90
Joined: Tue Dec 30, 2008 11:29 am

Post by hollandsedrop »

Klemen wrote:You can add something like this in the admin_main.php file:

Code: Select all

<p>Your rating: <?php
	$myuser['rating'] = $_SESSION['rating'];
	$alt = $myuser['rating'] ? sprintf($hesklang['rated'], sprintf("%01.1f", $myuser['rating']), ($myuser['ratingneg']+$myuser['ratingpos'])) : $hesklang['not_rated'];
	echo '<img src="../img/star_'.(hesk_round_to_half($myuser['rating'])*10).'.png" width="85" height="16" alt="'.$alt.'" title="'.$alt.'" border="0" style="vertical-align:text-bottom" />';
?></p>
Perfect. Thanks.
MPH2008
Posts: 33
Joined: Thu Sep 04, 2008 12:58 pm

Post by MPH2008 »

hollandsedrop wrote:
MPH2008 wrote:I'm installing/updating our Hesk to the new version this week, so i'll look into what you are wanting to achieve and see if I can help out :)
Is there any progress on this issue?
Unfortunately i've only just managed to get around to installing it as we speak now. I'll have a poke around on our development/test server and see what can be achieved....
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

A late reply to an old'ish post I know but I have also just got around to installing this fine hack. All working fine so I also decided to add it to the: Profile section (/admin/profile.php) - this shows the stars just as they should be but when l I hover my mouse over it reports: User rated 5.0/5.0 (0 votes) when it should be: User rated 5.0/5.0 (1 votes).

As you can see, I have one vote but it states 0... This is only on the profile page too? Any help with this would be super ;)

Cheers

**EDIT**
Just a quick edit, I am using HESK 2.0 for the time being :P
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Try changing

Code: Select all

$myuser['ratingneg']+$myuser['ratingpos']
to

Code: Select all

$_SESSION['ratingneg']+$_SESSION['ratingpos']
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

Cool that fixed it :) Thank you so much for your quick reply and top-notch support ;)

Just a quick question, why do I need different code for both the profile.php and manage_users.php files? -- I would have thought that it would have worked the same...
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Because one has $myuser variables registered and the other one not. The version with "$_SESSION" should work fine on both.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

Thanks Klemen, thats sorted it :)
bibinthilakan
Posts: 1
Joined: Mon Apr 02, 2018 6:22 am

Re: Staff Rates

Post by bibinthilakan »

Hi , is there is any option where we can integrate end user rating to " staff " (who made IT support recently ) ?
rating category - very good, good , average , not good
Klemen
Site Admin
Posts: 10135
Joined: Fri Feb 11, 2005 4:04 pm

Re: Staff Rates

Post by Klemen »

There is no such function built-in, you would have to code it yourself.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply