Support ⇒ Dragonfly CMS v10 ⇒ Content searchable? ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDragonfly CMS v10

Content searchable? Reply to topic


Can we make the content module searchable?
I have a lot of good info in there that I would like members to be able to search.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Oh, I see it's meant to be searchable. It doesn't seem to work for me.

Test Signature

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Fixed.

@@ -43,8 +43,8 @@ $sql = "SELECT pid, cid, title, UNIX_TIMESTAMP(ctime) AS time, LEFT(text, 256) AS short_text FROM {$db->TBL->pages} WHERE active = 1"; if ($cat != 0) $sql .= " AND cid=$cat"; - if ($search != '') $sql .= " AND (title LIKE '%$search%' OR page_header LIKE '%$search%' OR page_footer LIKE '%$search%' OR page_footer LIKE '%$search%' OR signature LIKE '%$search%' OR text LIKE '$search')"; - $sql .= " ORDER BY date DESC LIMIT $first," . ($limit + 1) . ""; + if ($search != '') $sql .= " AND (title LIKE '%$search%' OR page_header LIKE '%$search%' OR page_footer LIKE '%$search%' OR signature LIKE '%$search%' OR text LIKE '%$search%')"; + $sql .= " ORDER BY ctime DESC LIMIT " . ($limit + 1) . " OFFSET " . $first . ""; $res = $db->query($sql); $nrows = $res->num_rows;

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by hybrid on Thu Apr 27, 2017 7:02 am; edited 1 time in total

All times are UTC


Jump to: