FAP CUSTOMIZATION - Post Images In Sub-category Only »  Show posts from    to     

Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - Post Images In Sub-category Only



sympatico [ Sun 17 Jun, 2007 21:30 ]
Post subject: 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 ]
Post subject: 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 ]
Post subject: 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 ]
Post subject: 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 ALL main categories. (Notice I said ALL main categories)
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 ]
Post subject: Re: Post Images In Sub-category Only
Artie wrote: [View Post]


If interested, let me know.


hello!
i have the same problem - i'm very interested in your way ...

thank you
greets from vienna
thomas


Artie [ Mon 26 Nov, 2007 23:54 ]
Post subject: Re: Post Images In Sub-category Only
5 months have past here and I have forgot all that I remember .... oxymoron

I'll will have to look again when time allows.... stay tuned


offroad4fun [ Tue 27 Nov, 2007 10:01 ]
Post subject: Re: Post Images In Sub-category Only
Artie wrote: [View Post]
I'll will have to look again when time allows.... stay tuned


thx
thomas


Artie [ Wed 28 Nov, 2007 02:40 ]
Post subject: Re: Post Images In Sub-category Only
This code will remove the Upload button from all main categories .... Public and Personal

OPEN album_cat.php

FIND
Code: [Hide] [Select]
$upload_full_link = '<a href="' . $upload_link . '"><img src="' . $upload_img .'" alt="' . $lang['Upload_Pic'] . '" title="' . $lang['Upload_Pic'] . '" style="border:0px;vertical-align:middle;" /></a>';


AFTER ADD
Code: [Hide] [Select]
$upload_full_link = ($thiscat['cat_parent']== 0) ? '' : $upload_full_link;






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]
if (empty($thiscat))
{
message_die(GENERAL_ERROR, $lang['Category_not_exist']);
}


AFTER ADD
Code: [Hide] [Select]
if ($thiscat['cat_parent'] == 0)
{
message_die(GENERAL_ERROR, 'Uploads not allowed in the main category<br />Please select a sub-category and try again');
}


offroad4fun [ Wed 28 Nov, 2007 09:23 ]
Post subject: 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 ]
Post subject: Re: Post Images In Sub-category Only
thx

it works great

greets from vienna
thomas


offroad4fun [ Sun 02 Dec, 2007 14:19 ]
Post subject: 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<br />Please select a sub-category and try again');
}


this also disables that u can upload a picture in your personal album ...
-> so i removed this code-part again ...

greets
thomas




Powered by Icy Phoenix