https://www.icyphoenix.com/viewtopic.php?f=26&t=829
-----------------------------------
Bullet
Tue 09 Jan, 2007 22:08

FAP CUSTOMIZATION - SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
I was wondering if someone could help me out with this. 

Say. When a Member creates there personally gallery. The gallery will automatically have a Unrelated Sub Gallery in the members Personal Gallery

Could someone help me with this? Artie?


-----------------------------------
Mighty Gorgon
Tue 09 Jan, 2007 22:14

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Please, try to be more specific with your request... maybe an example will be useful! :wink:


-----------------------------------
Bullet
Tue 09 Jan, 2007 22:21

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
I want is so there is a standard sub gallery automatically made in every personal gallery when created..and it will be called Unrelated

Because I have been going into every personal gallery and making a sub gallery called Unrelated LOL


-----------------------------------
Artie
Tue 09 Jan, 2007 22:30

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
I was looking into this for you at mg.com
If some help doesn't arrive before, I will try to find my notes and get back to you.

[size=10][color=crimson] Thread moved to proper forum: FAP General Discussions And Customizations[/color][/size]


-----------------------------------
Bullet
Tue 09 Jan, 2007 22:32

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Thanks Artie!

That would be awesome if you could help me with this!


-----------------------------------
Mighty Gorgon
Wed 10 Jan, 2007 00:18

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote user="Bullet" post="6745"]Thanks Artie!

That would be awesome if you could help me with this![/quote]
Yes... Artie is down on it... he will get this done soon... I'm sure... :wink:


-----------------------------------
Artie
Wed 10 Jan, 2007 01:10

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[b][color=red]Mod updated 01/30/2007 [/color][/b]

With a little steering from the man, Mighty, I was able ' Git er done !!! ' 

[code linenumbers=false]
#
## ------------ [ OPEN ] ----------------
#

album_mod/album_constants.php

#
## ------------ [ FIND ] ----------------
#

?>

#
## ------------ [ BEFORE ADD ] ----------------
#

define('AUTO_CREATE_SUB_CAT_TITLE', 'Unrelated'); // Change title to suit
define('AUTO_CREATE_SUB_CAT_DESCRIPTION', 'Unrelated'); // Change description to suit


#
## ------------ [ OPEN ] ----------------
#

language/lang_english/lang_album_main.php

#
## ------------ [ FIND ] ----------------
#

$lang['No_Personal_Category_admin'] = 'You are not allowed to manage your personal gallery categories';

#
## ------------ [ AFTER ADD ] ----------------
#

$lang['No_Personal_Category_delete'] = 'You are not allowed to delete this personal gallery category';

#
## ------------ [ OPEN ] ----------------
#

album_mod/album_hierarchy_functions.php

#
## ------------ [ FIND ] ----------------
#

'U_CAT_DELETE' => ($is_root && $userdata['user_level'] != ADMIN) ? '' : append_sid(album_append_uid("$admin_url?action=delete&amp;cat_id=$cat_id")),

#
## ------------ [ REPLACE WITH ] ----------------
#

'U_CAT_DELETE' => (($is_root || $cat_title == AUTO_CREATE_SUB_CAT_TITLE) && $userdata['user_level'] != ADMIN) ? '' : append_sid(album_append_uid("$admin_url?action=delete&amp;cat_id=$cat_id")),

#
## ------------ [ FIND ] ----------------
#  
    
'L_DELETE' => ($is_root && $userdata['user_level'] != ADMIN) ? '' : $lang['Delete']

#
## ------------ [ REPLACE WITH ] ----------------
#

'L_DELETE' => (($is_root || $cat_title == AUTO_CREATE_SUB_CAT_TITLE) && $userdata['user_level'] != ADMIN) ? '' : $lang['Delete']
	
	
#
## ------------ [ OPEN ] ----------------
#

album_personal_cat_admin.php

#
## ------------ [ FIND ] ----------------
#

	if( $cat_found == FALSE )
			{
				message_die(GENERAL_ERROR, 'The requested category is not existed');
			}

#
## ------------ [ AFTER ADD ] ----------------
#

// BEGIN protect AUTO_CREATE_SUB_CAT from delete

if( ($thiscat['cat_title'] == AUTO_CREATE_SUB_CAT_TITLE) && ($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);
         }
   
// END protect AUTO_CREATE_SUB_CAT from delete


#
## ------------ [ OPEN ] ----------------
#

album_mod/album_hierarchy_sql.php

#
## ------------ [ FIND ] ----------------
#

    // ------------------------------------------------------------------------
        // insert the personal gallery root category
        // NOTE : the edit and delete level are set to PRIVATE !!
        // ------------------------------------------------------------------------
        $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
                ('" . $root_cat_name . "', '" . $root_cat_name . "',
                '0', '" . $view_level . "',
                '" . $upload_level . "', '0',
                '0', '" . ALBUM_PRIVATE . "',
                '" . ALBUM_PRIVATE . "', '0',
                '0', '$user_id')";

        if(!$result = $db->sql_query($sql))
        {
            //message_die(GENERAL_ERROR, 'Could not create new Personal Root Category', '', __LINE__, __FILE__, $sql);
            return false;
        }

#
## ------------ [ AFTER ADD ] ----------------
#

//  BEGIN CREATE PERSONAL GALLERY SUB CAT
		// Get the main cat id
		$sql = "SELECT cat_id FROM ". ALBUM_CAT_TABLE ."
					 WHERE cat_user_id = ".$user_id."
           LIMIT 1";
					
			if(!$result = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not query Album Categories information', '', __LINE__, __FILE__, $sql);
			}
			$row = $db->sql_fetchrow($result);

		  $cat_order = 10;
      $cat_parent = $row['cat_id'];
     
			// 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')";

			if(!$result = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Could not create new Album Category', '', __LINE__, __FILE__, $sql);
			}
// END CREATE PERSONAL GALLERY SUB CAT
	
#
## ------------ [ SAVE FILES ] ----------------
# EOM
[/code]


-----------------------------------
Mighty Gorgon
Wed 10 Jan, 2007 01:14

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Greaaaaaaat job man! :wink:


-----------------------------------
krisbfunk
Wed 10 Jan, 2007 01:26

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
this is a really cool addition, i was also looking for something like this. The users on my board use their personal gallery as a photography portfolio, and instead of creating a 'Misc' Public gallery, I would rather the users have their own space for unrelated photos to post elsewhere on the forum... that i don't have to personally create :P.


-----------------------------------
Bullet
Wed 10 Jan, 2007 03:45

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Thats awesome!

Thanks guys! This helps alot!

Should be an addon alot of ppl may like!


-----------------------------------
Bullet
Wed 10 Jan, 2007 03:51

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
One last request LOL

I made it so my members can add and remove subcats from there personal gallery. Is it possibly that u can add or remove any code so they just cannot remove the Unrelated Gallery?


-----------------------------------
Artie
Thu 11 Jan, 2007 21:54

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[b][color=red]Disregard - See Mod update above [/color][/b]

[strike]This will still show the [u]Delete[/u] link for the sub-cat, but will only link to an unathorized message. 


[b]In code you added (above)[/b]

FIND (2nd instance of)
[codeblock]'" . ALBUM_PRIVATE . "'[/codeblock]
REPLACE WITH
[codeblock]'1'[/codeblock]

OPEN [b]language_album_main.php[/b]

FIND
[codeblock]$lang['No_Personal_Category_admin'] = 'You are not allowed to manage your personal gallery categories';[/codeblock]
AFTER ADD
[codeblock]$lang['No_Personal_Category_delete'] = 'You are not allowed to delete this personal gallery category';[/codeblock]



OPEN [b]album_personal_cat_admin.php[/b]


FIND
[codeblock]$sql = "SELECT cat_id, cat_title, cat_order
					FROM ". ALBUM_CAT_TABLE ."
					ORDER BY cat_order ASC";[/codeblock]
REPLACE WITH
[codeblock]$sql = "SELECT cat_id, cat_title, cat_order, cat_delete_level
					FROM ". ALBUM_CAT_TABLE ."
					ORDER BY cat_order ASC";[/codeblock]

FIND
[codeblock]if( $cat_found == FALSE )
			{
				message_die(GENERAL_ERROR, 'The requested category is not existed');
			}[/codeblock]
AFTER ADD
[codeblock]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);
		 }[/codeblock][/strike]


-----------------------------------
krisbfunk
Fri 12 Jan, 2007 08:32

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
awesome! :) thanks artie


-----------------------------------
krisbfunk
Sun 14 Jan, 2007 00:42

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
hi. 

