Auto approve new items

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
dougalb
Posts: 3
Joined: Fri Apr 06, 2007 7:04 pm

Auto approve new items

Post by dougalb »

Hi,

I am looking at using phpMyFAQ are our internal company knowledge base. One of the functions, I would like to have is that all users can post content and it is immediately available. So that an Administrator does not need to approve them before they are directly available.

Is this possible?

-Dougal
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

yes, which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dougalb
Posts: 3
Joined: Fri Apr 06, 2007 7:04 pm

Latest 1.6 release

Post by dougalb »

Hi,

I am using latest stable release 1.6.11. Glad to hear this is possible.

-dougal
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

open the file save.php and change the line 54 from

Code: Select all

$db->query(sprintf("INSERT INTO %sfaqdata (id, lang, solution_id, revision_id, active, thema, content, keywords, author, email, comment, datum) VALUES (%d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", SQLPREFIX, $db->nextID(SQLPREFIX."faqdata", "id"), $LANGCODE, getSolutionId(), 0, 'no', $thema, $content, $keywords, $author, $usermail, 'y', $datum));
to

Code: Select all

$db->query(sprintf("INSERT INTO %sfaqdata (id, lang, solution_id, revision_id, active, thema, content, keywords, author, email, comment, datum) VALUES (%d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", SQLPREFIX, $db->nextID(SQLPREFIX."faqdata", "id"), $LANGCODE, getSolutionId(), 0, 'yes', $thema, $content, $keywords, $author, $usermail, 'y', $datum));
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dougalb
Posts: 3
Joined: Fri Apr 06, 2007 7:04 pm

Working

Post by dougalb »

Thank you. That is excellent. A possible feature request to enable that as an option via the configuration page??
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

yes, we'll add this in one of the next releases.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply