From 97e927bef9e5c69ece8f1c78c5dfe1b16493c842 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Sun, 2 Jan 2011 22:30:30 +1100 Subject: [PATCH] Show locked threads --- inc/config.php | 1 + inc/display.php | 5 ++++- inc/functions.php | 4 ++-- static/locked.gif | Bin 0 -> 423 bytes 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 static/locked.gif diff --git a/inc/config.php b/inc/config.php index 1c6f94b6..6824e71d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -127,6 +127,7 @@ // Static images // These can be URLs OR base64 (data URI scheme) define('IMAGE_STICKY', ROOT . DIR_STATIC . 'sticky.gif', true); + define('IMAGE_LOCKED', ROOT . DIR_STATIC . 'locked.gif', true); define('DELETED_IMAGE', ROOT . DIR_STATIC . 'deleted.png', true); define('ZIP_IMAGE', ROOT . DIR_STATIC . 'zip.png', true); diff --git a/inc/display.php b/inc/display.php index 555b78e8..ddced5c6 100644 --- a/inc/display.php +++ b/inc/display.php @@ -170,7 +170,7 @@ class Thread { public $omitted = 0; - public function __construct($id, $subject, $email, $name, $trip, $body, $time, $thumb, $thumbx, $thumby, $file, $filex, $filey, $filesize, $filename, $ip, $sticky, $root=ROOT, $mod=false) { + public function __construct($id, $subject, $email, $name, $trip, $body, $time, $thumb, $thumbx, $thumby, $file, $filex, $filey, $filesize, $filename, $ip, $sticky, $locked, $root=ROOT, $mod=false) { $this->id = $id; $this->subject = utf8tohtml($subject); $this->email = $email; @@ -190,6 +190,7 @@ $this->posts = Array(); $this->ip = $ip; $this->sticky = $sticky; + $this->locked = $locked; $this->root = $root; $this->mod = $mod; } @@ -281,6 +282,8 @@ ''.$this->id.'' . // Sticky ($this->sticky ? '' : '') . + // Locked + ($this->locked ? '' : '') . // [Reply] ($index ? '[Reply]' : '') . diff --git a/inc/functions.php b/inc/functions.php index 57980283..99b8ac71 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -214,7 +214,7 @@ if($query->rowcount() < 1 && $page > 1) return false; while($th = $query->fetch()) { - $thread = new Thread($th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['body'], $th['time'], $th['thumb'], $th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'], $th['sticky'], $mod ? '?/' : ROOT, $mod); + $thread = new Thread($th['id'], $th['subject'], $th['email'], $th['name'], $th['trip'], $th['body'], $th['time'], $th['thumb'], $th['thumbwidth'], $th['thumbheight'], $th['file'], $th['filewidth'], $th['fileheight'], $th['filesize'], $th['filename'], $th['ip'], $th['sticky'], $th['locked'], $mod ? '?/' : ROOT, $mod); $posts = prepare(sprintf("SELECT `id`, `subject`, `email`, `name`, `trip`, `body`, `time`, `thumb`, `thumbwidth`, `thumbheight`, `file`, `filewidth`, `fileheight`, `filesize`, `filename`,`ip` FROM `posts_%s` WHERE `thread` = ? ORDER BY `time` DESC LIMIT ?", $board['uri'])); $posts->bindValue(1, $th['id']); @@ -407,7 +407,7 @@ while($post = $query->fetch()) { if(!isset($thread)) { - $thread = new Thread($post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['sticky'], $mod ? '?/' : ROOT, $mod); + $thread = new Thread($post['id'], $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $post['sticky'], $th['locked'], $mod ? '?/' : ROOT, $mod); } else { $thread->add(new Post($post['id'], $thread->id, $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename'], $post['ip'], $mod ? '?/' : ROOT, $mod)); } diff --git a/static/locked.gif b/static/locked.gif new file mode 100644 index 0000000000000000000000000000000000000000..d178c7b6e7d11cd779296925cc8a3c59a1f7cc96 GIT binary patch literal 423 zcmV;Y0a*S=Nk%w1VG;lm0M$PLIC;Lgwz5!|(%a_l%ErNErOS88>RzqfOO(%DsoQuvvKZwUohRRl;*0Zpz!oIqwq@lLV+=+&S z*VE2YoYOgh!`|A}_w(;lg33#P$W)-!OM=IJz};@Ygx-@>cm6DD>dbnPz+*_&JSESf{n87r4v^9CRTd3QSj*I{Q z{{R30A^8LW002J#EC2ui01^Na000KWz@KpFD;kGL#+S|nFg>Fh*1OP$0}%lP5gLXX5ezgh14JY>B_$6bA|fFV z1qC%Ee?Ap9D+;0p1|}vcDGdOf6*vk9H#|5h2o4J!C_AhtuRJ^!0tgMaxw{4jzQDo@ z0u;JJo+HP}!NUR`&p*-Aztzmxod6vs3FQ+O9Rd&*;LtJ^2ow(U^bim(**-Zf68$>= R0CmKe(MgZNgFk`*06QTrz7PNa literal 0 HcmV?d00001