so this mod worked great, just have a small formatting problem to solve. I'm wondering how to move the subcategory section underneath the main gallery photos. I was able to comment the footer links in album_box.tpl, and assumed I'd be able to change the location of this in album_personal_body.tpl, but have been unable to locate the code to do so.. can someone tell me how to do this? see the image below for where i want it to go. 

[img]http://www.alexmurchison.com/forum/album_mod/upload/otf/attachments/categoryview_140.jpg[/img]


-----------------------------------
Artie
Sun 14 Jan, 2007 03:34

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
krisbfunk, the code is in [highlight=#FFFFAA] album_cat_body.tpl[/highlight]


-----------------------------------
krisbfunk
Sun 14 Jan, 2007 04:11

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
that's great, Artie, thanks.


-----------------------------------
krisbfunk
Mon 29 Jan, 2007 21:29

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

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Hmmmm ... I will check into this  :?


-----------------------------------
Artie
Tue 30 Jan, 2007 02:11

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote user="krisbfunk" post="8202"]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.[/quote]

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

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)

[quote="usergroups main personal gallery"]

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 [b]cannot delete[/b] your photos and comments in this category

You can moderate this category[/quote]

[quote="usergroups UNRELATED personal gallery"]
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 [b]can delete[/b] your photos and comments in this category

You can moderate this category[/quote]

I also should add this happens to every new user in any usergroup.


-----------------------------------
Artie
Tue 30 Jan, 2007 21:27

Re: Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
kris*, I think what is happening is that you have the group checked off as [highlight=#FFFFAA]Is Moderator[/highlight] and that is pretty much the same as checking all the permission checkboxes. If you unchecked [highlight=#FFFFAA]Is Moderator[/highlight] 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.

[quote user="Artie" post="7111"][strike]This will still show the [u]Delete[/u] link for the sub-cat, but will only link to an unathorized message. 


[b]In code you added (above)[/b]

FIND (2nd instance of)
[codeblock]'" . ALBUM_PRIVATE . "'[/codeblock]
REPLACE WITH
[codeblock]'1'[/codeblock]

OPEN [b]language_album_main.php[/b]

FIND
[codeblock]$lang['No_Personal_Category_admin'] = 'You are not allowed to manage your personal gallery categories';[/codeblock]
AFTER ADD
[codeblock]$lang['No_Personal_Category_delete'] = 'You are not allowed to delete this personal gallery category';[/codeblock]



OPEN [b]album_personal_cat_admin.php[/b]


FIND
[codeblock]$sql = "SELECT cat_id, cat_title, cat_order
					FROM ". ALBUM_CAT_TABLE ."
					ORDER BY cat_order ASC";[/codeblock]
REPLACE WITH
[codeblock]$sql = "SELECT cat_id, cat_title, cat_order, cat_delete_level
					FROM ". ALBUM_CAT_TABLE ."
					ORDER BY cat_order ASC";[/codeblock]

FIND
[codeblock]if( $cat_found == FALSE )
			{
				message_die(GENERAL_ERROR, 'The requested category is not existed');
			}[/codeblock]
AFTER ADD
[codeblock]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);
		 }[/codeblock][/strike][/quote]


-----------------------------------
Artie
Wed 31 Jan, 2007 01:07

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[b][color=red]Mod has been updated above [/color][/b] [img]http://www.icyphoenix.com/images/smiles/xs_arrowu.gif[/img] 

http://www.icyphoenix.com/viewtopic.php?p=6805#p6805


-----------------------------------
Bullet
Wed 31 Jan, 2007 02:00

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

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.

[img]http://www.alexmurchison.com/forum/album_mod/upload/otf/attachments/usergroup4perm_764.jpg[/img]


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 [b]cannot[/b] delete your photos and comments in this category

You can moderate this category[/quote]

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 [b]can[/b] delete your photos and comments in this category

You can moderate this category[/quote]

 (this is only happening with new users since the unrelated mod)


-----------------------------------
Artie
Thu 01 Feb, 2007 00:25

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote user="Bullet" post="8273"]Artie.

