4images Forum & Community
The forum for all 4images gallery administrators
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
[2023-01-23] 4images 1.10 released
Home
Help
Search
Login
Register
4images Forum & Community
»
4images Issues / Ausgaben
»
Discussion & Troubleshooting
(Moderator:
Acidgod
) »
How I can disable the function to the users don't vote in own photo?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How I can disable the function to the users don't vote in own photo? (Read 3701 times)
0 Members and 1 Guest are viewing this topic.
fermachado
Jr. Member
Posts: 92
How I can disable the function to the users don't vote in own photo?
«
on:
August 25, 2009, 01:13:14 AM »
Hi,
How I can disable the function to the users don't vote in own photo?
Thanks for your help
Logged
www.globalfoto.net
Sintra - Portugal
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Global Moderator
4images Guru
Posts: 17.849
mmm PHP...
Re: How I can disable the function to the users don't vote in own photo?
«
Reply #1 on:
August 25, 2009, 03:02:01 AM »
In includes/functions.php find two times:
if (
check_permission
(
"auth_vote"
,
$image_row
[
'cat_id'
])) {
Replace both with:
if (
check_permission
(
"auth_vote"
,
$image_row
[
'cat_id'
]) && (
$user_info
[
'user_level'
] ==
GUEST
|| (
$user_info
[
'user_level'
] !=
GUEST
&&
$user_info
[
'user_id'
] !=
$image_row
[
'user_id'
]))) {
Then find:
function
update_image_rating
(
$image_id
,
$rating
) {
Insert below:
global
$user_info
;
not tested
P.S. since there is no way of knowing who is the owner of an image when uploaded by guests, guests owners will be able vote for their own images
Logged
Your first three "must do" before you ask a question:
Forum rules
FAQ
Error messages
Bug Fixes & Patches
Search
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer.
(
forum rule #6
)
Extension for Firefox/Thunderbird:
Master Password+
Back/Forward History Tweaks (restartless)
Cookies Manager+
Fit Images (restartless for Thunderbird)
fermachado
Jr. Member
Posts: 92
Re: How I can disable the function to the users don't vote in own photo?
«
Reply #2 on:
August 25, 2009, 02:50:08 PM »
Hi Vano,
Thanks a lot for your great help.
Don't problem with the uploads from guest's, only the resgistered users can upload to my site.
Obrigado
Logged
www.globalfoto.net
Sintra - Portugal
Print
Pages: [
1
]
« previous
next »
4images Forum & Community
»
4images Issues / Ausgaben
»
Discussion & Troubleshooting
(Moderator:
Acidgod
) »
How I can disable the function to the users don't vote in own photo?