using "backup" from scratch : update faq from a *.

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
rboulle
Posts: 7
Joined: Mon May 16, 2005 7:53 am
Location: Toulouse
Contact:

using "backup" from scratch : update faq from a *.

Post by rboulle »

Hello,

Thanks a lot to the phpMyFAQ Team for this great job !

The context : I have a FAQ in a LaTeX file and i have written python's scripts to convert into a phpmyfaq sql backup file so that i just need to work on my *.tex file and then stuff the phpmyfaq db with it. You can have a look on the scipts here (use them and criticize them ! ) : http://rboulle.free.fr/jurisedu/faq/src/

The questions :
1/ Instead of "No news is good news." in the startup page, how could i print the last date i have "stuffed" the db with my file ?
2/ after "stuffing the db, is it possible to have still in memory the number of views for the same "id" (it is in the case i don't add any new question of course)[/list]
3/I don't speak german :oops: so somebody could give a link wherre i can download new "style file" pour my faq (a kind of new them) ?

I am using 1.4.8

Thanks a lot.
Rémi Boulle.
Thorsten
Posts: 15727
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: using "backup" from scratch : update faq from

Post by Thorsten »

Hi,
Thanks a lot to the phpMyFAQ Team for this great job !
Thanks a lot and thanks for using phpMyFAQ!
1/ Instead of "No news is good news." in the startup page, how could i print the last date i have "stuffed" the db with my file ?
The message is generated in the function generateNews() in inc/functions.php. It should be easy to add what you want.
2/ after "stuffing the db, is it possible to have still in memory the number of views for the same "id" (it is in the case i don't add any new question of course)
The number of views is stored in a separate table so it should work.
3/I don't speak german :oops: so somebody could give a link wherre i can download new "style file" pour my faq (a kind of new them) ?
What do you mean with a new style file? There is only the default layout... if you can't edit it by yourself I could make it for you.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rboulle
Posts: 7
Joined: Mon May 16, 2005 7:53 am
Location: Toulouse
Contact:

Re: using "backup" from scratch : update faq from

Post by rboulle »

Thanks for your reply.
The number of views is stored in a separate table so it should work.
Yes ok but the matter seems to come from the fact that i write a kind of backup.sql from "scratch" with a file looking like:

Code: Select all

# pmf: faqchanges faqnews faqcategories faqvoting faqdata faqcomments faquser faqvisits faqfragen

# DO NOT REMOVE THE FIRST LINE!
# otherwise this backup will be broken
#
# Table: faqchanges
# Table: faqcomments
# Table: faqdata
INSERT INTO faqdata (......);
# Table: faqnews
# Table: faqcategories
INSERT INTO faqcategories (.....);
# Table: faquser
INSERT INTO faquser (id,name,pass,realname,email,rights) VALUES (.....);
# Table: faqvisits
# Table: faqvoting
# Table: faqfragen
I have the feeling that this erase tables faqvisit and favoting. How could I keep the records of these tables ? (of course if I add new faqdata i will need to erase them anyway). I will try to modify the first line maybe...
3/I don't speak german :oops: so somebody could give a link wherre i can download new "style file" pour my faq (a kind of new them) ?
What do you mean with a new style file? There is only the default layout... if you can't edit it by yourself I could make it for you.
I was thinking at a place where we could find others layout than the default one (wich is nice ! It i just to test others layout). Anyway, i can have a look at the default one and modify it.

Thanks a lot.
Rémi.
Thorsten
Posts: 15727
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: using "backup" from scratch : update faq from

Post by Thorsten »

Hi,

Code: Select all

# pmf: faqchanges faqnews faqcategories faqvoting faqdata faqcomments faquser faqvisits faqfragen

# DO NOT REMOVE THE FIRST LINE!
# otherwise this backup will be broken
#
# Table: faqchanges
# Table: faqcomments
# Table: faqdata
INSERT INTO faqdata (......);
# Table: faqnews
# Table: faqcategories
INSERT INTO faqcategories (.....);
# Table: faquser
INSERT INTO faquser (id,name,pass,realname,email,rights) VALUES (.....);
# Table: faqvisits
# Table: faqvoting
# Table: faqfragen
I have the feeling that this erase tables faqvisit and favoting. How could I keep the records of these tables ? (of course if I add new faqdata i will need to erase them anyway). I will try to modify the first line maybe...
You're right. The first line sets the tables which were deleted. If you're removing faqvoring and faqvisits from the first line, everything should be okay.
I was thinking at a place where we could find others layout than the default one (wich is nice ! It i just to test others layout). Anyway, i can have a look at the default one and modify it.
There was a plan to publish other templates, too. But I don't had the time to do it...

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