aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2012-01-06 00:42:06 -0800
committerfabrixxm <fabrix.xm@gmail.com>2012-01-06 00:42:06 -0800
commitad02af4e8fe88566ea6255af3fabac6393b1c916 (patch)
treefe66ebfe8ea6a61e2da151766af733a44366c2ff /mod
parentcfe8094b458c62cbab0b79dd957c31dbf60a26c4 (diff)
parenta5a6719283bd246e78427cff82aad951a3db310d (diff)
downloadvolse-hubzilla-ad02af4e8fe88566ea6255af3fabac6393b1c916.tar.gz
volse-hubzilla-ad02af4e8fe88566ea6255af3fabac6393b1c916.tar.bz2
volse-hubzilla-ad02af4e8fe88566ea6255af3fabac6393b1c916.zip
Merge pull request #23 from fabrixxm/master
Theme works
Diffstat (limited to 'mod')
-rw-r--r--mod/photos.php42
1 files changed, 24 insertions, 18 deletions
diff --git a/mod/photos.php b/mod/photos.php
index d2f45652f..7ec6c8794 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1368,30 +1368,36 @@ function photos_content(&$a) {
intval($a->pager['itemspage'])
);
- $o .= '<h3>' . t('Recent Photos') . '</h3>';
- if($can_post) {
- $o .= '<div id="photo-top-links"><a id="photo-top-upload-link" href="'. $a->get_baseurl() . '/photos/'
- . $a->data['user']['nickname'] . '/upload' . '">' . t('Upload New Photos') . '</a></div>';
- }
- $tpl = get_markup_template('photo_top.tpl');
+ $photos = array();
if(count($r)) {
foreach($r as $rr) {
- $o .= replace_macros($tpl,array(
- '$id' => $rr['id'],
- '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
- '$phototitle' => t('View Photo'),
- '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg',
- '$albumlink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
- '$albumname' => template_escape($rr['album']),
- '$albumalt' => t('View Album'),
- '$imgalt' => template_escape($rr['filename'])
- ));
-
+ $photos[] = array(
+ 'id' => $rr['id'],
+ 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
+ 'title' => t('View Photo'),
+ 'src' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg',
+ 'alt' => template_escape($rr['filename']),
+ 'album' => array(
+ 'link' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
+ 'name' => template_escape($rr['album']),
+ 'alt' => t('View Album'),
+ ),
+
+ );
}
- $o .= '<div id="photo-top-end"></div>';
}
+
+ $tpl = get_markup_template('photos_recent.tpl');
+ $o .= replace_macros($tpl,array(
+ '$title' => t('Recent Photos'),
+ '$can_post' => $can_post,
+ '$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['user']['nickname'].'/upload'),
+ '$photos' => $photos,
+ ));
+
+
$o .= paginate($a);
return $o;
}