SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 25, 2012, 05:59:24 am

Login with username, password and session length
Members
Total Members: 10073
Latest: makablue
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 81
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 80
Total: 80
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
| | | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Ratings  (Read 2997 times)
marcbkk
Full Member
***
Offline Offline

Posts: 152


View Profile
« on: March 07, 2007, 10:53:39 am »

Should not be able to rate your own pictures as it is now.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #1 on: March 07, 2007, 07:01:15 pm »

It is already implemented.

Code:
//Check if they are rating their own image.
if($ID_MEMBER == $row['ID_MEMBER'])
fatal_error($txt['gallery_error_norate_own'],false);
Logged
marcbkk
Full Member
***
Offline Offline

Posts: 152


View Profile
« 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
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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:
//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);
Logged
marcbkk
Full Member
***
Offline Offline

Posts: 152


View Profile
« 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.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« 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.
Logged
marcbkk
Full Member
***
Offline Offline

Posts: 152


View Profile
« 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.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 24, 2012, 08:02:50 am]

[May 24, 2012, 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.219 seconds with 19 queries.