Force ppl to log in?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
Erwin
Posts: 3
Joined: Wed Mar 31, 2004 10:41 am

Force ppl to log in?

Post by Erwin »

Is it possible to have ppl be logged in before they can read/add questions?

I also got a forum so i tried it with security.php

But then i get all sql messages below:
INSERT INTO faqfaqsessions (IP,TIME) VALUES ('213.84.177.90', '1080725904')
SELECT sid FROM faqfaqsessions ORDER BY sid DESC LIMIT 0,1
SELECT rubrik, titel FROM faqfaqrubrik WHERE LENGTH(rubrik) = '3' ORDER BY rubrik
SELECT count(sid) FROM faqfaqsessions WHERE time > '1080725605' GROUP BY ip
SELECT datum, header, artikel, link, linktitel, target FROM faqfaqnews ORDER BY datum desc LIMIT 0,3
SELECT id FROM faqfaqdata WHERE active = 'yes'
SELECT DISTINCT faqfaqdata.id, faqfaqdata.lang, faqfaqdata.thema, faqfaqdata.rubrik, faqfaqvisits.visits FROM faqfaqvisits, faqfaqdata WHERE faqfaqdata.id = faqfaqvisits.id AND faqfaqdata.lang = faqfaqvisits.lang AND faqfaqdata.active = 'yes' ORDER BY faqfaqvisits.visits DESC LIMIT 0,10
SELECT DISTINCT faqfaqdata.id, faqfaqdata.lang, faqfaqdata.rubrik, faqfaqdata.thema, faqfaqdata.datum, faqfaqvisits.visits FROM faqfaqdata, faqfaqvisits WHERE faqfaqdata.id = faqfaqvisits.id AND faqfaqdata.lang = faqfaqvisits.lang AND faqfaqdata.active = 'yes' ORDER BY faqfaqdata.datum desc LIMIT 0,5


8 Queries executed
For the rest it works fine.
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

did you enable the DEBUG MODE in index.php? If yes just turn it off.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Erwin
Posts: 3
Joined: Wed Mar 31, 2004 10:41 am

Post by Erwin »

Code: Select all

define("DEBUG", FALSE);

if (DEBUG == TRUE) {
	error_reporting(E_ALL);
	}
So its off.

When i don't add the security check the website does work normal. So it has issues with that.

But I want a private faq part. :?
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

remove the following lines in index.php:

Code: Select all

if (DEBUG == TRUE) {
	print "<p>".$db->sqllog()."</p>";
	print "<p>".$db->countqueries()." Queries executed</p>";
	}
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Erwin
Posts: 3
Joined: Wed Mar 31, 2004 10:41 am

Post by Erwin »

yeah that fixed it thx =)
jeroen
Posts: 2
Joined: Fri Feb 25, 2005 3:34 pm

Post by jeroen »

I want to do the same to make my FAQ private, only admin can create users, if you don't have a user Id you can't see or answer or whatever on the FAQ.

Is this possible or does someone knows what to change on the code?
Thx :)
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

if you can wait, this will be the main new feature in phpMyFAQ 1.6.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jeroen
Posts: 2
Joined: Fri Feb 25, 2005 3:34 pm

Post by jeroen »

and when will this be released?

I can not really wait a few weeks, that's my problem, and phpmyfaq is the best faq system that I've tried untill now, exept this function :(
Thorsten
Posts: 15759
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'll start the development of phpMyFAQ 1.6 after the release of 1.5...

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