Przeglądaj źródła

Show locked threads

tags/v0.9
Savetheinternet 13 lat temu
rodzic
commit
97e927bef9
4 zmienionych plików z 7 dodań i 3 usunięć
  1. +1
    -0
      inc/config.php
  2. +4
    -1
      inc/display.php
  3. +2
    -2
      inc/functions.php
  4. BIN
      static/locked.gif

+ 1
- 0
inc/config.php Wyświetl plik

@@ -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);


+ 4
- 1
inc/display.php Wyświetl plik

@@ -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 @@
'<a class="post_no"' . ($index?'':'onclick="citeReply(' . $this->id . ');"') . 'href="' . ($index?$this->root . $board['dir'] . DIR_RES . $this->id . '.html' . '#q' . $this->id:'javascript:void(0);') . '">'.$this->id.'</a>' .
// Sticky
($this->sticky ? '<img class="icon" title="Sticky" src="' . IMAGE_STICKY . '" />' : '') .
// Locked
($this->locked ? '<img class="icon" title="Locked" src="' . IMAGE_LOCKED . '" />' : '') .
// [Reply]
($index ? '<a href="' . $this->root . $board['dir'] . DIR_RES . $this->id . '.html">[Reply]</a>' : '') .


+ 2
- 2
inc/functions.php Wyświetl plik

@@ -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));
}


BIN
static/locked.gif Wyświetl plik

Przed Po
Szerokość: 18  |  Wysokość: 18  |  Rozmiar: 423B

Ładowanie…
Anuluj
Zapisz