Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
|
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
|
|
|
Author |
Message |
|
This is just to share what changes I made so that I could approve messages before they appeared. I haven't looked at Lazarus yet. Thanks to Carbonize and all other's messages here that have been of help to me.
This has really helped me keep the spam out and other entries I didn't want. You have to go in and approve the good entries which is high maintenance but I was spending time anyway removing spam. Now nothing goes in without me OK'ing it. Hope this helps someone else.
RJ
-- 1. Use PHPADMIN to create new column called O_K
ALTER TABLE `book_data` ADD `O_K` CHAR( 1 ) DEFAULT 'Y' NOT NULL AFTER `id` ;
-- 2. edit lib/gb.class select statement to add "where O_K='Y' "
-- Change:
-- $result = $this->db->query("select x.*, y.p_filename, y.width, y.height, z.comments from ".$this->db->table['data']." x left join ".$this->db->table['pics']." y on (x.id=y.msg_id and y.book_id=2) left join ".$this->db->table['com']." z on (x.id=z.id) group by x.id order by x.id desc limit $entry, $last_entry");
-- To This:
$result = $this->db->query("select x.*, y.p_filename, y.width, y.height, z.comments from ".$this->db->table['data']." x left join ".$this->db->table['pics']." y on (x.id=y.msg_id and y.book_id=2) left join ".$this->db->table['com']." z on (x.id=z.id) where O_K='Y' group by x.id order by x.id desc limit $entry, $last_entry");
-- 3. Change default value of O_K to 'N' for new entries from now on
ALTER TABLE `book_data` CHANGE `O_K` `O_K` CHAR( 1 ) DEFAULT 'N' NOT NULL;
-- From then on, approve or remove entries using PHPADMIN
-- 1. check for new entries, get only last 25
SELECT * FROM `book_data` WHERE O_K = 'N' order by date
desc limit 25;
-- 2. change value of O_K to 'Y' for rows with good entries
-- 3. delete spam and others you want to get rid of
|
|
|
|
|
|
Based on the open source JForum
|