MyXoops Forum

Forum - myXOOPS German Support

5 + 8 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Aw: wgGallery Unterkategorien anzeigen

Betreff: Aw: wgGallery Unterkategorien anzeigen
von WDC am 16.09.2020 19:33:35

Zitat:
Goffy schrieb:

von der index.php

kannst aber den Teil von der tpl auch gleich dazugeben

Im Endeffekt hatte ich das gemacht, was Du in Post 10 geschrieben hast index.php
unset($albumsAll);
unset(
$crAlbums);
$catsCount count($permAlbView);
if (
$catsCount 0) {
    
$crAlbums = new CriteriaCompo();
    
$crAlbums->add(new Criteria('alb_id''(' implode(','$permAlbView) . ')''IN'));
    
$crAlbums->setSort('alb_weight ASC, alb_date');
    
$crAlbums->setOrder('DESC');
    
$crAlbums->setStart($start);
    
$crAlbums->setLimit($limit);
    
$albumsAll $albumsHandler->getAll($crAlbums);
    unset(
$permAlbView);

    if (
$catsCount 0) {
        
$categories = [];
        
$counter    0;
        
// Get All Albums
        
foreach (array_keys($albumsAll) as $i) {
            
$categories[$i] = $albumsAll[$i]->getValuesAlbums();
            
// count albums
            
$crSubAlbums = new CriteriaCompo();
            
$crSubAlbums->add(new Criteria('alb_pid'$categories[$i]['alb_id']));
            
$nbAlbums                    $albumsHandler->getCount($crSubAlbums);
            
$categories[$i]['nb_albums'] = $nbAlbums;
            
//check permissions
            //$categories[$i]['edit'] = $permissionsHandler->permAlbumEdit($albumsAll[$i]->getVar('alb_id'), $albumsAll[$i]->getVar('alb_submitter'));
            //set indicator for line break
            
$counter++;
            if (
=== $counter) {
                
$categories[$i]['newrow'] = true;
            }
            if (
$number_cols_cat == $counter) {
                
$categories[$i]['linebreak'] = true;
                
$counter                     0;
            }
            
$keywords[] = $albumsAll[$i]->getVar('alb_name');

    
$alTarget WGGALLERY_URL '/images.php?op=list';
    
$alThumb = (=== $idxAlblist);
    if (
$gallery) {
        
$target WGGALLERY_URL '/gallery.php?op=show';
    }    
    
$albumlist '<ol class="wgg-alblist-ol">';
    
$albumlist .= $albumsHandler->getListChildsOfCollectionIndex($categories[$i]['alb_id'], $alTarget$alThumb);
    
$albumlist .= '</ol>';
    
$GLOBALS['xoopsTpl']->assign('albumlist'$albumlist);

        }
wggallery_categoryitem_simple.tpl
<class='' href='index.php?op=list&amp;alb_pid=<{$category.id}>' title='<{$smarty.const._CO_WGGALLERY_COLL_ALBUMS}>'>
<{if 
$category.image}>
    <
div class="simpleContainer center">
           <
img class="img-responsive" src="<{$category.image}>" alt="<{$category.name}>" title="<{$category.name}>">
            <
div class="simpleContent">
                <{if 
$showTitle}><p><{$category.name}></p><{/if}>
                <{if 
$showDesc}><p><{$category.desc}></p><{/if}>
                <!-- <
class="center"><class='btn btn-primary wg-color1' href='index.php?op=list&amp;alb_pid=<{$category.id}>' title='<{$smarty.const._CO_WGGALLERY_COLL_ALBUMS}>'><{$smarty.const._CO_WGGALLERY_COLL_ALBUMS}></a></p> -->
            </
div>
    </
div>
<{/if}>
</
a>   
 <{if 
$albumlist}>
<
div class='wgg-alblist'><{$albumlist}></div>
<{/if}>

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 5308 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 1799 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag