Previous Thread
Next Thread
Print Thread
Rating: 4
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I wrote this for a client this weekend, thought I'd share here, incase anyone else had a use for it.

Mod Name: Admin Selectable Ratings 1.0

Description: This allows the Admin to assign a custom rating image.
Useful for admins who want to be the one to assign ratings, or you could use to signify the level of financial support you've received from a user. I've included a series of graphics, so you can define from 1-5 gold stars for a user, then you can begin to change the stars from gold to red. Then from red to blue. Thus it's a rating system (admin or mod controlled) that allows you to go beyond just 5 stars, similar to the ebay rating system. You can add new rating images simply by uploading them to your server, they will then be instantly available to you.
Image Examples:
[]http://www.gapofrohan.com/forum/images/ratingimages/B1red4gold.gif[/]
[]http://www.gapofrohan.com/forum/images/ratingimages/B4red1gold.gif[/]
[]http://www.gapofrohan.com/forum/images/ratingimages/C2blue3red.gif[/]
[]http://www.gapofrohan.com/forum/images/ratingimages/D3green2blue.gif[/]


Author: JoshPet www.joshuapettit.com
        For discussion and bug reports go to www.ubbdev.com

Credits: Gardener for help sorting the list of images.
      Commissioned by and demo at: www.gapofrohan.com

Date: 2/24/03

Working Under: 6.2

Files Modified: /admin/showoneuser.php, /admin/dochangeuser.php, showflat.php,
showthreaded.php, showprofile.php

New Files: included images, uploaded to /images/ratingimages

Database Modifications: New field "U_RatingImage" added to the Users table.

Notes: To use, edit the user from the admin menu, and edit their profile, you'll see a pull down box at the bottom to select their rating image. When you select an image, a preview of the image will appear for you next to the menu box.

Attached Images
70611-AdminSelectableRatings1.0.zip (0 Bytes, 101 downloads)
Sponsored Links
Joined: Jan 2002
Posts: 674
S
Junior Member
Offline
Junior Member
S
Joined: Jan 2002
Posts: 674
Will this work with custom titles? and the profile hack?

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yup. This only replaces the ratings.

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Correction.... when you say "profile hack" if you mean status bars it won't. This uses the ratings as does the profile status bar.

This could be adapted to work with it though.

Joined: Jan 2002
Posts: 674
S
Junior Member
Offline
Junior Member
S
Joined: Jan 2002
Posts: 674
Yes I am using your restrict profile mod so my users will fill in there profiles. Along with the user profile status bar. I also added the custom titles mod.. I would like to keep these and add this to go with them. The site is user supported and this would allow the ability to sell various levels of sponsorship.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I'll ahve to tweak this a bit then... to use this and profile status bars.

It is doable.

Unfortunately my list is pretty long right now... the stuff that I've been posting has been created for clients or myself. But when I get some time, I'll try to update this one to work with both.

Joined: Jan 2002
Posts: 674
S
Junior Member
Offline
Junior Member
S
Joined: Jan 2002
Posts: 674
Appreciate it... You been creating some great mods. Feel like a kid in a candy store with all these toys I got compared to the old classic. I have a hard time keeping up with all the great stuff that keeps showing up!!!

Thanks again for all the hard work.

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
he he

Classic has been around for a while, as has UBBDev. So we have alot to live up to, but we are growing fast here.

Joined: Aug 2002
Posts: 218
J
Member
Offline
Member
J
Joined: Aug 2002
Posts: 218
Hey Josh, I wanted to use this hack to give my PREMIUM users another rating image but after installing it I have seen that also moderators are allowed to change the ratingimage. Can this be turned off?

I want to use it the following way:

Rating should be still on but if an admin gives a 'premium' user a fixed ratingimage' then this should be always should independant of what others are voting on this user.

Last edited by jluerken; 04/12/2003 11:51 AM.
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If your Moderators are allowed to edit the users, then they'll have access to this like anything else.

In your config file, there's an option to allow Moderators to edit users. If you turn that off, then moderators won't be allowed to edit.

Sponsored Links
Joined: Aug 2002
Posts: 218
J
Member
Offline
Member
J
Joined: Aug 2002
Posts: 218
I know Josh, I know.

My moderators should be able to edit users but should not be able to change their rating image. If they could do every moderator can make another user a premium user and thats not what I want

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Oh. I see.

If you place the code inside an if statment like this, it'll only appear if they are an Admin:

if ($user['U_Status'] == "Administrator") {
// Put the code inside here
} // close the if statement


Then anything inside only shows to admins.
That might work.

Joined: Aug 2002
Posts: 218
J
Member
Offline
Member
J
Joined: Aug 2002
Posts: 218
Hi Josh,

can I have this more detailed?

Which files to change and how?

Last edited by jluerken; 04/14/2003 1:11 AM.
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Attached I've outlined the changes I think you'd need to make. Untested.

