Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - SOLVED - Standard Unrelated Gallery In Personal Gallerys



krisbfunk [ Sun 14 Jan, 2007 04:11 ]
Post subject: Re: Standard Unrelated Gallery In Personal Gallerys
that's great, Artie, thanks.


krisbfunk [ Mon 29 Jan, 2007 21:29 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
is it possible that this code could cause permission problems with new users?

since doing the above edits, new users now cannot delete their own photos in the main gallery, but are able to do it in their sub category "unrelated".. regardless of permission changes.


Artie [ Mon 29 Jan, 2007 22:21 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Hmmmm ... I will check into this


Artie [ Tue 30 Jan, 2007 02:11 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
krisbfunk wrote: [View Post]
is it possible that this code could cause permission problems with new users?

since doing the above edits, new users now cannot delete their own photos in the main gallery, but are able to do it in their sub category "unrelated".. regardless of permission changes.


It should not cause any issues with the main gallery, but could with the sub cat (Unrelated) ... I'll correct this soon.

In the meantime review the thread linked below, it may be some of your problem

http://www.icyphoenix.com/viewtopic.php?t=791


krisbfunk [ Tue 30 Jan, 2007 13:42 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Thanks Artie, but i already completed that update a while back and am aware of what it's saying.

settings:

users cannot create subcategories
users can create their own gallery
users can moderate their own galleries

config:
Who can view personal galleries by default: Private

group permissions:
usergroup #4: everything selected.. any modification to this at any time does nothing to the below settings


what new users in usergroup#4 see: (since this mod)

usergroups main personal gallery wrote: 


You can upload new photos in this category
You can post comments to photos in this category
You can edit your photos and comments in this category
You cannot delete your photos and comments in this category

You can moderate this category


usergroups UNRELATED personal gallery wrote: 

You can upload new photos in this category
You can post comments to photos in this category
You can edit your photos and comments in this category
You can delete your photos and comments in this category

You can moderate this category


I also should add this happens to every new user in any usergroup.


Artie [ Tue 30 Jan, 2007 21:27 ]
Post subject: Re: Standard Unrelated Gallery In Personal Gallerys
kris*, I think what is happening is that you have the group checked off as Is Moderator and that is pretty much the same as checking all the permission checkboxes. If you unchecked Is Moderator I think you will see the effect you desire.

On another note: The code (see below) given in an above post is incorrect and should be reversed.

Artie wrote: [View Post]
This will still show the Delete link for the sub-cat, but will only link to an unathorized message.


In code you added (above)

FIND (2nd instance of)
Code: [Hide] [Select]
'" . ALBUM_PRIVATE . "'

REPLACE WITH
Code: [Hide] [Select]
'1'


OPEN language_album_main.php

FIND
Code: [Hide] [Select]
$lang['No_Personal_Category_admin'] = 'You are not allowed to manage your personal gallery categories';

AFTER ADD
Code: [Hide] [Select]
$lang['No_Personal_Category_delete'] = 'You are not allowed to delete this personal gallery category';




OPEN album_personal_cat_admin.php


FIND
Code: [Hide] [Select]
$sql = "SELECT cat_id, cat_title, cat_order
FROM ". ALBUM_CAT_TABLE ."
ORDER BY cat_order ASC";

REPLACE WITH
Code: [Hide] [Select]
$sql = "SELECT cat_id, cat_title, cat_order, cat_delete_level
FROM ". ALBUM_CAT_TABLE ."
ORDER BY cat_order ASC";


FIND
Code: [Hide] [Select]
if( $cat_found == FALSE )
{
message_die(GENERAL_ERROR, 'The requested category is not existed');
}

AFTER ADD
Code: [Hide] [Select]
if( ($thiscat['cat_delete_level'] == 1) && ($userdata['user_level'] != ADMIN))
{
include_once($phpbb_root_path . 'includes/page_header.'.$phpEx);
$message = $lang['No_Personal_Category_delete'];
$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], '<a href="' . append_sid(album_append_uid('album.' . $phpEx)) . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}


Artie [ Wed 31 Jan, 2007 01:07 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Mod has been updated above xs_arrowu

http://www.icyphoenix.com/viewtopic.php?p=6805#p6805


Bullet [ Wed 31 Jan, 2007 02:00 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Artie.

Should all the old code be removed and then enter the new updated mod?


krisbfunk [ Wed 31 Jan, 2007 06:45 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
thanks, i updated the code.

as for the issue i'm having, the moderator box is not checked off for that usergroup.

usergroup4perm_764


main personal gallery:
Quote:
You can upload new photos in this category
You can post comments to photos in this category
You can edit your photos and comments in this category
You cannot delete your photos and comments in this category

You can moderate this category


unrelated personal gallery:
Quote:
You can upload new photos in this category
You can post comments to photos in this category
You can edit your photos and comments in this category
You can delete your photos and comments in this category

You can moderate this category


(this is only happening with new users since the unrelated mod)


Artie [ Thu 01 Feb, 2007 00:25 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Bullet wrote: [View Post]
Artie.

Should all the old code be removed and then enter the new updated mod?

Yes, I think that would be best.
You should also set cat_delete_level to 3 for all the Unrelated subcats you now have.


kris*, the only thing this mod could have done would have been ... You cannot delete your photos and comments in this category ... for the subcat Unrelated and not the main category. ... the updated mod will correct this on future galleries.

You are aware that Who can view personal galleries by default must be set to Private for any of those permissions to be active ?


krisbfunk [ Thu 01 Feb, 2007 01:15 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Artie wrote: [View Post]
Bullet wrote: [View Post]
Artie.

Should all the old code be removed and then enter the new updated mod?

Yes, I think that would be best.
You should also set cat_delete_level to 3 for all the Unrelated subcats you now have.


kris*, the only thing this mod could have done would have been ... You cannot delete your photos and comments in this category ... for the subcat Unrelated and not the main category. ... the updated mod will correct this on future galleries.

You are aware that Who can view personal galleries by default must be set to Private for any of those permissions to be active ?


ok, i guess i should open a new topic then.. yes, i am aware Who can view personal galleries by default must be set to Private for the settings to take affect, and it is.

New users cannot delete photos in their main gallery, but they can delete photos in their Unrelated gallery. I have reset the permissions a number of times to even allow full access/no access and with and without moderator ability in the config. personal gallery delete permissions are not working on new users in any usergroup.

the only work-around i have for my users now is to have them move photos to their unrelated gallery and delete them from there.

*edit*

ok, i logged in as admin and deleted a new users personal gallery (both unrelated and main personal gallery). Then I logged in under that new user and created a gallery by clicking the create a personal gallery link. Now the new user can delete photos from both galleries. I have to do this for every new user.

When new accounts are created, the main gallery and unrelated is already created for them when they click their personal gallery link, perhaps this is part of the issue? It never used to be like this, new users previously had to click "create a personal gallery".


Bullet [ Thu 01 Feb, 2007 02:48 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Artie,

Do you have all the previous code edits that u have PM me so I can remove them.


Artie [ Thu 01 Feb, 2007 03:43 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Bullet wrote: [View Post]
Artie,

Do you have all the previous code edits that u have PM me so I can remove them.


Most of the code is lined out above, the other is in album_mod/album_hierarchy_sql.php
Just replace what you have between this (below) with the code listed in the mod update.
Code: [Hide] [Select]
// BEGIN CREATE PERSONAL GALLERY SUB CAT


// END CREATE PERSONAL GALLERY SUB CAT


krisbfunk wrote: [View Post]

When new accounts are created, the main gallery and unrelated is already created for them when they click their personal gallery link, perhaps this is part of the issue? It never used to be like this, new users previously had to click "create a personal gallery".


You have other problems, I would think.
How did that happen?
If ACP is set to allow users to create their own gallery they must be created this way.


Bullet [ Thu 01 Feb, 2007 08:13 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Works great now! Thanks again!


krisbfunk [ Fri 02 Feb, 2007 17:10 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Artie wrote: 
krisbfunk wrote: [View Post]

When new accounts are created, the main gallery and unrelated is already created for them when they click their personal gallery link, perhaps this is part of the issue? It never used to be like this, new users previously had to click "create a personal gallery".


You have other problems, I would think.
How did that happen?
If ACP is set to allow users to create their own gallery they must be created this way.


ok.. i'm not sure how it happened? ACP is set so to 'Private' for 'allowed to set personal gallery for users' and all usergroups are checked off in the personal galler permissions. The pre-existing galleries do not appear in the list of member galleries until someone has uploaded a photo, they do not get the link to create a gallery, it simply exists (unless i delete it, then they get the link).


Artie [ Sat 03 Feb, 2007 00:49 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
krisbfunk wrote: [View Post]

The pre-existing galleries do not appear in the list of member galleries until someone has uploaded a photo, they do not get the link to create a gallery, it simply exists (unless i delete it, then they get the link).


This is true.... no reason to list an empty gallery.
I think it best that you start a new topic for further discussion on this.


DWho [ Tue 22 Jan, 2008 13:09 ]
Post subject: Making Sub Cat Private By Default..
Hi

I am using this mod here

http://www.icyphoenix.com/viewtopic.php?f=25&t=829

which automatically adds a sub cat for user in their personal gallery... I was wondering is there any way to make the view private automatically as it is set to reg by default...

Thanks for any help...



Artie [ Sat 26 Jan, 2008 00:16 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Moved and Merged with existing topic

DWho wrote: [View Post]
... I was wondering is there any way to make the view private automatically as it is set to reg by default...


Try this for making the created sub-cat private

In this section of the mod's code
Code: [Hide] [Select]
// Here we insert a new row into the db

$sql = "INSERT INTO ". ALBUM_CAT_TABLE ." (cat_title, cat_desc, cat_order, cat_view_level, cat_upload_level, cat_rate_level, cat_comment_level, cat_edit_level, cat_delete_level, cat_approval, cat_parent, cat_user_id)
VALUES ('". AUTO_CREATE_SUB_CAT_TITLE ."', '". AUTO_CREATE_SUB_CAT_DESCRIPTION ."', '$cat_order', '$view_level', '$upload_level', '0', '0', '" . ALBUM_PRIVATE . "', '" . ALBUM_PRIVATE . "', '0', '$cat_parent', '$user_id')";

FIND
Code: [Hide] [Select]
'$view_level'

AND REPLACE IT WITH

Code: [Hide] [Select]
'" . ALBUM_PRIVATE . "'


DWho [ Thu 31 Jan, 2008 22:26 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Sorry for the late reply I couldnt find this post....

Thank you very much Artie it worked like a charm... at least I know a bit how that part works...

Also how do you make it so members albums are created as soon as they join instead of them having to create it....

Thanks again for the help..



Pete_Z [ Sat 02 Feb, 2008 12:01 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
This is very cool. awesome.

Is there a way that I can use spaces in title and discription?
I get erros if I use spaces for obvious reasons.

define('AUTO_CREATE_SUB_CAT_TITLE', 'Your first category');

Is a no go

define('AUTO_CREATE_SUB_CAT_TITLE', 'Your_first_category');

Works... but I mean, it would be cool without the underscore.


Artie [ Thu 07 Feb, 2008 23:53 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Should work
What kinda errors are you getting ?


Pete_Z [ Tue 12 Feb, 2008 11:44 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Strange! it's working fine now. I had an error with my portal... oops.


Artie wrote: [View Post]
Should work
What kinda errors are you getting ?


sharkattaq [ Sat 27 Dec, 2008 14:42 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
I understand this mod creates a default subcategory that you cannot delete.

What happens with already created personal galleries. Will this default subcategory appear there as well or not?


Artie [ Sat 27 Dec, 2008 23:40 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
This mod has no effect on user galleries that were created before the mod was installed.


sharkattaq [ Sun 28 Dec, 2008 02:32 ]
Post subject: Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
Is there a way to mass-create this for existing galleries? My gallery in a quite mature state with thousands of active users so my concern is mostly towards the past.




Powered by Icy Phoenix