From 3b5656db543462ec1f126d0d97b1ee1ba25c782e Mon Sep 17 00:00:00 2001 From: deva Date: Sun, 26 Oct 2008 20:53:16 +0000 Subject: Added no-cache pragma. Fixed indentation in forum code. --- forum/utils/contacts.php | 6 +++++- forum/utils/forums.php | 10 +++++----- forum/utils/posts.php | 10 +++++----- forum/utils/threads.php | 10 +++++----- forum/utils/view.php | 10 +++++----- 5 files changed, 25 insertions(+), 21 deletions(-) (limited to 'forum/utils') 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 "
\n"; - echo "
gid . "\">" . $this->name . " - ".sizeof($this->contacts)." contacts (". sprintf("%d", sizeof($this->contacts) - $ness)." hidden)
\n"; + echo "
gid . "\">" . $this->name . ""; + if(!$client_is_mobile_device) + echo " - ".sizeof($this->contacts)." contacts (". sprintf("%d", sizeof($this->contacts) - $ness)." hidden)"; + echo "
\n"; echo "
\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 "
"; - if($this->newStuff) echo "
"; - else echo "
"; - echo "fid . "\">" . $this->name . ""; - echo "
"; + echo "
\n"; + if($this->newStuff) echo "
\n"; + else echo "
\n"; + echo " fid . "\">" . $this->name . "\n"; + echo "
\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 . "
\n"; - echo parse("\n------------------\n" . $user->signature, $indent . " ") . "\n"; + echo parse("------------------\n" . $user->signature, $indent . " ") . "\n"; echo $indent . "
\n"; } echo $indent . "
\n"; @@ -184,7 +184,7 @@ class Posts { public function show() { global $current_user; - echo "

" . $this->thread->name . "

"; + echo "

" . $this->thread->name . "

\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 "

Back to the top

"; + echo "

Back to the top

\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 "
"; - if($this->lastseen[$current_user->uid] < $this->lastpost) echo "
"; - else echo "
"; - echo "" . $this->name . ""; - echo "
"; + echo "
\n"; + if($this->lastseen[$current_user->uid] < $this->lastpost) echo "
"; + else echo "
\n"; + echo " " . $this->name . "\n"; + echo "
\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 @@ "; +echo "
"; if($fid) echo "forums"; if($tid) echo ":: threads"; if($pid) echo ":: posts"; @@ -12,15 +12,15 @@ echo "
\n"; $posts = new Posts($FORUMS_DIR . "/" . $fid . "/" . $tid . ".xml"); $posts->show(); } else if($fid) { - echo "

Threads

"; - echo "New thread"; + echo "

Threads

\n"; + echo " New thread\n"; include_once("threads.php"); $threads = new Threads($FORUMS_DIR . "/" . $fid); $threads->show(); } else { - echo "

Forums

"; + echo "

Forums

\n"; include_once("forums.php"); $forums = new Forums($FORUMS_DIR . "/forums.xml"); -- cgit v1.2.3