From 73f9d06e3e28e9146eb82254d5dcd2ccd497aff9 Mon Sep 17 00:00:00 2001 From: Rabuzarus Date: Thu, 25 Dec 2014 16:20:55 +0100 Subject: [PATCH 01/17] move some html code from photos.php to photo_album.tpl --- mod/photos.php | 50 ++++++++++++++++++++-------------- view/templates/photo_album.tpl | 17 ++++++++++-- 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 605f6153ae..8fc26d9858 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1211,25 +1211,18 @@ function photos_content(&$a) { else { if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) { if($can_post) { - $o .= ''; + $edit = array(t('Edit Album'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '/edit'); } } } if($_GET['order'] === 'posted') - $o .= ''; + $order = array(t('Show Newest First'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album)); else - $o .= ''; + $order = array(t('Show Oldest First'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($album) . '?f=&order=posted'); + $photos = array(); - if($can_post) { - $o .= ''; - } - - - $tpl = get_markup_template('photo_album.tpl'); if(count($r)) $twist = 'rotright'; foreach($r as $rr) { @@ -1248,19 +1241,34 @@ function photos_content(&$a) { $imgalt_e = $rr['filename']; $desc_e = $rr['desc']; } + + $rel=("photo"); - $o .= replace_macros($tpl,array( - '$id' => $rr['id'], - '$twist' => ' ' . $twist . rand(2,4), - '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'] + $photos[] = array( + 'id' => $rr['id'], + 'twist' => ' ' . $twist . rand(2,4), + 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''), - '$phototitle' => t('View Photo'), - '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.' .$ext, - '$imgalt' => $imgalt_e, - '$desc'=> $desc_e - )); - + 'rel' => $rel, + 'title' => t('View Photo'), + 'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.' .$ext, + 'alt' => $imgalt_e, + 'desc'=> $desc_e, + 'ext' => $ext, + 'hash'=> $rr['resource_id'], + ); } + + $tpl = get_markup_template('photo_album.tpl'); + $o .= replace_macros($tpl, array( + '$photos' => $photos, + '$album' => $album, + '$can_post' => $can_post, + '$upload' => array(t('Upload New Photos'), $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/upload/' . bin2hex($album)), + '$order' => $order, + '$edit' => $edit + )); + $o .= '
'; $o .= paginate($a); diff --git a/view/templates/photo_album.tpl b/view/templates/photo_album.tpl index 20162a91a2..882070d20d 100644 --- a/view/templates/photo_album.tpl +++ b/view/templates/photo_album.tpl @@ -1,8 +1,19 @@ +

{{$album}}

+{{if $edit}} + +{{/if}} + +{{if $can_post}} + +{{/if}} + +{{foreach $photos as $photo}}
- - {{$imgalt}} -

{{$desc}}

+
+ {{if $photo.album.name}}{{$photo.album.name}}{{elseif $photo.desc}}{{$photo.desc}}{{elseif $photo.alt}}{{$photo.alt}}{{else}}{{$photo.unknown}}{{/if}} +

{{$photo.desc}}

+{{/foreach}} \ No newline at end of file From 432cf6f2ce26b8a3b8271476a5a58b94b2024b15 Mon Sep 17 00:00:00 2001 From: Rabuzarus Date: Thu, 25 Dec 2014 16:31:52 +0100 Subject: [PATCH 02/17] insert new line at the end --- view/templates/photo_album.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/photo_album.tpl b/view/templates/photo_album.tpl index 882070d20d..770eaf14cf 100644 --- a/view/templates/photo_album.tpl +++ b/view/templates/photo_album.tpl @@ -16,4 +16,4 @@
-{{/foreach}} \ No newline at end of file +{{/foreach}} From cb47fdfcb9f61fd3c6b0c308448e66481482aafb Mon Sep 17 00:00:00 2001 From: Rabuzarus Date: Fri, 26 Dec 2014 03:32:21 +0100 Subject: [PATCH 03/17] minor change: rel should not be part of the PHP --- mod/photos.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index 8fc26d9858..2521a1cf0b 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1242,14 +1242,11 @@ function photos_content(&$a) { $desc_e = $rr['desc']; } - $rel=("photo"); - $photos[] = array( 'id' => $rr['id'], 'twist' => ' ' . $twist . rand(2,4), 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : ''), - 'rel' => $rel, 'title' => t('View Photo'), 'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] . '.' .$ext, 'alt' => $imgalt_e, From f59e574068e1bab0345fb66a6e9877871f755040 Mon Sep 17 00:00:00 2001 From: Rabuzarus Date: Fri, 26 Dec 2014 12:54:23 +0100 Subject: [PATCH 04/17] removed Pagination --- mod/photos.php | 1 - 1 file changed, 1 deletion(-) diff --git a/mod/photos.php b/mod/photos.php index 2521a1cf0b..d3300c8005 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1267,7 +1267,6 @@ function photos_content(&$a) { )); $o .= '
'; - $o .= paginate($a); return $o; From 5939a8cea59dd94ee18704c955666c3d0083989f Mon Sep 17 00:00:00 2001 From: Rabuzarus Date: Fri, 26 Dec 2014 14:44:48 +0100 Subject: [PATCH 05/17] revert last commit f59e574, remove some html code --- mod/photos.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index d3300c8005..003bcd9150 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1183,8 +1183,6 @@ function photos_content(&$a) { intval($a->pager['itemspage']) ); - $o .= '

' . $album . '

'; - if($cmd === 'edit') { if(($album !== t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== t('Contact Photos'))) { if($can_post) { @@ -1266,7 +1264,7 @@ function photos_content(&$a) { '$edit' => $edit )); - $o .= '
'; + $o .= paginate($a); return $o; From 0b0c574385091c812324296a2065f03f0cfdd4a5 Mon Sep 17 00:00:00 2001 From: Silke Meyer Date: Sun, 28 Dec 2014 14:50:43 +0100 Subject: [PATCH 06/17] Fixed a small typo --- doc/Home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Home.md b/doc/Home.md index 6020f2c01c..b0220bc169 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -10,7 +10,7 @@ Friendica Documentation and Resources * [BBCode tag reference](help/BBCode) * [Comment, sort and delete posts](help/Text_comment) * [Profiles](help/Profiles) -* You and other user +* You and other users * [Connectors](help/Connectors) * [Making Friends](help/Making-Friends) * [Groups and Privacy](help/Groups-and-Privacy) From a72d60f481e221354ed61152c6ab07899660d9e9 Mon Sep 17 00:00:00 2001 From: hauke Date: Sun, 28 Dec 2014 15:48:24 +0100 Subject: [PATCH 07/17] Added h-card and functionality for IndieAuth/Web-sign-in --- view/templates/profile_vcard.tpl | 24 ++++++++++----------- view/theme/vier/templates/profile_vcard.tpl | 16 +++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/view/templates/profile_vcard.tpl b/view/templates/profile_vcard.tpl index 4ec3cdf3c7..e72d25371d 100644 --- a/view/templates/profile_vcard.tpl +++ b/view/templates/profile_vcard.tpl @@ -1,39 +1,39 @@ -
+
-
{{$profile.name}}
+
{{$profile.name}}
{{if $pdesc}}
{{$profile.pdesc}}
{{/if}} {{if $profile.picdate}} -
{{$profile.name}}
+
{{$profile.name}}
{{else}} -
{{$profile.name}}
+
{{$profile.name}}
{{/if}} {{if $profile.network_name}}
{{$network}}
{{$profile.network_name}}
{{/if}} {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address}}
{{/if}} - {{$profile.locality}}{{if $profile.locality}}, {{/if}} - {{$profile.region}} - {{$profile.postal_code}} + {{$profile.locality}}{{if $profile.locality}}, {{/if}} + {{$profile.region}} + {{$profile.postal_code}} - {{if $profile.country_name}}{{$profile.country_name}}{{/if}} + {{if $profile.country_name}}{{$profile.country_name}}{{/if}}
{{/if}} - {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} + {{if $gender}}
{{$gender}}
{{$profile.gender}}
{{/if}} - {{if $profile.pubkey}}{{/if}} + {{if $profile.pubkey}}{{/if}} {{if $marital}}
{{$marital}}
{{$profile.marital}}
{{/if}} - {{if $homepage}}
{{$homepage}}
{{$profile.homepage}}
{{/if}} + {{if $homepage}}
{{$homepage}}
{{$profile.homepage}}
{{/if}} {{include file="diaspora_vcard.tpl"}} diff --git a/view/theme/vier/templates/profile_vcard.tpl b/view/theme/vier/templates/profile_vcard.tpl index 669acbef7f..644c3d7e5d 100644 --- a/view/theme/vier/templates/profile_vcard.tpl +++ b/view/theme/vier/templates/profile_vcard.tpl @@ -1,15 +1,15 @@ -
+
-
{{$profile.name}}
+
{{$profile.name}}
{{if $profile.edit}}
{{$profile.edit.1}}