https://www.icyphoenix.com/viewtopic.php?f=26&t=2308 ----------------------------------- sympatico Sun 17 Jun, 2007 21:30 FAP CUSTOMIZATION - Post Images In Sub-category Only ----------------------------------- hi, i'm looking for a little modification that would allow users to post in sub-categories only in public albums. i tried setting the main category permissions to disallow posting of images and the sub categories to allow posting but that obviously does not work.... a little help would be appreciated!!! thank you ----------------------------------- Artie Mon 18 Jun, 2007 17:55 Re: Post Images In Sub-category Only ----------------------------------- I always thought that it work, but you are right it doesn't. It will remove the Upload button from the main cat page and leave it for the sub cat page, but the drop down cat list in the upload form page doesn't show either the main or subs. I'm not sure what it would take to get what you are asking. I will take a look when I get a chance, but dunno that I'll be successful. ----------------------------------- sympatico Fri 22 Jun, 2007 20:05 Re: Post Images In Sub-category Only ----------------------------------- ok great thank you for looking! it would be nice if it would be possible to have this option! ----------------------------------- Artie Sat 23 Jun, 2007 02:49 Re: Post Images In Sub-category Only ----------------------------------- I was not able to find a solution by using the setting of permissions in the ACP..... as one would prefer. But I do know a way (hardcoded) that you can prevent the upload button from displaying in [b]ALL[/b] main categories. [highlight=#FFFFAA](Notice I said ALL main categories)[/highlight] Of course the main cat will still be listed in the category drop down list of the sub-cat's upload page ....though it would not be a valid cat for uploading. If interested, let me know. ----------------------------------- offroad4fun Mon 26 Nov, 2007 22:53 Re: Post Images In Sub-category Only ----------------------------------- [quote user="Artie" post="16758"] If interested, let me know.[/quote] hello! i have the same problem -[color=#ff0000] i'm very interested in your way .[/color].. thank you greets from vienna thomas ----------------------------------- Artie Mon 26 Nov, 2007 23:54 Re: Post Images In Sub-category Only ----------------------------------- 5 months have past here and I have forgot all that I remember .... oxymoron :mrblue: I'll will have to look again when time allows.... stay tuned :wink: ----------------------------------- offroad4fun Tue 27 Nov, 2007 10:01 Re: Post Images In Sub-category Only ----------------------------------- [quote user="Artie" post="21833"]I'll will have to look again when time allows.... stay tuned :wink:[/quote] thx thomas ----------------------------------- Artie Wed 28 Nov, 2007 02:40 Re: Post Images In Sub-category Only ----------------------------------- This code will remove the Upload button from all main categories .... Public and Personal OPEN [b]album_cat.php[/b] FIND [codeblock]$upload_full_link = '' . $lang['Upload_Pic'] . '';[/codeblock] AFTER ADD [codeblock]$upload_full_link = ($thiscat['cat_parent']== 0) ? '' : $upload_full_link;[/codeblock] [hr][hr] And this code will give an error message if user attempts an upload to a main category from the upload page drop down list. OPEN [b]album_upload.php[/b] FIND [codeblock]if (empty($thiscat)) { message_die(GENERAL_ERROR, $lang['Category_not_exist']); }[/codeblock] AFTER ADD [codeblock]if ($thiscat['cat_parent'] == 0) { message_die(GENERAL_ERROR, 'Uploads not allowed in the main category
Please select a sub-category and try again'); }[/codeblock] ----------------------------------- offroad4fun Wed 28 Nov, 2007 09:23 Re: Post Images In Sub-category Only ----------------------------------- thank you - i will try it this evening an will give you a feedback! thx thomas ----------------------------------- offroad4fun Wed 28 Nov, 2007 23:19 Re: Post Images In Sub-category Only ----------------------------------- thx it works great greets from vienna thomas ----------------------------------- offroad4fun Sun 02 Dec, 2007 14:19 Re: Post Images In Sub-category Only ----------------------------------- hello again .... [quote]And this code will give an error message if user attempts an upload to a main category from the upload page drop down list. OPEN album_upload.php FIND Code: [Hide] [Select] Code: [Show] if (empty($thiscat)) { message_die(GENERAL_ERROR, $lang['Category_not_exist']); } AFTER ADD Code: [Hide] [Select] Code: [Show] if ($thiscat['cat_parent'] == 0) { message_die(GENERAL_ERROR, 'Uploads not allowed in the main category
Please select a sub-category and try again'); }[/quote] this also disables that u can upload a picture in your personal album ... -> so i removed this code-part again ... greets thomas