ullCms gallery with albums
- Create content types
- gallery
- ColumnConfig
- apps/frontend/lib/generator/columnConfigCollection/UllCmsPageGalleryColumnConfigCollection.class.php
-
<?php class UllCmsPageGalleryColumnConfigCollection extends UllCmsPageColumnConfigCollection { protected function applyCustomSettings() { parent::applyCustomSettings(); $this->disableAllExceptCommonHiddenAnd(array( 'titel', 'image', 'gallery', 'sequence', 'duplicate_tags_for_search', )); $this['image'] ->cleanOptions() ->setLabel('Vorschaubild') ->setHelp('Bitte nur Querformat im Format 3:2 verwenden') ->setMetaWidgetClassName('ullMetaWidgetGallery') ->setOption('image_width', 176) ->setOption('image_height', 118) ->setOption('generate_thumbnails', false) ->setOption('single', true) ; $this['gallery'] ->setLabel('Bilder') ->setMetaWidgetClassName('ullMetaWidgetGallery') ->setOption('image_width', 720) ->setOption('image_height', 512) ->setOption('generate_thumbnails', true) ->setOption('thumbnail_width', 180) ->setOption('thumbnail_height', 180) ->setHelp(__('Images are automatically resized. Drag images around to sort.', null, 'ullCmsMessages')) ; $this['sequence'] ->setHelp('Datum der Gallerie als Ganzzahl eingeben. Beispiel für 4.Nov 2012: 20121104. Die Gallerien werden nach diesem Datum sortiert. Neueste zuerst.') ; } }
-
- apps/frontend/lib/generator/columnConfigCollection/UllCmsPageGalleryColumnConfigCollection.class.php
- Action
- apps/frontend/modules/ullCms/actions/actions.class.php
-
... public function executeShowGalleries(sfRequest $request) { $this->setVar('galleries', UllCmsPageTable::findByParentSlug($this->doc->slug), true); $this->allow_edit = UllUserTable::hasPermission('ull_cms_edit'); } ...
-
- apps/frontend/modules/ullCms/actions/actions.class.php
- Templates
- apps/frontend/modules/ullCms/templates/galleriesSuccess.php
-
<?php slot('ull_cms_additional_body') ?> <div id="ull_cms_show_gallery_list"> <?php if ($allow_edit): ?> <div class="ull_cms_show_gallery_list_item inline_editing"> <div class="ull_cms_show_gallery_list_item_image"> <?php echo link_to( '<span class="ultra_big">+</span> Galerie hinzufügen', 'ullCms/create?content_type=gallery&parent_slug=' . $doc->slug, 'class=ull_cms_show_gallery_list_item_add_link' ) ?> </div> </div> <?php endif ?> <?php foreach ($galleries as $gallery): ?> <?php $link = '@ull_cms_show?slug=' . $gallery->slug ?> <div class="ull_cms_show_gallery_list_item"> <div class="ull_cms_show_gallery_list_item_image"> <?php echo link_to( image_tag($gallery->image), $link ) ?> </div> <div class="ull_cms_show_gallery_list_item_text"> <?php echo link_to($gallery->title, $link) ?> </div> </div> <?php endforeach ?> </div>
-
- apps/frontend/modules/ullCms/templates/gallerySuccess.php
-
<?php slot('ull_cms_additional_body') ?> <div id="ull_cms_show_gallery"> <?php $images = ullWidgetGalleryWrite::getImagesAsArray($doc->gallery) ?> <?php foreach ($images as $image): ?> <?php $thumbnail = ullCoreTools::calculateThumbnailPath($image) ?> <div class="gallery_image"> <?php echo link_to(image_tag($thumbnail), $image) ?> </div> <?php endforeach ?> </div> <script type="text/javascript"> jQuery("#ull_cms_show_gallery a").slimbox({ overlayFadeDuration: 200, resizeDuration: 200 }); </script> <?php end_slot() ?> <?php require_once 'showSuccess.php' ?> <?php use_javascript('/ullCorePlugin/js/jq/jquery.slimbox2.min.js') ?> <?php use_stylesheet('/ullCorePlugin/css/jquery.slimbox2/slimbox2.css') ?>
-
- apps/frontend/modules/ullCms/templates/galleriesSuccess.php
- CSS
- web/css/custom_multi_format.css
-
/* GALLERY */
/* galleries */
#ull_cms_show_gallery_list {
overflow: hidden;
}.ull_cms_show_gallery_list_item {
float: left;
margin-right: 3px;
margin-bottom: 1em;
width: 225px;
}.ull_cms_show_gallery_list_item_image {
width: 225px;
height: 155px;
background-image: url("/images/gallery_list_background.png");
background-repeat: no-repeat;
text-align: center;
padding-top: 24px;
}.ull_cms_show_gallery_list_item_image img {
margin-right: 6px;
}.ull_cms_show_gallery_list_item_text {
text-align: center;
}.ull_cms_show_gallery_list_item_add_link {
margin-top: 50px;
display: block;
}/* gallery */
.gallery_image {
float: left;
margin-right: 20px;
margin-bottom: 20px;
border: 1px solid silver;
border-radius: 6px;
box-shadow: 5px 5px 10px silver;
background-color: #eeeeee;
width: 200px;
height: 200px;
text-align: center;
line-height: 200px;
}.gallery_image img {
vertical-align: middle;
}#lbOverlay {
background-color: rgba(119,139,190,1);
}
-
- web/css/custom_multi_format.css