Force Users To Upload Photos To Categories »  Show posts from    to     

Icy Phoenix


Old Support Topics - Force Users To Upload Photos To Categories



s00th [ Thu 07 Jan, 2010 15:23 ]
Post subject: Force Users To Upload Photos To Categories
I want to force users to use album categories. Does anyone know how to remove the "Personal Gallery of..." option in the dropdown box on the upload pic page (album_upload.php) and move pic page(album_modcp.php)?? I haven't been able to figure this part out.

So far I've disabled the upload button unless the user is in a category.....in includes/album_mod/album_personal.php replaced

--------------------------------------------------

if(((album_check_permission($auth_data, ALBUM_AUTH_UPLOAD) == true) && ($enable_picture_upload_switch == false)) || ($no_personal_gallery = false))
{
$template->assign_block_vars('enable_picture_upload_pg', array());
}

---------------------------------------------------
with this.....
---------------------------------------------------

if(((album_check_permission($auth_data, ALBUM_AUTH_UPLOAD) == true) && ($enable_picture_upload_switch == false)) || ($no_personal_gallery = false))
{
if(isset($_POST['cat_id']))
{
$template->assign_block_vars('enable_picture_upload_pg', array());
}
}


-----------------------------------------------------------
:::edit::

to remove the "Personal Gallery of" option from the move and upload pages.... edit includes/album_mod/album_hierarchy_functions.php
and in functions album_get_tree_option AND album_get_simple_tree_option change....

if ($cat_id != ALBUM_ROOT_CATEGORY)

to.....


if (($cat_id != ALBUM_ROOT_CATEGORY) && (strstr((strtoupper(album_get_object_lang($cat_id, 'name'))),'PERSONAL GALLERY OF') != true))

-----------------------------
::edit:::
-----------------------------

found a problem. the code works but users can't create categories in the main folder or move categories to the main folder since the "Personal gallery of" option is not listed. the following changes will put this option back on the category create/edit page......

-----------------------------------------------------------------
create a new function in includes/album_mod/album_hierarchy_functions.php called album_get_tree_option_main .... with the original album_get_tree_option function code (just copy album_get_tree_option function from an original album_hierarchy_functions.php file and rename the function name)
-----------------------------------------------------------------
edit .......... album_personal_cat_admin.php to point to the function by replacing.....

album_get_tree_option with album_get_tree_option_main


------------------------------------------

Ok.....so this post is a mess but maybe someone will benefit from it


DWho [ Sat 09 Jan, 2010 17:17 ]
Post subject: Re: [SOLVED] Force Users To Upload Photos To Categories
Thanks for explaining how to do...



s00th [ Mon 11 Jan, 2010 08:20 ]
Post subject: Re: Force Users To Upload Photos To Categories
should also mention to get the "new folder" button to appear in the root of the gallery.....

in includes/album_mod/album_personal.php find

if( (album_check_permission($auth_data, ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES) == true) && ((($is_root_cat) && ($row['count'] > 0)) || (!$is_root_cat)))


..................AND REPLACE THE LINE WITH...............


if( (album_check_permission($auth_data, ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES) == true) && ((($is_root_cat) && ($row['count'] >= 0)) || (!$is_root_cat)))



info from ... http://www.icyphoenix.com/viewtopic...ghlight=#p17863


Mighty Gorgon [ Sun 17 Jan, 2010 13:20 ]
Post subject: Re: [SOLVED] Force Users To Upload Photos To Categories
Thanks for sharing, I should have fixed the last thing you posted.




Powered by Icy Phoenix