Should all the old code be removed and then enter the new updated mod?[/quote]
Yes, I think that would be best. 
You should also set [highlight=#FFFFAA]cat_delete_level[/highlight] to 3 for all the Unrelated subcats you now have.


kris*, the only thing this mod could have done would have been ... [highlight=#FFFFAA]You cannot delete your photos and comments in this category[/highlight] ... for the subcat Unrelated and not the main category. ... the updated mod will correct this on future galleries.

You are aware that [highlight=#FFFFAA]Who can view personal galleries by default[/highlight] must be set to Private for any of those permissions to be active ?


-----------------------------------
krisbfunk
Thu 01 Feb, 2007 01:15

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote user="Artie" post="8364"][quote user="Bullet" post="8273"]Artie.

Should all the old code be removed and then enter the new updated mod?[/quote]
Yes, I think that would be best. 
You should also set [highlight=#FFFFAA]cat_delete_level[/highlight] to 3 for all the Unrelated subcats you now have.


kris*, the only thing this mod could have done would have been ... [highlight=#FFFFAA]You cannot delete your photos and comments in this category[/highlight] ... for the subcat Unrelated and not the main category. ... the updated mod will correct this on future galleries.

You are aware that [highlight=#FFFFAA]Who can view personal galleries by default[/highlight] must be set to Private for any of those permissions to be active ?[/quote]

ok, i guess i should open a new topic then.. yes, i am aware [highlight=#FFFFAA]Who can view personal galleries by default[/highlight] 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

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

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote user="Bullet" post="8372"]Artie,

Do you have all the previous code edits that u have PM me so I can remove them.[/quote]

Most of the code is lined out above, the other is in [highlight=#FFFFAA]album_mod/album_hierarchy_sql.php[/highlight] 
Just replace what you have between this (below) with the code listed in the mod update.
[code linenumbers=false]//  BEGIN CREATE PERSONAL GALLERY SUB CAT 


//  END CREATE PERSONAL GALLERY SUB CAT [/code]

[quote user="krisbfunk" post="8371"]
[highlight=#00FFAA]When new accounts are created, the main gallery and unrelated is already created for them when they click their personal gallery link[/highlight], perhaps this is part of the issue? It never used to be like this, [highlight=#FFFFAA]new users previously had to click "create a personal gallery[/highlight]".[/quote]

You have other problems, I would think.
[highlight=#00FFAA]How did that happen?[/highlight] 
[highlight=#FFFFAA]If ACP is set to allow users to create their own gallery they must be created this way.[/highlight]


-----------------------------------
Bullet
Thu 01 Feb, 2007 08:13

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Works great now! Thanks again!


-----------------------------------
krisbfunk
Fri 02 Feb, 2007 17:10

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote="Artie"][quote user="krisbfunk" post="8371"]
[highlight=#00FFAA]When new accounts are created, the main gallery and unrelated is already created for them when they click their personal gallery link[/highlight], perhaps this is part of the issue? It never used to be like this, [highlight=#FFFFAA]new users previously had to click "create a personal gallery[/highlight]".[/quote]

You have other problems, I would think.
[highlight=#00FFAA]How did that happen?[/highlight] 
[highlight=#FFFFAA]If ACP is set to allow users to create their own gallery they must be created this way.[/highlight][/quote]

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

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[quote user="krisbfunk" post="8403"]
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).[/quote]

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

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...

 :mrgreen:  :mrgreen:


-----------------------------------
Artie
Sat 26 Jan, 2008 00:16

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
[size=10][color=red]Moved and Merged with existing topic[/color][/size]

[quote user="DWho" post="23567"]... I was wondering is there any way to make the view private automatically as it is set to reg by default...[/quote]

Try this for making the created sub-cat private

In this section of the mod's code
[codeblock]// 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')"; [/codeblock]
FIND
[codeblock] '$view_level'
[/codeblock]
AND REPLACE IT WITH

[codeblock]'" . ALBUM_PRIVATE . "'[/codeblock]


-----------------------------------
DWho
Thu 31 Jan, 2008 22:26

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..

 :D  :D


-----------------------------------
Pete_Z
Sat 02 Feb, 2008 12:01

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. 8)


-----------------------------------
Artie
Thu 07 Feb, 2008 23:53

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Should work  :shock: 
What kinda errors are you getting ?


-----------------------------------
Pete_Z
Tue 12 Feb, 2008 11:44

Re: SOLVED - Standard Unrelated Gallery In Personal Gallerys
-----------------------------------
Strange!  it's working fine now. I had an error with my portal... oops.  :| 


[quote user="Artie" post="24003"]Should work  :shock: 
What kinda errors are you getting ?[/quote]


-----------------------------------
sharkattaq
Sat 27 Dec, 2008 14:42

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

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

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.


