Revision [7436]
This is an old revision of JamesMcl made by JamesMcl on 2005-04-21 07:33:53.
As you've probably guessed my name is James and I'm from Edinburgh in Scotland.
I am interested in Wikka following on from my brief experience with Wakka, which now appears to be defunct.
Wakka like Wikka was being developed to include similar features to those that are being discussed and developed on this site. One developer was TomG who had managed to develop the code to include user groups, e-mail, registration and administration functions.
One of Tom's sites can be seen at Soul Dynamics
Hi James. Any progress on generating a PDF file output from wikka? -- Mike Bowen (GmBowen)
- Sorry Mike, no progress as yet as I've got other things to do at the moment. My lack of programming skills doesn't help although I have had success using the class without wikka. It shouldn't be too difficult though. Basically you have a file which includes the FPDF Class and queries the database. The problem is restricting the results to the latest page and presumably reversing the wikka markup to show bold etc. I could e-mail you an example file if you would like, need your e-mail address though.
- Have a look at this example Mike.
As you can see it picks the Page Name and Content fromm the database alright. The script needs a little refinement to format the page layout correctly and as I said earlier to restrict the results set from the sl query. The code is below.
<?php define('FPDF_FONTPATH','font/'); require('mysql_table.php'); class PDF extends PDF_MySQL_Table { function Header() { //Title $this->SetFont('Arial','',18); $this->Cell(0,6,'Wikka Output To PDF',0,1,'C'); $this->Ln(10); //Ensure table header is output parent::Header(); } } //Connect to database mysql_connect('localhost','user','password'); mysql_select_db('dbname'); $pdf=new PDF(); $pdf->Open(); $pdf->AddPage(); //First table: put all columns automatically $pdf->Table('select tag,body from main_wikka_pages'); $pdf->AddPage(); //Second table: specify 2 columns, $pdf->AddCol('tag',50,'tag','C'); $pdf->AddCol('body',50,'body','C'); $prop=array('HeaderColor'=>array(255,150,100), 'color1'=>array(210,245,255), 'color2'=>array(255,255,210), 'padding'=>2); //$pdf->Table('select tag,body from main_wikka_pages order by tag limit 0,10',$prop); $pdf->Output(wikka,I); ?>
CategoryUsers