coppermine-gallery.com/forum

Support => Deutsch (German) => Language Specific Support => cpg1.4.x Deutsch (German) => Topic started by: FastJekt on May 30, 2006, 10:11:44 AM

Title: Kategorie Navigation
Post by: FastJekt on May 30, 2006, 10:11:44 AM
Hallo,
ich wollte fragen ob jemand eine Möglichkeit kennt
die Kategorien in einzelne Spalten und Tabelen zu stellen,
so dass jede Kategorie in einem eigenen Kasten ist.
Ich habe schon versucht mich durch die englische Anleitung für SYS und SUb_Menu
durch zu frimeln aber da beisen meine Englisch kentnisse aus.
Title: Re: Kategorie Navigation
Post by: Stramm on May 30, 2006, 10:35:47 AM
da gab's mal nen kleinen thread zu... und die Kategorien haben direkt nichts mit sys/ sub menu zu tun. Die Zeit Dich dort firm zu machen kannst Du Dir sparen

http://forum.coppermine-gallery.net/index.php?topic=15400.msg51782#msg51782
Title: Re: Kategorie Navigation
Post by: FastJekt on May 30, 2006, 10:45:44 AM
Danke,
doch da beisst mein englisch schon wieder aus mal sehn ob ich mich durch frimeln kann
Title: Re: Kategorie Navigation
Post by: FastJekt on May 30, 2006, 12:04:31 PM
weis jemand wo ich diese Zeile
finden kann
<!--if (isset(CAT_ALBUMS)){--> die soll angeblich in der theme.php sein
ich finde die nicht
Title: Re: Kategorie Navigation
Post by: Stramm on May 30, 2006, 12:15:28 PM
Wenn Du in der theme.php etwas nicht finden kannst, dann öffnest Du themes/sample/theme.php und kopierst es von dort zu der theme.php die Du benutzt.
Title: Re: Kategorie Navigation
Post by: FastJekt on May 30, 2006, 12:30:09 PM
Danke für den tipp,
nur da finde ich es auch nicht
Title: Re: Kategorie Navigation
Post by: Stramm on May 30, 2006, 12:49:49 PM
in Dein theme.php kopieren
// HTML template for the category list
$template_cat_list = <<<EOT
<!-- BEGIN header -->
        <tr>
        <tr>
                <td class="tableh1" width="25%"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="4%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="4%" align="center"><b>{PICTURES}</b></td>
<td class="tableh1" width="26%"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="4%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="4%" align="center"><b>{PICTURES}</b></td>
<td class="tableh1" width="25%"><b>{CATEGORY}</b></td>
                <td class="tableh1" width="4%" align="center"><b>{ALBUMS}</b></td>
                <td class="tableh1" width="4%" align="center"><b>{PICTURES}</b></td>
        </tr>
        </tr>
<!-- END header -->
<!-- BEGIN catrow_noalb -->
                <td class="catrow_noalb" colspan="3"><table border="0"><tr><td align="left">{CAT_THUMB}</td><td align="left"><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
<!-- END catrow_noalb -->
<!-- BEGIN catrow -->
                <td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
                <td class="catrow" align="center">{ALB_COUNT}</td>
                <td class="catrow" align="center">{PIC_COUNT}</td>

<!-- END catrow -->
<!-- BEGIN footer -->
        <tr>
                <td colspan="9" class="tableh1" align="center"><span class="statlink"><b>{STATISTICS}</b></span></td>
        </tr>
<!-- END footer -->
<!-- BEGIN spacer -->
        <img src="images/spacer.gif" width="1" height="7" border="" alt="" /><br />
<!-- END spacer -->

EOT;

function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
    global $template_cat_list, $lang_cat_list;
    if (count($cat_data) > 0) {
        starttable('100%');
        $template = template_extract_block($template_cat_list, 'header');
        $params = array('{CATEGORY}' => $lang_cat_list['category'],
            '{ALBUMS}' => $lang_cat_list['albums'],
            '{PICTURES}' => $lang_cat_list['pictures'],
            );
        echo template_eval($template, $params);
    }

    $template_noabl = template_extract_block($template_cat_list, 'catrow_noalb');
    $template = template_extract_block($template_cat_list, 'catrow');


    $count=0;
    $columnCount=3;
    echo "<tr>";

    foreach($cat_data as $category) {
If ($count%$columnCount==0) {
    echo "</tr><tr>";
}
        $count++;
        if (count($category) == 3) {
            $params = array('{CAT_TITLE}' => $category[0],
                    '{CAT_THUMB}' => $category['cat_thumb'],
                '{CAT_DESC}' => $category[1]
                );
            echo template_eval($template_noabl, $params);
        } elseif (isset($category['cat_albums']) && ($category['cat_albums'] != '')) {
            $params = array('{CAT_TITLE}' => $category[0],
                '{CAT_THUMB}' => $category['cat_thumb'],
                '{CAT_DESC}' => $category[1],
                '{CAT_ALBUMS}' => $category['cat_albums'],
                '{ALB_COUNT}' => $category[2],
                '{PIC_COUNT}' => $category[3],
                );
            echo template_eval($template, $params);
        } else {
            $params = array('{CAT_TITLE}' => $category[0],
                '{CAT_THUMB}' => $category['cat_thumb'],
                '{CAT_DESC}' => $category[1],
                '{CAT_ALBUMS}' => '',
                '{ALB_COUNT}' => $category[2],
                '{PIC_COUNT}' => $category[3],
                );
            echo template_eval($template, $params);
        }
    }
echo "</tr>";
    if ($statistics && count($cat_data) > 0) {
        $template = template_extract_block($template_cat_list, 'footer');
        $params = array('{STATISTICS}' => $statistics);
        echo template_eval($template, $params);
    }


    if (count($cat_data) > 0)
          endtable();
        echo template_extract_block($template_cat_list, 'spacer');
}


das ordnet die Kategorien in drei Spalten an. Hoffe das wars was Du wolltest. Du solltest dann noch das css überprüfen. Im classic theme hat beispielsweise eine leere Kategorie einen anderen Hintergrund. Sieht dann nicht so toll aus
Title: Re: Kategorie Navigation
Post by: FastJekt on May 30, 2006, 01:34:03 PM
Ja danke genau das war es.
Super von euch
Title: Re: Kategorie Navigation
Post by: Joachim Müller on May 31, 2006, 07:49:11 AM
Löse in Zukunft die von Dir losgetretenen Threads (http://forum.coppermine-gallery.net/index.php?topic=32047.msg148949#msg148949) auch auf! >:(
Title: Re: Kategorie Navigation
Post by: FastJekt on June 03, 2006, 12:34:46 PM
ups sorry  ich bin hier noch neu  ::)