diff options
Diffstat (limited to 'forum/utils')
-rw-r--r-- | forum/utils/contacts.php | 6 | ||||
-rw-r--r-- | forum/utils/forums.php | 10 | ||||
-rw-r--r-- | forum/utils/posts.php | 10 | ||||
-rw-r--r-- | forum/utils/threads.php | 10 | ||||
-rw-r--r-- | forum/utils/view.php | 10 |
5 files changed, 25 insertions, 21 deletions
diff --git a/forum/utils/contacts.php b/forum/utils/contacts.php index a83e3f5..7458108 100644 --- a/forum/utils/contacts.php +++ b/forum/utils/contacts.php @@ -130,13 +130,17 @@ class ContactGroup { public function showshort() { + global $client_is_mobile_device; $ness = 0; foreach($this->contacts as $contact) { if($contact->essential) $ness += 1; } echo " <div class=\"contactgroup\">\n"; - echo " <div class=\"title\"><a href=\"?mode=addressbook&gid=" . $this->gid . "\">" . $this->name . "</a> - ".sizeof($this->contacts)." contacts (". sprintf("%d", sizeof($this->contacts) - $ness)." hidden)</div>\n"; + echo " <div class=\"title\"><a href=\"?mode=addressbook&gid=" . $this->gid . "\">" . $this->name . "</a>"; + if(!$client_is_mobile_device) + echo " - ".sizeof($this->contacts)." contacts (". sprintf("%d", sizeof($this->contacts) - $ness)." hidden)"; + echo "</div>\n"; echo " <div class=\"contacts\">\n"; foreach($this->contacts as $contact) { if($contact->essential) $contact->showshort(); diff --git a/forum/utils/forums.php b/forum/utils/forums.php index 1ee2eb9..1827e3c 100644 --- a/forum/utils/forums.php +++ b/forum/utils/forums.php @@ -16,11 +16,11 @@ class Forum { public function show() { - echo "<div class=\"forum\">"; - if($this->newStuff) echo "<div class=\"new\"></div>"; - else echo "<div class=\"nonew\"></div>"; - echo "<a href=\"?fid=" . $this->fid . "\">" . $this->name . "</a>"; - echo "</div>"; + echo " <div class=\"forum\">\n"; + if($this->newStuff) echo " <div class=\"new\"></div>\n"; + else echo " <div class=\"nonew\"></div>\n"; + echo " <a href=\"?fid=" . $this->fid . "\">" . $this->name . "</a>\n"; + echo " </div>\n"; } public function Forum($fid, $name) diff --git a/forum/utils/posts.php b/forum/utils/posts.php index e9a5d1d..3a2ecc5 100644 --- a/forum/utils/posts.php +++ b/forum/utils/posts.php @@ -45,7 +45,7 @@ class Post { return $result; } - public function show($indent = "", $recurse = true) + public function show($indent = " ", $recurse = true) { global $users, $fid, $tid, $current_user, $client_is_mobile_device; $user = $users->getUser($this->user); @@ -72,7 +72,7 @@ class Post { echo parse($this->message, $indent . " ") . "\n"; if($user->signature != "\n " && $user->signature != "") { echo $indent . " <div class=\"signature\">\n"; - echo parse("\n------------------\n" . $user->signature, $indent . " ") . "\n"; + echo parse("------------------\n" . $user->signature, $indent . " ") . "\n"; echo $indent . " </div>\n"; } echo $indent . " </div>\n"; @@ -184,7 +184,7 @@ class Posts { public function show() { global $current_user; - echo "<h1 id=\"top\">" . $this->thread->name . "</h1>"; + echo " <h1 id=\"top\">" . $this->thread->name . "</h1>\n"; /* // Recursive foreach($this->posts as $post) { @@ -194,14 +194,14 @@ class Posts { // Linear foreach($this->posts_linear as $post) { - $post->show("", false); + $post->show(" ", false); } $this->thread->lastseen[$current_user->uid] = time(); $this->write(); - echo "<p><a href=\"#top\">Back to the top</a></p>"; + echo " <p><a href=\"#top\">Back to the top</a></p>\n"; } private function recurser($parentpost, $element) diff --git a/forum/utils/threads.php b/forum/utils/threads.php index e3f0996..f65a1f8 100644 --- a/forum/utils/threads.php +++ b/forum/utils/threads.php @@ -20,11 +20,11 @@ class Thread { public function show() { global $fid, $current_user; - echo "<div class=\"thread\">"; - if($this->lastseen[$current_user->uid] < $this->lastpost) echo "<div class=\"new\"></div>"; - else echo "<div class=\"nonew\"></div>"; - echo "<a href=\"?fid=" . $fid . "&tid=" . $this->tid . "\">" . $this->name . "</a>"; - echo "</div>"; + echo " <div class=\"thread\">\n"; + if($this->lastseen[$current_user->uid] < $this->lastpost) echo " <div class=\"new\"></div>"; + else echo " <div class=\"nonew\"></div>\n"; + echo " <a href=\"?fid=" . $fid . "&tid=" . $this->tid . "\">" . $this->name . "</a>\n"; + echo " </div>\n"; } private function loadLastSeen($lastseen) diff --git a/forum/utils/view.php b/forum/utils/view.php index 9ff3143..d22c8d8 100644 --- a/forum/utils/view.php +++ b/forum/utils/view.php @@ -1,5 +1,5 @@ <?php -echo "<div class=\"navigation\">"; +echo " <div class=\"navigation\">"; if($fid) echo "<a href=\"?\">forums</a>"; if($tid) echo ":: <a href=\"?fid=" . $fid . "\">threads</a>"; if($pid) echo ":: <a href=\"?fid=" . $fid . "&tid=" . $tid . "\">posts</a>"; @@ -12,15 +12,15 @@ echo "</div>\n"; $posts = new Posts($FORUMS_DIR . "/" . $fid . "/" . $tid . ".xml"); $posts->show(); } else if($fid) { - echo "<h1>Threads</h1>"; - echo "<a href=\"?mode=editor&task=new&fid=".$fid. - "&tid=".time()."&pid=-1\">New thread</a>"; + echo " <h1>Threads</h1>\n"; + echo " <a href=\"?mode=editor&task=new&fid=".$fid. + "&tid=".time()."&pid=-1\">New thread</a>\n"; include_once("threads.php"); $threads = new Threads($FORUMS_DIR . "/" . $fid); $threads->show(); } else { - echo "<h1>Forums</h1>"; + echo " <h1>Forums</h1>\n"; include_once("forums.php"); $forums = new Forums($FORUMS_DIR . "/forums.xml"); |