Attached Images
75708-adminsonly.txt (0 Bytes, 170 downloads)
Joined: Aug 2002
Posts: 218
J
Member
Offline
Member
J
Joined: Aug 2002
Posts: 218
[]JoshPet said:
Attached I've outlined the changes I think you'd need to make. Untested. [/]

Thanks, I think I will give it a try...

Joined: May 1999
Posts: 1,715
Addict
Offline
Addict
Joined: May 1999
Posts: 1,715
Why does this mod remove the user rating option when it doesn't have to as far as I can see. Now, I realize that the way it is meant to work is to let admins select the rating instead of users voting, but the mod would be more versatile if the rating option wasn't removed. There could still be information on how to remove the normal rating stuff for those who want to, but for those who want to use this to have some other type of image (informational or whatever) or who wants to have both types of ratings or those who use the profile status bar it would be nice to have the option to not remove the ratings.

Now, I don't think I'll have a problem making it do what I want, but maybe others will need the help.

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yes - good point - that's how I'm using it here. (for the haxxor logos). Removing the regular rating is just how the instructions had to be written for my client. But I should modify and update for 6.3 allowing it as an additional image.

Joined: May 1999
Posts: 1,715
Addict
Offline
Addict
Joined: May 1999
Posts: 1,715
Yeah, took me a while to find this mod since I was looking for the haxxor mod, but since this one replaced the ratings I skipped it at first. =]

Well, I've got it working at my test site now, will be going live with it as soon as I've had my graphics guy doing some graphics.

Joined: Jun 2002
Posts: 14
Newbie
Offline
Newbie
Joined: Jun 2002
Posts: 14
Hi JoshPet,
Could you provide this mod for V6.3?

And don't replaced the rating one?

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Should work fine for 6.3. We are using it here for our Team UBBDev haxxor images.

Joined: Jun 2002
Posts: 14
Newbie
Offline
Newbie
Joined: Jun 2002
Posts: 14
Hi JoshPet,
Gardener said this one replaced the ratings mod from user right?

Could you provide the mod which keep both?

Joined: Jun 2002
Posts: 14
Newbie
Offline
Newbie
Joined: Jun 2002
Posts: 14
I skipped it, Thanks for the help!

Joined: Mar 2003
Posts: 159
Member
Offline
Member
Joined: Mar 2003
Posts: 159
Josh,

Is it possible to run a query to default EVERYONE back to a zero status?

Thanks,

BWilliams

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This should work....

UPDATE w3t_Users
SET U_RatingImage = ''


Joined: Mar 2003
Posts: 159
Member
Offline
Member
Joined: Mar 2003
Posts: 159
[]JoshPet said:
This should work....

UPDATE w3t_Users
SET U_RatingImage = ''

[/]
Worked PERFECTLY, thanks


Now, how can I add the rating to show on the showmembers.php page ?

Joined: Feb 2003
Posts: 196
S
Member
Offline
Member
S
Joined: Feb 2003
Posts: 196
josh,

this is great, however i would want to disable the classic rating that comes with the software, can I do that?. So I would be the only one who gives rating to the user rather than the users themselves

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Admin -> Edit Config Settings -> "Do you want to enable the User Rating System?" = "No"


Joined: Feb 2003
Posts: 196
S
Member
Offline
Member
S
Joined: Feb 2003
Posts: 196
LOL, thanks dude, maybe I should keep my mouth shut, to avoid the embarresment

Joined: Aug 2000
Posts: 1,609
A
Addict
Offline
Addict
A
Joined: Aug 2000
Posts: 1,609
Instructions updated for 6.4

Attached Images
96553-AdminSelectableRatings2_0.txt (0 Bytes, 148 downloads)
Joined: Feb 2002
Posts: 2,286
Veteran
Offline
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks - reposted here for 6.4


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Oct 2003
Posts: 13
H
Newbie
Offline
Newbie
H
Joined: Oct 2003
Posts: 13
jsut got an error with this one. on showflat.php got a parse error on line 1007

// Now we can show the post
$postrow[$i]['Number'] = $Number;
} <-- this is line 1007
$postrowsize = $i;

$dbh -> finish_sth($sth);

what should i do. i didnt even touch that line when i edited the code. can someone help! it only happens when i click on a actual thread link: this is the code: Parse error: parse error in /usr/home/adultwebmasterhangout/ubbthreads/showflat.php on line 1007

Joined: Oct 2003
Posts: 13
H
Newbie
Offline
Newbie
H
Joined: Oct 2003
Posts: 13
o i am using 6.2.3

Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
A parse error usually means that you've missed something. Usually it's a { or } missing somewhere.

Double check that you copied and pasted everthing needed and didn't miss any lines.

