php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#237807 - 02/24/03 01:58 AM [6.2] Admin Selectable Ratings 1.0
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I wrote this for a client this weekend, thought I'd share here, incase anyone else had a use for it.<br /><br />Mod Name: Admin Selectable Ratings 1.0<br /><br />Description: This allows the Admin to assign a custom rating image.<br />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.<br />Image Examples:<br />[]http://www.gapofrohan.com/forum/images/ratingimages/B1red4gold.gif[/]<br />[]http://www.gapofrohan.com/forum/images/ratingimages/B4red1gold.gif[/]<br />[]http://www.gapofrohan.com/forum/images/ratingimages/C2blue3red.gif[/]<br />[]http://www.gapofrohan.com/forum/images/ratingimages/D3green2blue.gif[/]<br /><br /><br />Author: JoshPet www.joshuapettit.com<br />        For discussion and bug reports go to www.threadsdev.com<br /><br />Credits: Gardener for help sorting the list of images.<br />      Commissioned by and demo at: www.gapofrohan.com<br /><br />Date: 2/24/03<br /><br />Working Under: 6.2<br /><br />Files Modified: /admin/showoneuser.php, /admin/dochangeuser.php, showflat.php, <br />showthreaded.php, showprofile.php<br /><br />New Files: included images, uploaded to /images/ratingimages<br /><br />Database Modifications: New field "U_RatingImage" added to the Users table.<br /><br />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.<br />


Attachments
70611-AdminSelectableRatings1.0.zip (92 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237808 - 02/24/03 03:19 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
Will this work with custom titles? and the profile hack?

Top
#237809 - 02/24/03 09:09 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Kelly]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yup. This only replaces the ratings. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237810 - 02/24/03 09:10 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Correction.... when you say "profile hack" if you mean status bars it won't. This uses the ratings as does the profile status bar.<br /><br />This could be adapted to work with it though. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237811 - 02/24/03 07:05 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
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.

Top
#237812 - 02/24/03 09:32 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Kelly]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I'll ahve to tweak this a bit then... to use this and profile status bars.<br /><br />It is doable.<br /><br />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.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237813 - 02/25/03 02:51 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
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. <img src="/forum/images/graemlins/smile.gif" alt="" /> I have a hard time keeping up with all the great stuff that keeps showing up!!!<br /><br />Thanks again for all the hard work.

Top
#237814 - 02/25/03 02:54 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Kelly]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
he he<br /><br />Classic has been around for a while, as has UBBDev. So we have alot to live up to, but we are growing fast here. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237815 - 04/12/03 12:47 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
jluerken Offline
Member

Registered: 08/27/02
Posts: 233
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? <br /> <br />I want to use it the following way: <br /> <br />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.


Edited by jluerken (04/12/03 12:51 PM)
_________________________
Ciao jluerken
--------------------
www.uce-clan.de www.clanforums.com

[]http://www.uce-clan.de/images/uce_banner2.gif[/]

Top
#237816 - 04/12/03 12:52 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: edr]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
If your Moderators are allowed to edit the users, then they'll have access to this like anything else.<br /><br />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.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237817 - 04/12/03 01:00 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
jluerken Offline
Member

Registered: 08/27/02
Posts: 233
I know Josh, I know.<br /><br />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 <img src="/forum/images/graemlins/laugh.gif" alt="" />
_________________________
Ciao jluerken
--------------------
www.uce-clan.de www.clanforums.com

[]http://www.uce-clan.de/images/uce_banner2.gif[/]

Top
#237818 - 04/12/03 01:14 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: edr]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Oh. I see.<br /><br />If you place the code inside an if statment like this, it'll only appear if they are an Admin:<br /><br />if ($user['U_Status'] == "Administrator") {<br /> // Put the code inside here<br />} // close the if statement<br /><br /><br />Then anything inside only shows to admins.<br />That might work. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237819 - 04/13/03 06:00 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
jluerken Offline
Member

Registered: 08/27/02
Posts: 233
Hi Josh, <br /> <br />can I have this more detailed? <br /> <br />Which files to change and how?


Edited by jluerken (04/14/03 02:11 AM)
_________________________
Ciao jluerken
--------------------
www.uce-clan.de www.clanforums.com

[]http://www.uce-clan.de/images/uce_banner2.gif[/]

Top
#237820 - 04/14/03 06:47 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: edr]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Attached I've outlined the changes I think you'd need to make. Untested.


Attachments
75708-adminsonly.txt (76 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237821 - 04/16/03 05:21 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
jluerken Offline
Member

Registered: 08/27/02
Posts: 233
[]JoshPet said:<br />Attached I've outlined the changes I think you'd need to make. Untested. [/]<br /><br />Thanks, I think I will give it a try...
_________________________
Ciao jluerken
--------------------
www.uce-clan.de www.clanforums.com

[]http://www.uce-clan.de/images/uce_banner2.gif[/]

Top
#237822 - 07/02/03 12:42 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1954
Loc: Sweden, Uppsala
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.<br /><br />Now, I don't think I'll have a problem making it do what I want, but maybe others will need the help.
_________________________
/Gardener | Complete list of my mods

Top
#237823 - 07/02/03 02:31 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: c0bra]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
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. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237824 - 07/02/03 04:16 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
Gardener Offline
Addict

Registered: 05/11/99
Posts: 1954
Loc: Sweden, Uppsala
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. =]<br /><br />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.
_________________________
/Gardener | Complete list of my mods

Top
#237825 - 09/06/03 02:36 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: c0bra]
agate Offline
Newbie

Registered: 06/29/02
Posts: 19
Hi JoshPet, <br />Could you provide this mod for V6.3?<br /><br />And don't replaced the rating one?

Top
#237826 - 09/06/03 02:54 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: ]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Should work fine for 6.3. <img src="/forum/images/graemlins/smile.gif" alt="" /> We are using it here for our Team UBBDev haxxor images. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237827 - 09/06/03 07:17 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
agate Offline
Newbie

Registered: 06/29/02
Posts: 19
Hi JoshPet,<br />Gardener said this one replaced the ratings mod from user right?<br /><br />Could you provide the mod which keep both?<br />

Top
#237828 - 09/06/03 09:19 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: ]
agate Offline
Newbie

Registered: 06/29/02
Posts: 19
I skipped it, Thanks for the help!

Top
#237829 - 09/30/03 12:42 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
BWilliams_dup1 Offline
Member

Registered: 03/09/03
Posts: 171
Loc: Southern California
Josh,<br /><br />Is it possible to run a query to default EVERYONE back to a zero status?<br /><br />Thanks,<br /><br />BWilliams

Top
#237830 - 09/30/03 01:18 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: vajraman]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
This should work....<br /><br />UPDATE w3t_Users<br />SET U_RatingImage = ''<br /><br />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237831 - 09/30/03 12:59 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
BWilliams_dup1 Offline
Member

Registered: 03/09/03
Posts: 171
Loc: Southern California
[]JoshPet said:<br />This should work....<br /><br />UPDATE w3t_Users<br />SET U_RatingImage = ''<br /><br /> [/]<br />Worked PERFECTLY, thanks <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br /><br />Now, how can I add the rating to show on the showmembers.php page ?

Top
#237832 - 10/03/03 11:13 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: edr]
salim Offline
Member

Registered: 02/08/03
Posts: 200
Loc: Muscat, Oman
josh,<br /><br />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
_________________________
This is where it all takes place!
[]http://www.omanforum.com/threads/uploads/3408-signeo.JPG[/]

Top
#237833 - 10/03/03 12:18 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: me_oh_my]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Admin -> Edit Config Settings -> "Do you want to enable the User Rating System?" = "No"<br /><br /><img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237834 - 10/04/03 01:34 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
salim Offline
Member

Registered: 02/08/03
Posts: 200
Loc: Muscat, Oman
LOL, thanks dude, maybe I should keep my mouth shut, to avoid the embarresment <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
This is where it all takes place!
[]http://www.omanforum.com/threads/uploads/3408-signeo.JPG[/]

Top
#237835 - 10/08/03 10:10 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: me_oh_my]
DLWebmaestro Offline
Member

Registered: 08/08/00
Posts: 1753
Loc: California, MD
Instructions updated for 6.4


Attachments
96553-AdminSelectableRatings2_0.txt (44 downloads)

_________________________
Webmaster
Drumlines.org

Drumlines.org UBBThreads

Top
#237836 - 10/27/03 11:36 AM Re: [6.2] Admin Selectable Ratings 1.0 [Re: eslmix]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2570
Loc: England
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....)

