hello
I was thinking, as a tempary solution to allow just the author to upload pictures to the new category he has made, is it possible to alter the upload button to just allow the author to upload from the new category page.
To help with this I have changed this...
in addcat.php added new entry to database called cat_author. This will contain the login name of the member who created the database. (needs to enter cat_author the categories database)
$sql = "INSERT INTO gallery_categories (
cat_id,
cat_name,
cat_description,
cat_parent_id,
cat_author , //****new
cat_hits,
cat_order,
auth_viewcat,
auth_viewimage,
auth_download,
auth_upload,
auth_directupload,
auth_vote,
auth_sendpostcard,
auth_readcomment,
auth_postcomment
)
VALUES
(
'$new_cat_id',
'$new_cat_name',
'$new_cat_description',
'$cat_parent_id',
'$user_name', //****new
'$cat_hits',
'$new_cat_order',
'$auth_viewcat',
'$auth_viewimage',
'$auth_download',
'$auth_upload',
'$auth_directupload',
'$auth_vote',
'$auth_sendpostcard',
'$auth_readcomment',
'$auth_postcomment'
)";
Now all that is need is a small script to just allow the user that is logged in, to match the name in the database (cat_author) for the upload button to appear. If another member visits the page, the upload button is greyed out?
I tried this so that if it worked I could have entered into the upload_button script, but it didn't work;
if($cat_cache['cat_author']== "$user_name")
{
$test = "test";
}
What do you think, can this be done?
All the best
Gary