Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12149
Latest: MarcoLehrer
New This Month: 19
New This Week: 9
New Today: 2
Stats
Total Posts: 38969
Total Topics: 6858
Most Online Today: 98
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 38
Total: 38

Author Topic: Ratings  (Read 6124 times)

0 Members and 1 Guest are viewing this topic.

Offline marcbkk

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Ratings
« on: March 07, 2007, 10:53:39 am »
Should not be able to rate your own pictures as it is now.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14511
    • View Profile
Re: Ratings
« Reply #1 on: March 07, 2007, 07:01:15 pm »
It is already implemented.

Code: [Select]
//Check if they are rating their own image.
if($ID_MEMBER == $row['ID_MEMBER'])
fatal_error($txt['gallery_error_norate_own'],false);
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline marcbkk

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Ratings
« Reply #2 on: March 07, 2007, 07:49:19 pm »
Great, where to plug that code in?

Also, did you see my other post regarding counting one's viewing of one's own photos as being a view hit count?

http://www.smfhacks.com/index.php/topic,600.0.html

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14511
    • View Profile
Re: Ratings
« Reply #3 on: March 07, 2007, 07:50:45 pm »
Yes I saw the view image count setting suggestion as well.

Gallery.php
function RatePicture
Code: [Select]
//Get the Picture owner
    $dbresult = db_query("SELECT ID_MEMBER FROM {$db_prefix}gallery_pic WHERE ID_PICTURE = $id LIMIT 1", __FILE__, __LINE__);
    $row = mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);
//Check if they are rating their own image.
if($ID_MEMBER == $row['ID_MEMBER'])
fatal_error($txt['gallery_error_norate_own'],false);
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline marcbkk

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Ratings
« Reply #4 on: March 07, 2007, 07:58:22 pm »
Yes, I see the code is already in the Gallery.PHP file within the SMFGalleryupgrade11.1.2.1.zip file.

I am allowed to rate my own photos still though becuase I am the forum admin?

I haven't checked, but I guess other regular forum users would not have that option.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14511
    • View Profile
Re: Ratings
« Reply #5 on: March 07, 2007, 08:00:18 pm »
I tried on my test site and can't rate your own items as a user or admin.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline marcbkk

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Ratings
« Reply #6 on: March 08, 2007, 07:22:56 pm »
Good and you are right. Actually the rating fuction still appears on your own pictures, but when you click on it you get an error message saying you can't reat your own picture. I hadn't actually tried to rate a picture of my own before becuase I did not want a false rating to show up. I just had assumed if the rating option is there then it should work. Maybe to make it a bit more neat and clean it is worth removing the rating option from even appearing on one's own picture posts.

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
4209 Views
Last post February 06, 2008, 05:29:29 pm
by SMFHacks
5 Replies
6418 Views
Last post August 16, 2008, 12:59:46 pm
by SMFHacks
1 Replies
2200 Views
Last post July 05, 2010, 04:03:56 pm
by SMFHacks
4 Replies
2130 Views
Last post June 13, 2012, 12:25:24 pm
by FrizzleFried
19 Replies
17383 Views
Last post August 31, 2016, 01:24:38 am
by oskaaay

+- Recent Topics

Paypal has stopped interacting with my site since 06/29/18 by diegolyanky
July 19, 2018, 08:52:08 am

Pretty Urls SEO Pro Released by SMFHacks
July 15, 2018, 04:14:19 pm

Display next image with scrolling down instead on clicking next page by SMFHacks
July 15, 2018, 02:34:53 pm

Store translated into spanish by SMFHacks
July 14, 2018, 09:41:52 pm

prettyurls - TroubleShooting.wiki by SMFHacks
July 13, 2018, 04:24:23 pm

prettyurls - DatabaseChanges.wiki by SMFHacks
July 13, 2018, 04:23:01 pm

prettyurls - Filters.wiki by SMFHacks
July 13, 2018, 04:22:02 pm

SQL Query Slow (Suggestions) by SMFHacks
July 09, 2018, 01:08:59 pm

How can I hide Board Categories From Showing on Homepage Just Like SMF hacks by mattizzy
June 28, 2018, 11:22:06 am

Pretty URL Topic Number by mattizzy
June 28, 2018, 11:04:20 am

Powered by EzPortal