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 Modifications / Modifikationen
»
Requests for paid modifications / Jobbörse
»
Comments before upload
« previous
next »
Print
Pages: [
1
]
Author
Topic: Comments before upload (Read 6079 times)
0 Members and 1 Guest are viewing this topic.
riansyah
Pre-Newbie
Posts: 4
Comments before upload
«
on:
September 10, 2008, 05:50:29 AM »
Hello
I was just wondering if it would be possible to create the following:
a new user should rate and comment 2 or more of photos first before he is able to upload own pictures. Expectation on this is to keep out users who only want to show and are not interested in community. I want them to think about it before they sign in and would like to explain it before registration.
Does anyone have make how to manage this?
Thanks in advance!
Logged
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: Comments before upload
«
Reply #1 on:
September 10, 2008, 06:09:02 AM »
Try this:
in member.php find:
if (
$action
==
"uploadform"
) {
if (
$cat_id
!=
0
&& (!isset(
$cat_cache
[
$cat_id
]) || !
check_permission
(
"auth_upload"
,
$cat_id
))) {
show_error_page
(
$lang
[
'no_permission'
]);
exit;
}
Insert below:
$min_num
=
2
;
//minimum number of comments
$sql
=
"SELECT COUNT(comment_id) as num
FROM "
.
COMMENTS_TABLE
.
"
WHERE user_id = "
.
$user_info
[
'user_id'
];
$result
=
$site_db
->
query_firstrow
(
$sql
);
if ((int)
$result
[
'num'
] <
$min_num
)
{
// show_error_page($lang['no_permission']);
show_error_page
(
"You must post at least "
. (
$min_num
-
$result
[
'num'
]) .
" more comment(s) before you may upload."
);
exit;
}
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)
riansyah
Pre-Newbie
Posts: 4
Re: Comments before upload
«
Reply #2 on:
September 16, 2008, 08:29:48 PM »
thanks for V@no,
It's work..
I want ask again, can we limit the comment, i mean in one foto user only can give one comment and the image owner cannot comment his foto?
Regards,
riansyah
Logged
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: Comments before upload
«
Reply #3 on:
September 16, 2008, 08:42:49 PM »
Please start a new topic if you have more questions not related to "Comments before upload" topic
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)
Print
Pages: [
1
]
« previous
next »
4images Forum & Community
»
4images Modifications / Modifikationen
»
Requests for paid modifications / Jobbörse
»
Comments before upload