From b9247f1dcccd18bcfa402852f5ab7878cef8d105 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 20 Sep 2010 21:26:18 -0700 Subject: [PATCH] fix layout issues, deletable items and wall-wall --- mod/profile.php | 8 +++++++- view/wall_fake_drop.tpl | 2 ++ view/wallwall_item.tpl | 42 +++++++++++++++++++++-------------------- 3 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 view/wall_fake_drop.tpl diff --git a/mod/profile.php b/mod/profile.php index 0d9c94eed..4adcd29f6 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -249,6 +249,9 @@ function profile_content(&$a, $update = 0) { $tpl = file_get_contents('view/wall_item.tpl'); + $droptpl = file_get_contents('view/wall_item_drop.tpl'); + $fakedrop = file_get_contents('view/wall_fake_drop.tpl'); + if($update) $return_url = $_SESSION['return_url']; else @@ -333,9 +336,12 @@ function profile_content(&$a, $update = 0) { $profile_link = $profile_url; $drop = ''; + $dropping = false; if(($item['contact-id'] == $_SESSION['visitor_id']) || ($item['uid'] == $_SESSION['uid'])) - $drop = replace_macros(file_get_contents('view/wall_item_drop.tpl'), array('$id' => $item['id'])); + $dropping = true; + + $drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id'])); $like = (($alike[$item['id']]) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : ''); diff --git a/view/wall_fake_drop.tpl b/view/wall_fake_drop.tpl new file mode 100644 index 000000000..db34441d5 --- /dev/null +++ b/view/wall_fake_drop.tpl @@ -0,0 +1,2 @@ +
 
+
diff --git a/view/wallwall_item.tpl b/view/wallwall_item.tpl index f3a803543..0ff2ff6f7 100644 --- a/view/wallwall_item.tpl +++ b/view/wallwall_item.tpl @@ -1,25 +1,27 @@
-
- - $owner_name -
-
Wall-To-Wall
-
- - $name -
-
- $name to $owner_name via Wall-To-Wall:
-
$ago
-
$location
- $vote -
-
-
$title
-
$body
-
- $drop +
+
+ + $owner_name +
+
Wall-To-Wall
+
+ + $name +
+
+ $name to $owner_name via Wall-To-Wall:
+
$ago
+
$location
+ $vote +
+
+
$title
+
$body
+
+ $drop +
$dislike