Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Loading Categories - to much time (3 Min!)  (Read 3624 times)

0 Members and 1 Guest are viewing this topic.

byrev

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Loading Categories - to much time (3 Min!)
« 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 (Public Domain Photo)
What can i do ?
« Last Edit: October 14, 2007, 10:40:12 am by GauGau »
Logged

byrev

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Loading Categories - to much time (3 Min!) - SELF RESLOVED!
« Reply #1 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
Code: [Select]
    global $CAT_LIST, $CONFIG; //$PHP_SELF,

    $CAT_LIST3 = $CAT_LIST;
write:
Code: [Select]
    return;

  b. this code:
Code: [Select]
starttable('100%');
$help = ' '.cpg_display_help('f=index.htm&as=cat_cp&ae=albmgr&top=1', '600', '400');
echo <<<EOT
        <tr>
will be:
Code: [Select]
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:
Code: [Select]
<form name="catsortconfig" action="{$_SERVER['PHP_SELF']}" method="post">
        <tr>
            <td class="tablef" colspan="6">
change like this:
Code: [Select]
<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:
Code: [Select]
                                          <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:
Code: [Select]
                                          <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!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Loading Categories - to much time (3 Min!)
« Reply #2 on: October 14, 2007, 10:40:38 am »

Thanks for returning and posting your solution.
Logged

byrev

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Loading Categories - to much time (3 Min!)
« Reply #3 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"
Logged

nowordneeded

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 224
Re: Loading Categories - to much time (3 Min!)
« Reply #4 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
Logged
Sometimes my musings are too confusing for someone not inside my head.

byrev

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Loading Categories - to much time (3 Min!)
« Reply #5 on: February 16, 2008, 10:20:41 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Loading Categories - to much time (3 Min!)
« Reply #6 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
Logged
Pages: [1]   Go Up
 

Page created in 0.033 seconds with 20 queries.