Joined: Nov 2002
Posts: 554
C
Code Monkey
Offline
Code Monkey
C
Joined: Nov 2002
Posts: 554
Josh it says to relace this line
Code
  SELECT t1.B_Number,t2.U_Username,t1.B_Posted,t1.B_IP,t1.B_Subject,t1.B_Body,t1.B_File,t1.B_Status,t1.B_Approved,t2.U_Picture,t1.B_Reged,t2.U_Title,t2.U_Color,t1.B_Icon,t1.B_Poll,t1.B_Parent,t2.U_Status,t2.U_Signature,t1.B_LastEdit,t1.B_LastEditBy,t2.U_Location,t2.U_TotalPosts,t2.U_Registered,t2.U_Rating,t2.U_Rates,t2.U_RealRating,t2.U_PicWidth,t2.U_PicHeight,t2.U_Number,t1.B_FileCounter,t1.B_AnonName<br /><br />


when mine actually looks like this
Code
//     SELECT t1.B_Number,t2.U_Username,t1.B_Posted,t1.B_IP,t1.B_Subject,t1.B_Body,t1.B_File,t1.B_Status,t1.B_Approved,t2.U_Picture,t1.B_Reged,t2.U_Title,t2.U_Color,t1.B_Icon,t1.B_Poll,t1.B_Parent,t2.U_Status,t2.U_Signature,t1.B_LastEdit,t1.B_LastEditBy,t2.U_Location,t2.U_TotalPosts,t2.U_Registered,t2.U_Rating,t2.U_Rates,t2.U_RealRating,t2.U_PicWidth,t2.U_PicHeight,t2.U_Number,t1.B_FileCounter,t1.B_AnonName, [:"red"]t1.B_ParentUser[/]<br />   



and I am also getting this now

SQL ERROR: Unable to do_query: // SELECT t1.B_Number,t2.U_Username,t1.B_Posted,t1.B_IP,t1.B_Subject,t1.B_Body,t1.B_File,t1.B_Status,t1.B_Approved,t2.U_Picture,t1.B_Reged,t2.U_Title,t2.U_Color,t1.B_Icon,t1.B_Poll,t1.B_Parent,t2.U_Status,t2.U_Signature,t1.B_LastEdit,t1.B_LastEditBy,t2.U_Location,t2.U_TotalPosts,t2.U_Registered,t2.U_Rating,t2.U_Rates,t2.U_RealRating,t2.U_PicWidth,t2.U_PicHeight,t2.U_Number,t1.B_FileCounter,t1.B_AnonName,t1.B_ParentUser SELECT t1.B_Number,t2.U_Username,t1.B_Posted,t1.B_IP,t1.B_Subject,t1.B_Body,t1.B_File,t1.B_Status,t1.B_Approved,t2.U_Picture,t1.B_Reged,t2.U_Title,t2.U_Color,t1.B_Icon,t1.B_Poll,t1.B_Parent,t2.U_Status,t2.U_Signature,t1.B_LastEdit,t1.B_LastEditBy,t2.U_Location,t2.U_TotalPosts,t2.U_Registered,t2.U_RatingImage,t2.U_PicWidth,t2.U_PicHeight,t2.U_Number,t1.B_FileCounter,t1.B_AnonName,t1.B_ParentUser FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Main = 62335 AND t1.B_PosterId = t2.U_Number ORDER BY B_Number LIMIT 30
You have an error in your SQL syntax near '// SELECT t1.B_Number,t2.U_Username,t1.B_Posted,t1.B_IP,t1.B_Subject,t1.B_Bo' at line 2

Joined: Nov 2002
Posts: 554
C
Code Monkey
Offline
Code Monkey
C
Joined: Nov 2002
Posts: 554
Ok I got rid of the SQL error,apparently it did not like the way I commented out the original line and I added this to the end of your line

t1.B_ParentUser

My new question is does this hack take away the function for users to rate each other because now Everyones stars are missing except those that I have given out.

Edit-Ok I have read this thread now in its entirety and see this question was raised before by Gardener.Can some one explain to me how to get the user ratings functional with this mod? I am using 6.3 currently

Last edited by ChAoS; 02/11/2004 5:36 PM.
Joined: Nov 2001
Posts: 10,369
JoshPet Offline OP
I type Like navaho
OP Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yes, this one does. The latest version (the 6.4 version) allows you to have either.

https://www.ubbdev.com/forum/showflat.php/Number/104956

Joined: Nov 2002
Posts: 554
C
Code Monkey
Offline
Code Monkey
C
Joined: Nov 2002
Posts: 554
I guess I am going to have to upgrade sooner than I planned

FYI t1.B_ParentUser must be from a mod that I installed that added the "in reply to" function. Its not working at the moment so I assume I must have accidentily edited some of it out when installing the user ratings mod *sigh*


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,557
Posts293,856
Members13,847
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,819
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 70
Gizmo 16
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2021 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Snapshot build 20210915)
Responsive Width:

PHP: 7.3.29 Page Time: 0.027s Queries: 92 (0.011s) Memory: 0.9823 MB (Peak: 1.1836 MB) Data Comp: Zlib Server Time: 2021-12-04 08:20:07 UTC
Valid HTML 5 and Valid CSS