Loading Categories - to much time (3 Min!) Loading Categories - to much time (3 Min!)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Loading Categories - to much time (3 Min!)

Started by byrev, October 13, 2007, 09:43:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

byrev

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 (Public Domain Photo)
What can i do ?

byrev

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!

Joachim Müller

Thanks for returning and posting your solution.

byrev

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"

nowordneeded

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
Sometimes my musings are too confusing for someone not inside my head.

byrev

theme.php is from chaoticsoul theme
Coppermine version is : 1.4.12 (stable)

Joachim Müller

Don't use cpg1.4.12 - it's outdated. Always use the most recent stable release - currently cpg1.4.16