add lightbox to usergallery
This commit is contained in:
parent
d674e341e0
commit
ce48db6337
|
@ -1,3 +1,10 @@
|
|||
2.60:
|
||||
-----
|
||||
* Added option for using lightboxes
|
||||
This needs an installed and configured serendipity_event_lightbox plugin
|
||||
The file plugin_usergallery.tpl has changed. Please update your template copy file, if have.
|
||||
|
||||
|
||||
2.58:
|
||||
-----
|
||||
Removed obsolete language attribute. (yellowled)
|
||||
|
|
|
@ -90,3 +90,8 @@
|
|||
|
||||
@define('PLUGIN_EVENT_USERGALLERY_RSS_FEED_BODY', 'Use original blog entry for the picture in RSS-Feed?');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_RSS_FEED_BODY_DESC', 'Falls ausgewählt, wird zu einem Bild aus der Mediendatenbank, das in einem Blog-Eintrag verlinkt wurde, im RSS-Feed auch der Inhalt des Blog-Eintrages ausgegebn, anstatt (Standard) nur einen Link zum Blog-Eintrag und dem ursprünglichen Platz des Bildes.');
|
||||
|
||||
@define('PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_NAME', 'Nutze Lightbox Ausgabe');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_DESC', 'Benötigt ein installiertes Lightbox-Plugin und obige Option: "Einzelbildanzeige" gesetzt als "In Seite einpassen"!');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_LIGHTBOXTYPE_NAME', 'Lightbox-Typ, wie im Lightbox-Plugin gewählt');
|
||||
|
||||
|
|
|
@ -89,3 +89,8 @@
|
|||
@define('PLUGIN_EVENT_USERGALLERY_PAGINATION', 'Seite %s von %s, insgesamt %s Bilder');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_RSS_FEED_BODY', 'Use original blog entry for the picture in RSS-Feed?');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_RSS_FEED_BODY_DESC', 'Falls ausgewählt, wird zu einem Bild aus der Mediendatenbank, das in einem Blog-Eintrag verlinkt wurde, im RSS-Feed auch der Inhalt des Blog-Eintrages ausgegebn, anstatt (Standard) nur einen Link zum Blog-Eintrag und dem ursprünglichen Platz des Bildes.');
|
||||
|
||||
@define('PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_NAME', 'Nutze Lightbox Ausgabe');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_DESC', 'Benötigt ein installiertes Lightbox-Plugin und obige Option: "Einzelbildanzeige" gesetzt als "In Seite einpassen"!');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_LIGHTBOXTYPE_NAME', 'Lightbox-Typ, wie im Lightbox-Plugin gewählt');
|
||||
|
||||
|
|
|
@ -90,10 +90,14 @@
|
|||
@define('PLUGIN_EVENT_USERGALLERY_MEDIA_PROPERTIES_NAME', 'Media properties list');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_MEDIA_PROPERTIES_DESC', 'This is a list of media properties and the name you would like to show for each property on the page. The format of the list is: "ITEM1:Item1;ITEM2:Item2", where each property is separated by semicolons, with the name of the property (as listed in the Configuration settings) first, a colon, and then the name to be displayed.');
|
||||
|
||||
//Several consants used in the template
|
||||
//Several constants used in the template
|
||||
@define('PLUGIN_EVENT_USERGALLERY_IMAGES', 'images');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_PAGINATION', 'Page %s of %s, totaling %s images');
|
||||
|
||||
@define('PLUGIN_EVENT_USERGALLERY_RSS_FEED_BODY', 'Use original blog entry for the picture in RSS-Feed?');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_RSS_FEED_BODY_DESC', 'If enabled, an image of the mediadatabase that has been linked within an blog entry will have the original blog entry\'s body within the RSS feed, instead of (by default) having a simple link to the blog article and the original image location.');
|
||||
?>
|
||||
|
||||
@define('PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_NAME', 'Use lightbox output');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_DESC', 'Needs the lightbox-plugin installed and upper option "Display Single Image" set to "Scaled to fit"!');
|
||||
@define('PLUGIN_EVENT_USERGALLERY_LIGHTBOXTYPE_NAME', 'Lightbox-type as selected in lightbox-plugin');
|
||||
|
||||
|
|
|
@ -1,118 +1,126 @@
|
|||
<script type="text/javascript">
|
||||
{if !$plugin_usergallery_uselightbox}
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function popImage(file_name,file_title,file_width,file_height) {ldelim}
|
||||
if (parseInt(navigator.appVersion.charAt(0))>=4){ldelim}
|
||||
var optBrowser='scrollbars=yes,width='+file_width+',height='+file_height+',toolbar=no,menubar=no,location=no,resize=1,resizable=0';
|
||||
var imgWin=window.open('about:blank','',optBrowser);
|
||||
with (imgWin.document){ldelim}
|
||||
writeln('<html><head><title>Loading...</title>');
|
||||
writeln('<style>body{ldelim}margin:0;padding:0;text-align:center;{rdelim} img{ldelim}border:0px;{rdelim}</style>');
|
||||
writeln('</head>');
|
||||
writeln('<sc'+'ript>');
|
||||
writeln('function doTitle(){ldelim}document.title="'+file_title+'";{rdelim}');
|
||||
writeln('</sc'+'ript>');
|
||||
writeln('<body onload="self.focus();doTitle()">');
|
||||
writeln('<a href="javascript:window.close()"><img src="'+file_name+'" width="'+file_width+'" height="'+file_height+'" alt=""/></a>');
|
||||
writeln('</body></html>');
|
||||
close();
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {ldelim}
|
||||
var optBrowser='scrollbars=yes,width='+file_width+',height='+file_height+',toolbar=no,menubar=no,location=no,resize=1,resizable=0';
|
||||
var imgWin=window.open('about:blank','',optBrowser);
|
||||
with (imgWin.document) {ldelim}
|
||||
writeln('<html><head><title>Loading...</title>');
|
||||
writeln('<style>body{ldelim}margin:0;padding:0;text-align:center;{rdelim}img{ldelim}border:0px;{rdelim}</style>');
|
||||
writeln('</head>');
|
||||
writeln('<sc'+'ript>');
|
||||
writeln('function doTitle(){ldelim}document.title="'+file_title+'";{rdelim}');
|
||||
writeln('</sc'+'ript>');
|
||||
writeln('<body onload="self.focus();doTitle()">');
|
||||
writeln('<a href="javascript:window.close()"><img src="'+file_name+'" width="'+file_width+'" height="'+file_height+'" alt=""/></a>');
|
||||
writeln('</body></html>');
|
||||
close();
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
//-->
|
||||
</script>
|
||||
{/if}
|
||||
|
||||
<div class="serendipity_Entry_Date serendipity_event_usergallery">
|
||||
<div class="serendipity_entry">
|
||||
<h3 class="serendipity_date">{$plugin_usergallery_title}</h3>
|
||||
<h3 class="serendipity_date">{$plugin_usergallery_title}</h3>
|
||||
|
||||
<div class="serendipity_entry_body">
|
||||
<div class="serendipity_gallery_navigation">
|
||||
<a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title}</a>{foreach name="gallery" from=$plugin_usergallery_gallery_breadcrumb item="gallery"} » <a href="{$plugin_usergallery_httppath_extend}gallery={$gallery.path}">{$gallery.name}</a>{/foreach}{if $plugin_usergallery_limit_directory!=""} » <a href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}">{$plugin_usergallery_limit_directory}</a>{/if}
|
||||
<div class="serendipity_gallery_navigation">
|
||||
<a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title}</a>{foreach name="gallery" from=$plugin_usergallery_gallery_breadcrumb item="gallery"} » <a href="{$plugin_usergallery_httppath_extend}gallery={$gallery.path}">{$gallery.name}</a>{/foreach}{if $plugin_usergallery_limit_directory!=""} » <a href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}">{$plugin_usergallery_limit_directory}</a>{/if}
|
||||
</div>
|
||||
{if $plugin_usergallery_preface}
|
||||
<div class="serendipity_preface">{$plugin_usergallery_preface}</div>
|
||||
{/if}
|
||||
<!-- album list -->
|
||||
{if $plugin_usergallery_dir_list eq 'yes'}
|
||||
<ul class="plainList serendipity_gallery_directory">
|
||||
{if $plugin_usergallery_display_dir_tree eq "yes"}
|
||||
<!-- basefolder in treeview -->
|
||||
<!-- considering singular/plural form of "image" depending on the filecount -->
|
||||
<li><a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title} ({$plugin_usergallery_maindir_filecount} {if $plugin_usergallery_maindir_filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{else}
|
||||
{if $plugin_usergallery_toplevel eq 'no'}
|
||||
<!-- 'up-one-level' link in galleries-->
|
||||
<li><a href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_uppath}">{$const.uponelevel} ({$plugin_usergallery_maindir_filecount} {if $plugin_usergallery_maindir_filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{else}
|
||||
<!-- basefolder in listview -->
|
||||
<li><a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title} ({$plugin_usergallery_maindir_filecount} {if $plugin_usergallery_maindir_filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{/if}
|
||||
{/if}
|
||||
<!-- folders -->
|
||||
{foreach name="dir_list" from=$plugin_usergallery_subdirectories item="dir"}
|
||||
<li style="padding-left: {$dir.pxdepth}px;"><a href="{$plugin_usergallery_httppath_extend}gallery={$dir.relpath}">{$dir.name} ({$dir.filecount} {if $dir.filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
<!-- end album list -->
|
||||
{if $plugin_usergallery_pagination}
|
||||
<!-- pagination -->
|
||||
<div class="serendipity_gallery_pagination_top" style="text-align: center">
|
||||
{if $plugin_usergallery_current_page != 1}
|
||||
<a class="prev" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_previous_page}">« {$CONST.PREVIOUS_PAGE}</a>
|
||||
{/if}
|
||||
<div class="serendipity_preface">{$plugin_usergallery_preface}</div>
|
||||
{/if}
|
||||
<!-- album list -->
|
||||
{if $plugin_usergallery_dir_list eq 'yes'}
|
||||
<ul class="plainList serendipity_gallery_directory">
|
||||
{if $plugin_usergallery_display_dir_tree eq "yes"}
|
||||
<!-- basefolder in treeview -->
|
||||
<!-- considering singular/plural form of "image" depending on the filecount -->
|
||||
<li><a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title} ({$plugin_usergallery_maindir_filecount} {if $plugin_usergallery_maindir_filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{else}
|
||||
{if $plugin_usergallery_toplevel eq 'no'}
|
||||
<!-- 'up-one-level' link in galleries-->
|
||||
<li><a href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_uppath}">{$const.uponelevel} ({$plugin_usergallery_maindir_filecount} {if $plugin_usergallery_maindir_filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{else}
|
||||
<!-- basefolder in listview -->
|
||||
<li><a href="{$plugin_usergallery_httppath}">{$plugin_usergallery_title} ({$plugin_usergallery_maindir_filecount} {if $plugin_usergallery_maindir_filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{/if}
|
||||
{/if}
|
||||
<!-- folders -->
|
||||
{foreach name="dir_list" from=$plugin_usergallery_subdirectories item="dir"}
|
||||
<li style="padding-left: {$dir.pxdepth}px;"><a href="{$plugin_usergallery_httppath_extend}gallery={$dir.relpath}">{$dir.name} ({$dir.filecount} {if $dir.filecount == 1}{$CONST.IMAGE}{else}{$CONST.PLUGIN_EVENT_USERGALLERY_IMAGES}{/if})</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
<!-- end album list -->
|
||||
{if $plugin_usergallery_pagination}
|
||||
<!-- pagination -->
|
||||
<div class="serendipity_gallery_pagination_top" style="text-align: center">
|
||||
{if $plugin_usergallery_current_page != 1}
|
||||
<a class="prev" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_previous_page}">« {$CONST.PREVIOUS_PAGE}</a>
|
||||
{/if}
|
||||
<span>({$CONST.PLUGIN_EVENT_USERGALLERY_PAGINATION|@sprintf:$plugin_usergallery_current_page:$plugin_usergallery_total_pages:$plugin_usergallery_total_count})</span>
|
||||
{if $plugin_usergallery_current_page != $plugin_usergallery_total_pages}
|
||||
<a class="next" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_next_page}">{$CONST.NEXT_PAGE} »</a>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- end pagination -->
|
||||
{/if}
|
||||
<!-- images -->
|
||||
{foreach name="column" from=$plugin_usergallery_images item="image"}
|
||||
{if $smarty.foreach.column.first}
|
||||
<div class="serendipity_gallery_row">
|
||||
{/if}
|
||||
<div class="serendipity_gallery_thumbs" style="width: {$plugin_usergallery_colwidth}%;">
|
||||
{if $image.isimage}
|
||||
{if $plugin_usergallery_image_display eq 'popup'}
|
||||
<!-- popup -->
|
||||
<a href="javascript:popImage('{$image.fullimage}','{$image.name}','{$image.dimensions_width}','{$image.dimensions_height}')"><img class="gallery_thumb" {if $plugin_usergallery_fixed_width !=0}height={$plugin_usergallery_fixed_width}px width={$plugin_usergallery_fixed_width}px{/if} src="{$image.link}" alt="" /></a>
|
||||
{else}
|
||||
<!-- show thumb -->
|
||||
<a href="{$plugin_usergallery_httppath_extend}serendipity[image]={$image.id}"><img class="gallery_thumb" {if $plugin_usergallery_fixed_width !=0}height={$plugin_usergallery_fixed_width}px width={$plugin_usergallery_fixed_width}px{/if} style="width: 100%;" src="{$image.link}" alt="" /></a>
|
||||
{/if}
|
||||
{else}
|
||||
<!-- download link -->
|
||||
<a href="{$image.fullimage}" target=blank><img class="gallery_thumb" src="{$image.link}" alt="" /></a><br><a href="{$image.fullimage}" target=blank>Download {$image.name}.{$image.extension}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{if $smarty.foreach.column.last}
|
||||
<!-- last column -->
|
||||
<div style='clear: both;'></div>
|
||||
</div>
|
||||
{else}
|
||||
{if $smarty.foreach.column.iteration is div by $plugin_usergallery_cols}
|
||||
<!-- new column -->
|
||||
<div style='clear: both;'></div>
|
||||
</div>
|
||||
<div class="serendipity_gallery_row">
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<!-- end images -->
|
||||
{if $plugin_usergallery_pagination}
|
||||
<!-- pagination -->
|
||||
<div class="serendipity_gallery_pagination_bottom" style="text-align: center">
|
||||
{if $plugin_usergallery_current_page != 1}
|
||||
<a class="prev" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_previous_page}">« {$CONST.PREVIOUS_PAGE}</a>
|
||||
{/if}
|
||||
{if $plugin_usergallery_current_page != $plugin_usergallery_total_pages}
|
||||
<a class="next" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_next_page}">{$CONST.NEXT_PAGE} »</a>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- end pagination -->
|
||||
{/if}
|
||||
<!-- images -->
|
||||
{foreach name="column" from=$plugin_usergallery_images item="image"}
|
||||
{if $smarty.foreach.column.first}
|
||||
<div class="serendipity_gallery_row">
|
||||
{/if}
|
||||
<div class="serendipity_gallery_thumbs" style="width: {$plugin_usergallery_colwidth}%;">
|
||||
{if $image.isimage}
|
||||
{if $plugin_usergallery_image_display eq 'popup'}
|
||||
<!-- popup -->
|
||||
<a href="javascript:popImage('{$image.fullimage}','{$image.name}','{$image.dimensions_width}','{$image.dimensions_height}')"><img class="gallery_thumb" {if $plugin_usergallery_fixed_width !=0}height={$plugin_usergallery_fixed_width}px width={$plugin_usergallery_fixed_width}px{/if} src="{$image.link}" alt="" /></a>
|
||||
{else}
|
||||
<!-- show thumb -->
|
||||
{if $plugin_usergallery_uselightbox}
|
||||
<a href="{$image.fullimage}" {$plugin_usergallery_lightbox_type}><img class="gallery_thumb" {if $plugin_usergallery_fixed_width !=0}height={$plugin_usergallery_fixed_width}px width={$plugin_usergallery_fixed_width}px{/if} style="width: 100%;" src="{$image.link}" alt="" /></a>
|
||||
{else}
|
||||
<a href="{$plugin_usergallery_httppath_extend}serendipity[image]={$image.id}"><img class="gallery_thumb" {if $plugin_usergallery_fixed_width !=0}height={$plugin_usergallery_fixed_width}px width={$plugin_usergallery_fixed_width}px{/if} style="width: 100%;" src="{$image.link}" alt="" /></a>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
<!-- download link -->
|
||||
<a href="{$image.fullimage}" target=blank><img class="gallery_thumb" src="{$image.link}" alt="" /></a><br><a href="{$image.fullimage}" target=blank>Download {$image.name}.{$image.extension}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{if $smarty.foreach.column.last}
|
||||
<!-- last column -->
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
{else}
|
||||
{if $smarty.foreach.column.iteration is div by $plugin_usergallery_cols}
|
||||
<!-- new column -->
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div class="serendipity_gallery_row">
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
<!-- end images -->
|
||||
{if $plugin_usergallery_pagination}
|
||||
<!-- pagination -->
|
||||
<div class="serendipity_gallery_pagination_bottom" style="text-align: center">
|
||||
{if $plugin_usergallery_current_page != 1}
|
||||
<a class="prev" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_previous_page}">« {$CONST.PREVIOUS_PAGE}</a>
|
||||
{/if}
|
||||
<span>({$CONST.PLUGIN_EVENT_USERGALLERY_PAGINATION|@sprintf:$plugin_usergallery_current_page:$plugin_usergallery_total_pages:$plugin_usergallery_total_count})</span>
|
||||
{if $plugin_usergallery_current_page != $plugin_usergallery_total_pages}
|
||||
<a class="next" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_next_page}">{$CONST.NEXT_PAGE} »</a>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- end pagination -->
|
||||
{/if}
|
||||
</div>
|
||||
{if $plugin_usergallery_current_page != $plugin_usergallery_total_pages}
|
||||
<a class="next" href="{$plugin_usergallery_httppath_extend}gallery={$plugin_usergallery_currentgal}&page={$plugin_usergallery_next_page}">{$CONST.NEXT_PAGE} »</a>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- end pagination -->
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -14,14 +14,14 @@ div.serendipity_gallery_thumbs {
|
|||
}
|
||||
|
||||
div.serendipity_gallery_info {
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
div.serendipity_gallery_entry {
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
@ -37,46 +37,46 @@ div.serendipity_gallery_navigation {
|
|||
}
|
||||
|
||||
img.gallery_thumb {
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
text-align:center;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
div.serendipity_gallery_pagination_top {
|
||||
border-top: 1px solid #ccc;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
|
||||
div.serendipity_gallery_pagination_bottom {
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/* EXIF TAGS */
|
||||
.all_img_info {
|
||||
width: 100%;
|
||||
float: left;
|
||||
text-align: center;
|
||||
margin-bottom: 2em;
|
||||
width: 100%;
|
||||
float: left;
|
||||
text-align: center;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
.exif_info_head {
|
||||
background-color: #ccd9e6;
|
||||
border: 1px solid #fff;
|
||||
background-color: #ccd9e6;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
.exif_info_row, .exif_info_head {
|
||||
clear: both;
|
||||
margin: 0 auto;
|
||||
width: 400px;
|
||||
clear: both;
|
||||
margin: 0 auto;
|
||||
width: 400px;
|
||||
}
|
||||
.exif_info_tag, .exif_info {
|
||||
float: left;
|
||||
display: block;
|
||||
width: 120px;
|
||||
text-align: left;
|
||||
border: 1px solid #fff;
|
||||
background-color: #ccd9e6;
|
||||
padding: 3px;
|
||||
float: left;
|
||||
display: block;
|
||||
width: 120px;
|
||||
text-align: left;
|
||||
border: 1px solid #fff;
|
||||
background-color: #ccd9e6;
|
||||
padding: 3px;
|
||||
}
|
||||
.exif_info {
|
||||
width: 264px;
|
||||
background-color: #eee;
|
||||
width: 264px;
|
||||
background-color: #eee;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<?php #
|
||||
<?php
|
||||
|
||||
if (IN_serendipity !== true) {
|
||||
die ("Don't hack!");
|
||||
|
@ -23,8 +23,8 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
$propbag->add('name', PLUGIN_EVENT_USERGALLERY_TITLE);
|
||||
$propbag->add('description', PLUGIN_EVENT_USERGALLERY_DESC);
|
||||
$propbag->add('stackable', true);
|
||||
$propbag->add('author', 'Arnan de Gans, Matthew Groeninger, and Stefan Willoughby');
|
||||
$propbag->add('version', '2.58');
|
||||
$propbag->add('author', 'Arnan de Gans, Matthew Groeninger, Stefan Willoughby, Ian');
|
||||
$propbag->add('version', '2.60');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'smarty' => '2.6.7',
|
||||
|
@ -39,9 +39,9 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
'frontend_configure' => true
|
||||
));
|
||||
$propbag->add('groups', array('IMAGES'));
|
||||
$propbag->add('configuration', array('title','num_cols','subpage','frontpage','permalink','style','base_directory','dir_list','show_1lvl_sub',
|
||||
'display_dir_tree','dir_tab','images_per_page','image_order','intro','image_display','image_strict','fixed_width','image_width','feed_width','feed_linked_only','feed_body',
|
||||
'exif_show_data', 'exif_data','show_media_properties','media_properties', 'linked_entries'));
|
||||
$propbag->add('configuration', array('title', 'num_cols', 'subpage', 'frontpage', 'permalink', 'style', 'base_directory', 'dir_list', 'show_1lvl_sub',
|
||||
'display_dir_tree', 'dir_tab', 'images_per_page', 'image_order','intro', 'image_display', 'show_lightbox', 'lightbox_type', 'image_strict', 'fixed_width', 'image_width',
|
||||
'feed_width', 'feed_linked_only', 'feed_body', 'exif_show_data', 'exif_data', 'show_media_properties', 'media_properties', 'linked_entries'));
|
||||
}
|
||||
|
||||
function introspect_config_item($name, &$propbag)
|
||||
|
@ -176,6 +176,28 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
}
|
||||
break;
|
||||
|
||||
case 'show_lightbox':
|
||||
$propbag->add('type', 'radio');
|
||||
$propbag->add('name', PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_NAME);
|
||||
$propbag->add('description', PLUGIN_EVENT_USERGALLERY_SHOWLIGHTBOX_DESC);
|
||||
$propbag->add('radio', array('value' => array('true','false'),
|
||||
'desc' => array(YES,NO)));
|
||||
$propbag->add('radio_per_row', '2');
|
||||
$propbag->add('default', 'false');
|
||||
break;
|
||||
|
||||
case 'lightbox_type':
|
||||
$select_type["lightbox"] = 'Lightboxes all';
|
||||
$select_type["prettyphoto"] = 'Prettyphoto';
|
||||
$select_type["thickbox"] = 'Thickbox';
|
||||
$select_type["greybox"] = 'Greybox';
|
||||
$propbag->add('type', 'select');
|
||||
$propbag->add('name', PLUGIN_EVENT_USERGALLERY_LIGHTBOXTYPE_NAME);
|
||||
$propbag->add('description', '');
|
||||
$propbag->add('select_values', $select_type);
|
||||
$propbag->add('default', 'lightbox');
|
||||
break;
|
||||
|
||||
case 'image_strict':
|
||||
if ($this->get_config('style') == 'thumbpage') {
|
||||
$propbag->add('type', 'radio');
|
||||
|
@ -297,7 +319,7 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
case 'media_properties':
|
||||
if ($this->get_config('show_media_properties') == 'yes') {
|
||||
$propbag->add('type', 'string');
|
||||
$propbag->add('name', PLUGIN_EVENT_USERGALLERY_MEDIA_PROPERTIES_NAME);
|
||||
$propbag->add('name', PLUGIN_EVENT_USERGALLERY_MEDIA_PROPERTIES_NAME);
|
||||
$propbag->add('description', PLUGIN_EVENT_USERGALLERY_MEDIA_PROPERTIES_DESC);
|
||||
$propbag->add('default', 'COPYRIGHT:Copyright;TITLE:Title;COMMENT2:Comment');
|
||||
}
|
||||
|
@ -579,7 +601,7 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
}
|
||||
|
||||
if (isset($serendipity['GET']['image'])) {
|
||||
$this->displayImage($serendipity['GET']['image'],$orderby,$order);
|
||||
$this->displayImage($serendipity['GET']['image'], $orderby, $order);
|
||||
} else {
|
||||
$num_cols = $this->get_config('num_cols');
|
||||
$base_directory = $this->get_config('base_directory');
|
||||
|
@ -800,6 +822,13 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
if ($limit_output == $base_directory) {
|
||||
$limit_output = '';
|
||||
}
|
||||
|
||||
$lightbox_type = $this->get_config('lightbox_type');
|
||||
$lbtype = 'rel="lightbox[lightbox_group_entry]"';
|
||||
if ($lightbox_type == 'prettyphoto') $lbtype = 'rel="prettyPhoto[]"';
|
||||
elseif ($lightbox_type == 'thickbox') $lbtype = 'class="thickbox" rel="thickbox_group_entry"';
|
||||
elseif ($lightbox_type == 'greybox') $lbtype = 'rel="gb_imageset[greybox_group_entry]"';
|
||||
|
||||
$serendipity['smarty']->assign(
|
||||
array(
|
||||
'plugin_usergallery_title' => $this->get_config('title'),
|
||||
|
@ -812,6 +841,8 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
'plugin_usergallery_display_dir_tree'=> $display_dir_tree,
|
||||
'plugin_usergallery_colwidth' => round((10/$num_cols*10)-6,2),
|
||||
'plugin_usergallery_limit_directory' => preg_replace('@[^a-z0-9]@i', ' ',$limit_output),
|
||||
'plugin_usergallery_uselightbox' => serendipity_db_bool($this->get_config('show_lightbox', false)),
|
||||
'plugin_usergallery_lightbox_type' => $lbtype,
|
||||
'plugin_usergallery_images' => $process_images
|
||||
)
|
||||
);
|
||||
|
@ -980,7 +1011,7 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
return($exif_data);
|
||||
}
|
||||
|
||||
function displayImage($id,$orderby,$order) {
|
||||
function displayImage($id, $orderby, $order) {
|
||||
global $serendipity;
|
||||
$extended_data = array();
|
||||
$base_directory = $this->get_config('base_directory');
|
||||
|
@ -1080,7 +1111,7 @@ class serendipity_event_usergallery extends serendipity_event
|
|||
if ($this->get_config('show_media_properties','no')=='yes') {
|
||||
if (is_array($extended_data) && isset($extended_data['base_property'])) {
|
||||
$extended_data = array_merge($extended_data['base_property'], (array)$extended_data['base_metadata']);
|
||||
|
||||
|
||||
} else {
|
||||
$extended_data = array();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue