change header

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
rathortushar
Posts: 15
Joined: Sun Oct 31, 2004 12:04 pm

change header

Post by rathortushar »

Hi,
I am a new user of phpMyFAQ.
I have few questions and answers added.
How do i add my own header and footer.

Thanks
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

just edit the template index.tpl and the css file style.css in the directory /template.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rathortushar
Posts: 15
Joined: Sun Oct 31, 2004 12:04 pm

header in pdf generation

Post by rathortushar »

Thanks for the info, actually i wanted to add the header in the pdf generated..

can you guide me.
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this is a little bit complicated. What do you want to add in the header?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rathortushar
Posts: 15
Joined: Sun Oct 31, 2004 12:04 pm

header

Post by rathortushar »

Well,

I wanted to add my name in the document generated :) and also curiuos to learn.

Another question i had was, when i generate the pdf, each page has only one question and answer. How to disable auto page break.

I have tried putting
$pdf->SetAutoPageBreak(false, 0); in pdf.php this does not work ?

help on this ...
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

your name is added in the footer when it's saved in the configuration. The fact that every question and answer has its own page is based on the table of contents.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rathortushar
Posts: 15
Joined: Sun Oct 31, 2004 12:04 pm

header in pdf generation

Post by rathortushar »

How about adding my own text in the header in the pdf generated above the standard question that is printed
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you can add your own text by changing the function Header() in the file admin/expoirt.main.php. How this is done is described here: http://www.fpdf.org/en/tutorial/tuto2.htm

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rathortushar
Posts: 15
Joined: Sun Oct 31, 2004 12:04 pm

header in pdf generation

Post by rathortushar »

That worked :)

Thanks,
Tushar
bene2003
Posts: 7
Joined: Mon Sep 20, 2004 11:34 am

Where to place logo file

Post by bene2003 »

Hi!

I have read your thread about how to add a logo to the PDF output.
I have altered the header function admin/export.main.php to add a logo (see below).

It doesn't work for me.

Where does the logo file have to reside? Is there anything wrong about the code?


function Header() {
global $rubrik, $thema, $tree;
$title = stripslashes($tree->categoryName[$rubrik]["name"]).": ".stripslashes($thema);
//Logo
$this->Image('idea4con.jpg',10,8,33);
$this->SetFont("Arial", "B", 14);
$this->SetDrawColor(182,195,203);
$this->SetFillColor(239,239,239);
$this->SetTextColor(0,0,0);
$this->SetLineWidth(1);
$this->MultiCell(0, 6, $title, 1, 1, "C", 1);
$this->Ln(8);
$this->Bookmark(makeShorterText($thema, 5));

}
Post Reply