Developer's Guide ?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
KMprototype
Posts: 2
Joined: Wed Oct 26, 2005 2:10 pm

Developer's Guide ?

Post by KMprototype »

Hi Thorsten :)
Is there a developer's guide somewhere, or any document that would help a "flat" PHP developer understand how your application is coded ? Should I go to PEAR's site and learn about templates and parsing ? (Are you using a PEAR package, by the way ?) :?
I mean, changing the colors and layout using the two files that are suggested in the user's guide is pretty easy and could be guessed without the guide. But understanding globally how the program works is another story. And it is a pre-requisite for feeling confident enough to adopt your great application and administrate with high volumes of FAQs... and contribute to making it better.
Maybe I am not looking in the right place ?
Thank you so much for your work, because most other open source FAQs on the Internet are plain shareware-type bugged simplistic high-school level crap.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

unfortunatly there is no developer guide for phpMyFAQ. This is something I wanted to do for a long time but I didn't find the time to write such a guide.

I don't use any PEAR package because of the PHP license.

A good start is to look at the database classes and the functions file inc/function.php.

The whole system is rather easy designed but some parts are a little bit complex like the category or the pdf class.

If you have further questions just send me an e-mail.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
KMprototype
Posts: 2
Joined: Wed Oct 26, 2005 2:10 pm

Post by KMprototype »

Thank you Thorsten, I had better study the code as far as I can first, and document the application myself in the process. I do not want to waste your valuable time.
Just one point though, about templates. I see that there is a dedicated class, where "tpl" are read as text files, and a mere string replace changes the variables to their actual values, before a final Output command sends all to the client. Because it is hard for beginners to know what comes from you and what comes from standard PHP or additional libs, I would like to ask you if you coded the template system yourself instead of using any template system available on the market ? If yes, weren't you worried about performance, since this is always an issue ? And finally, is there a way to use block statements, or not ?
I notice that SHTML "include" statements cannot be used in templates because they have to be processed by the server.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
I do not want to waste your valuable time.
you don't waste my time! :-)
Just one point though, about templates. I see that there is a dedicated class, where "tpl" are read as text files, and a mere string replace changes the variables to their actual values, before a final Output command sends all to the client. Because it is hard for beginners to know what comes from you and what comes from standard PHP or additional libs, I would like to ask you if you coded the template system yourself instead of using any template system available on the market ? If yes, weren't you worried about performance, since this is always an issue ? And finally, is there a way to use block statements, or not ?
I notice that SHTML "include" statements cannot be used in templates because they have to be processed by the server.
I wrote the template system by myself because I don't like Smarty (it's too fat IMHO) and I can not use PEAR packages like PEAR::Template_IT. Currently, there's no support for block statements.

About performance: I think the performance of the template engine is quite good because we're using only str_replace(), which is really a fast function in PHP.

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