coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: byrev on October 13, 2007, 09:43:09 PM

Title: Loading Categories - to much time (3 Min!)
Post by: byrev on October 13, 2007, 09:43:09 PM
Gallery works fine with one exception. New Category si not good implemented.
if i have 10-50 category/subcategory is not a big problem but ... IF I HAVE 500 Category/Subcategory ?
I i have Big Tree Structure is a big problem if i want new categoryes ... page stay to much for loading ( at this moment for loading category page - admin, time is 160 seconds for 109 categories)

My Gallery is located at: http://moka.t2i.info (http://moka.t2i.info) (Public Domain Photo)
What can i do ?
Title: Re: Loading Categories - to much time (3 Min!) - SELF RESLOVED!
Post by: byrev on October 13, 2007, 10:39:54 PM
SELF RESLOVED!

1. Copy carmgr.php (from root gallery) with another name: cat_add_mgr.php
2. Made modification in cat_add_mgr.php
a. in function display_cat_list() after
    global $CAT_LIST, $CONFIG; //$PHP_SELF,

    $CAT_LIST3 = $CAT_LIST;

write:
    return;


  b. this code:
starttable('100%');
$help = ' '.cpg_display_help('f=index.htm&as=cat_cp&ae=albmgr&top=1', '600', '400');
echo <<<EOT
        <tr>

will be:
starttable('100%');
$help = '&nbsp;'.cpg_display_help('f=index.htm&amp;as=cat_cp&amp;ae=albmgr&amp;top=1', '600', '400');^
echo <<<EOT
        <tr style="display: none;">



c. and this:
<form name="catsortconfig" action="{$_SERVER['PHP_SELF']}" method="post">
        <tr>
            <td class="tablef" colspan="6">

change like this:
<form name="catsortconfig" action="{$_SERVER['PHP_SELF']}" method="post">
        <tr style="display: none;">
            <td class="tablef" colspan="6">

b and c is not 100% necesary for mod. (working without)



3. make modification in your theme file theme.php:
  a. under "Admin Menu" this code:
                                          <li><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></li>
                                          <li><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></li>
                                          <li><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></li>


will be:
                                          <li><a href="admin.php" title="{ADMIN_TITLE}">{ADMIN_LNK}</a></li>
                                          <li><a href="catmgr.php" title="{CATEGORIES_TITLE}">{CATEGORIES_LNK}</a></li>
                                          <li><a href="cat_add_mgr.php" title="{CATEGORIES_TITLE}">Add Categories</a></li>
                                          <li><a href="albmgr.php{CATL}" title="{ALBUMS_TITLE}">{ALBUMS_LNK}</a></li>


Done !

in Sidebar u have Add Categories links with reduced version for original categories page!
Title: Re: Loading Categories - to much time (3 Min!)
Post by: Joachim Müller on October 14, 2007, 10:40:38 AM
Thanks for returning and posting your solution.
Title: Re: Loading Categories - to much time (3 Min!)
Post by: byrev on October 16, 2007, 01:46:50 AM
With pleasure, and another time !!!
---------------------------------
i dont have time for tunning and seo optimize but when i do i come back here for posting solution !

in batch uplad photo when proceessed picture is a good ideea to put default name/description for all photos !
Ex:
if album name is : Yellow Flowers, all title photo will be:
Yello Flowers -  001, Yello Flowers -  002 ,.... , Yello Flowers -  00n!

in Description (for album Yellow Flowers if category name is Nature Ex.) is a good idea to set default like:
[Yellow Flowers , Nature]

and for tag must split/explode gallery name and category and set default like:
[nature, flowers, yellow]

This is verry usefull for search engine indexing !!!

Another goot ideea for permalink is to use Category_Gallery-Name_Photo-Title_IDCAT-IDPHOTO.html for url not like "displayimage-IDCAT-IDPHOTO.html"
Title: Re: Loading Categories - to much time (3 Min!)
Post by: nowordneeded on February 12, 2008, 08:54:08 AM
Is there a way that you could provide a full coding sheet that I could cut and paste with the cat_add_mgr.php  file. I am really code illiterate and am having a hard time figuring out what goes where. I can code the Admin Menu them.php page.

I've been having the same issue as the OP and just don't know where to put things.

Thanks in advance.

NWN
Title: Re: Loading Categories - to much time (3 Min!)
Post by: byrev on February 16, 2008, 10:20:41 PM
theme.php is from chaoticsoul theme
Coppermine version is : 1.4.12 (stable)
Title: Re: Loading Categories - to much time (3 Min!)
Post by: Joachim Müller on February 17, 2008, 02:49:33 AM
Don't use cpg1.4.12 - it's outdated. Always use the most recent stable release - currently cpg1.4.16