aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/bbcode.php6
-rw-r--r--include/photos.php8
-rw-r--r--view/theme/redbasic/css/style.css5
3 files changed, 14 insertions, 5 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index a8372d728..477436475 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -684,7 +684,11 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
}
// Check for centered text
if (strpos($Text,'[/center]') !== false) {
- $Text = preg_replace("(\[center\](.*?)\[\/center\])ism", "<div style=\"text-align:center;\">$1</div>", $Text);
+ $Text = preg_replace("(\[center\](.*?)\[\/center\])ism", "<div style=\"text-align:center;\">$1</div>", $Text);
+ }
+ // Check for footer
+ if (strpos($Text,'[/footer]') !== false) {
+ $Text = preg_replace("(\[footer\](.*?)\[\/footer\])ism", "<div class=\"wall-item-footer\">$1</div>", $Text);
}
// Check for list text
$Text = str_replace("[*]", "<li>", $Text);
diff --git a/include/photos.php b/include/photos.php
index be18600de..5dd5f3c62 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -300,7 +300,7 @@ function photo_upload($channel, $observer, $args) {
$activity_format = sprintf(t('%1$s posted %2$s to %3$s','photo_upload'), $author_link, $photo_link, $album_link);
- $summary = $activity_format . "\n\n" . (($args['body']) ? $args['body'] . "\n\n" : '');
+ $summary = (($args['body']) ? $args['body'] : '') . '[footer]' . $activity_format . '[/footer]';
$obj_body = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']'
. $tag . z_root() . "/photo/{$photo_hash}-{$scale}." . $ph->getExt() . '[/zmg]'
@@ -391,8 +391,8 @@ function photo_upload($channel, $observer, $args) {
$arr['deny_cid'] = $ac['deny_cid'];
$arr['deny_gid'] = $ac['deny_gid'];
$arr['verb'] = ACTIVITY_POST;
- $arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
- $arr['object'] = json_encode($object);
+ $arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
+ $arr['object'] = json_encode($object);
$arr['tgt_type'] = ACTIVITY_OBJ_ALBUM;
$arr['target'] = json_encode($target);
$arr['item_wall'] = 1;
@@ -400,7 +400,7 @@ function photo_upload($channel, $observer, $args) {
$arr['item_thread_top'] = 1;
$arr['item_private'] = intval($acl->is_private());
$arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $arr['mid'];
- $arr['body'] = $summary;
+ $arr['body'] = $summary;
// this one is tricky because the item and the photo have the same permissions, those of the photo.
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index f4fa0415c..5dca2785c 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1243,6 +1243,11 @@ img.mail-conv-sender-photo {
font-size: $font_size;
}
+.wall-item-footer {
+ font-size: $body_font_size;
+ margin-top: 2em;
+}
+
.wall-item-content-wrapper {
background-color: $item_colour;
border-top-right-radius: $radiuspx;