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 3
Goto page 1, 2, 3  Next
 
Reply with quote Download Post 
Post 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?
 



 
Last edited by Bullet on Thu 25 Jan, 2007 01:26; edited 1 time in total 
BulletSend 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: Standard Unrelated Gallery In Personal Gallerys 
 
Please, try to be more specific with your request... maybe an example will be useful!
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 



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

Thread moved to proper forum: FAP General Discussions And Customizations
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
Thanks Artie!

That would be awesome if you could help me with this!
 



 
BulletSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
Bullet wrote: [View Post]
Thanks Artie!

That would be awesome if you could help me with this!

Yes... Artie is down on it... he will get this done soon... I'm sure...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
Mod updated 01/30/2007

With a little steering from the man, Mighty, I was able ' Git er done !!! '

Code: [Download] [Hide] [Select]
#
## ------------ [ 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&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&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

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
Greaaaaaaat job man!
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
krisbfunkSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
Thats awesome!

Thanks guys! This helps alot!

Should be an addon alot of ppl may like!
 



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



 
BulletSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
Disregard - See Mod update above

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: [Download] [Hide] [Select]
'" . ALBUM_PRIVATE . "'

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


OPEN language_album_main.php

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

AFTER ADD
Code: [Download] [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: [Download] [Hide] [Select]
$sql = "SELECT cat_id, cat_title, cat_order
                    FROM ". ALBUM_CAT_TABLE ."
                    ORDER BY cat_order ASC";

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


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

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

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
awesome! thanks artie
 



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

categoryview_140
 



 
krisbfunkSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Standard Unrelated Gallery In Personal Gallerys 
 
krisbfunk, the code is in album_cat_body.tpl
 



 
ArtieSend private message  
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 3
Goto page 1, 2, 3  Next


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


  

 

  cron