Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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
 



 
sympaticoSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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.
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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!
 



 
sympaticoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 



 
offroad4funSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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  
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 



 
offroad4funSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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');
}

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Post Images In Sub-category Only 
 
thank you - i will try it this evening an will give you a feedback!

thx
thomas
 



 
offroad4funSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Post Images In Sub-category Only 
 
thx

it works great

greets from vienna
thomas
 



 
offroad4funSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 



 
offroad4funSend private messageVisit poster's website  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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