Top
#237837 - 01/21/04 01:16 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Gorlum]
harsh Offline
Newbie

Registered: 10/02/03
Posts: 12
jsut got an error with this one. on showflat.php got a parse error on line 1007<br /><br /> // Now we can show the post<br /> $postrow[$i]['Number'] = $Number;<br /> } <-- this is line 1007<br /> $postrowsize = $i;<br /><br /> $dbh -> finish_sth($sth);<br /><br />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

Top
#237838 - 01/21/04 01:37 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: irnet]
harsh Offline
Newbie

Registered: 10/02/03
Posts: 12
o i am using 6.2.3

Top
#237839 - 01/21/04 10:20 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: irnet]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
A parse error usually means that you've missed something. Usually it's a { or } missing somewhere.<br /><br />Double check that you copied and pasted everthing needed and didn't miss any lines.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237840 - 02/11/04 05:03 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Josh it says to relace this line<br />
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 />
<br /><br />when mine actually looks like this<br />
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 />   
<br /><br /><br />and I am also getting this now<br /><br />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 <br />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
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#237841 - 02/11/04 05:11 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: barbiro]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
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 <br /> <br />t1.B_ParentUser <br /> <br />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. <br /> <br />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


Edited by ChAoS (02/11/04 05:36 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#237842 - 02/11/04 06:32 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yes, this one does. The latest version (the 6.4 version) allows you to have either.<br /><br />http://www.ubbdev.com/forum/showflat.php/Number/104956
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#237843 - 02/13/04 04:16 PM Re: [6.2] Admin Selectable Ratings 1.0 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
<img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> I guess I am going to have to upgrade sooner than I planned<br /><br />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*
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
Page 1 of 2 1 2 >