remove prettyphoto from core - this will affect the enhanced photo albums feature on the short term which has been disabled until we figure out how to make the setting per-theme instead of a core option. The library is still available in core (library/prettyphoto) currently but needs to be moved to theme js and loaded/accessed from there [for themes which use it]. Then the library will be removed. It appears that other lightboxes commonly use rel= to group photo albums. So we may provide a generic rel= tag in photo album templates so that the choice of lightbox or album viewer is not only a theme option but could also be accomplished with plugins.

This commit is contained in:
friendica 2013-12-26 13:08:16 -08:00
parent 152ed96379
commit c59688553c
6 changed files with 17 additions and 27 deletions

View file

@ -24,7 +24,9 @@ function get_features() {
array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles')),
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel')),
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders')),
array('prettyphoto', t('Enhanced Photo Albums'), t('Enable photo album with enhanced features')),
// prettyphoto has licensing issues and will no longer be provided in core -
// in any event this setting should probably be a theme option or plugin
// array('prettyphoto', t('Enhanced Photo Albums'), t('Enable photo album with enhanced features')),
//FIXME - needs a description, but how the hell do we explain this to normals?
array('sendzid', t('Extended Identity Sharing'), t(' ')),
array('expert', t('Expert Mode'), t('Enable Expert Mode to provide advanced configuration options')),

View file

@ -817,25 +817,24 @@ function photos_content(&$a) {
$ext = $phototypes[$rr['type']];
if($a->get_template_engine() === 'internal') {
$imgalt_e = template_escape($rr['filename']);
$desc_e = template_escape($rr['description']);
}
else {
$imgalt_e = $rr['filename'];
$desc_e = $rr['description'];
}
$imgalt_e = $rr['filename'];
$desc_e = $rr['description'];
// prettyphoto has potential license issues, so we can no longer include it in core
// The following lines would need to be modified so that they are provided in theme specific files
// instead of core modules for themes that wish to make use of prettyphoto. I would suggest
// the feature as a per-theme display option and putting the rel line inside a template.
if(feature_enabled($a->data['channel']['channel_id'],'prettyphoto')){
$imagelink = ($a->get_baseurl() . '/photo/' . $rr['resource_id'] . '.' . $ext );
$rel=("prettyPhoto[pp_gal]");
}
else {
// if(feature_enabled($a->data['channel']['channel_id'],'prettyphoto')){
// $imagelink = ($a->get_baseurl() . '/photo/' . $rr['resource_id'] . '.' . $ext );
// $rel=("prettyPhoto[pp_gal]");
// }
// else {
$imagelink = ($a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/image/' . $rr['resource_id']
. (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''));
$rel=("photo");
}
// }
$o .= replace_macros($tpl,array(
'$id' => $rr['id'],

View file

@ -1,4 +1,3 @@
{{include file="prettyphoto.tpl"}}
<div class="photo-album-image-wrapper{{$twist}}" id="photo-album-image-wrapper-{{$id}}">
<a href="{{$photolink}}" class="photo-album-photo-link" id="photo-album-photo-link-{{$id}}" title="{{$phototitle}}" rel="{{$rel}}">
<img src="{{$imgsrc}}" alt="{{$imgalt}}" title="{{$phototitle}}" class="photo-album-photo lframe resize" id="photo-album-photo-{{$id}}" />

View file

@ -1,5 +1,3 @@
{{include file="prettyphoto.tpl"}}
<div id="live-display"></div>
<h3><a href="{{$album.0}}">{{$album.1}}</a></h3>

View file

@ -1,6 +0,0 @@
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>

View file

@ -1,5 +1,3 @@
{{include file="prettyphoto.tpl"}}
{{if $pages}}
<div id="pagelist-content-wrapper" class="generic-content-wrapper">
@ -8,7 +6,7 @@
<div class="page-list-item">
{{if $edit}}<a href="{{$baseurl}}/{{$item.url}}" title="{{$edit}}"><i class="icon-pencil design-icons design-edit-icon"></i></a> {{/if}}
{{if $view}}<a href="page/{{$channel}}/{{$item.title}}" title="{{$view}}"><i class="icon-external-link design-icons design-view-icon"></i></a> {{/if}}
{{if $preview}}<a href="page/{{$channel}}/{{$item.title}}?iframe=true&width=80%&height=80%" rel="xprettyPhoto[iframesx]" title="{{$preview}}"><i class="icon-eye-open design-icons design-preview-icon"></i></a> {{/if}}
{{if $preview}}<a href="page/{{$channel}}/{{$item.title}}?iframe=true&width=80%&height=80%" title="{{$preview}}" class="webpage-preview" ><i class="icon-eye-open design-icons design-preview-icon"></i></a> {{/if}}
{{$item.title}}
</div>
{{/foreach}}