FAP CUSTOMIZATION - Post Images In Sub-category Only


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

Profile PM  
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.

Profile PM  
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!

Profile PM  
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.

Profile PM  
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

Subject: 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:

Profile PM  
Subject: Re: Post Images In Sub-category Only
Artie wrote: [View Post]
I'll will have to look again when time allows.... stay tuned :wink:


thx
thomas

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


AFTER ADD
Code: [Download] [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');
}

Profile PM  
Subject: Re: Post Images In Sub-category Only
thank you - i will try it this evening an will give you a feedback!

thx
thomas

Subject: Re: Post Images In Sub-category Only
thx

it works great

greets from vienna
thomas

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


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.1061s (PHP: 17% SQL: 83%)
SQL queries: 10 - Debug Off - GZIP Enabled