1
Arowana
EXPORT TO PDF
  • 2011/1/25 6:15

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


Has anyone dev a module that has export to PDF included with it?

I want to add this function to xRoster and just wondering what the best way to go about it.

Is there a module that already can export from the database to PDF using different templates?

Thanks
Arowana



2
Arowana
Re: Formatting Height
  • 2011/1/22 23:45

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


EDIT Removed post testing failed
Arowana



3
Arowana
Re: Formatting Height
  • 2011/1/22 22:23

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


What is wrong with this function? Willing to hirer someone at this point, anyone got a few minutes that can program this function?

function getHeight($height){
    global 
$xoopsDB;
    
$query 'SELECT height FROM ' $xoopsDB->prefix('xRoster') . ' WHERE id =id';
    
$inches $height 12;
    
$feet = ($height $height_inches) / 12
}
Arowana



4
Arowana
Re: IF Statement in template
  • 2011/1/22 20:38

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


<{if $xoops_isuser}> 

Display if logged in  or nothing at all  

    
<{/if}>
Arowana



5
Arowana
Re: Formatting Height
  • 2011/1/22 20:35

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


Anyone have some ideas?

Sorry pretty stuck here
Arowana



6
Arowana
Re: Formatting Height
  • 2011/1/22 7:02

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


can this be put into common.inc.php as a function?
$height_inches $height 12
$height_feet 
= ($height $height_inches) / 12

If Yes, how would you right the function

xRoster = sql table
height = sql row

function getHeight{
$height_inches $height 12;
$height_feet = ($height $height_inches) / 12;
}
Arowana



7
Arowana
Re: Formatting Height
  • 2011/1/22 3:23

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


red,

I have got the select list and the value that goes into the database is in inches. So that is done No problem there.

Now to convert it back when you read it from the database is what I am after. Right now it reads in inches because that is what is in the database.

I tried using the convert code from mamba and it created a blank white page.

Anyone else got a snip of code for this process? my database table is named height

and

What code would be needed in the template / Display page to make this work?
Arowana



8
Arowana
Re: Formatting Height
  • 2011/1/22 2:56

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


That is exactly what I want to do I just do not know how to do it.

I tried adding the function from mamba to my common.inc.php file but I got a blank white page
Arowana



9
Arowana
Re: Formatting Height
  • 2011/1/22 1:58

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


When I did just the test field and put 5' 4" the database table filled with 0

Arowana



10
Arowana
Re: Formatting Height
  • 2011/1/22 1:49

  • Arowana

  • Friend of XOOPS

  • Posts: 323

  • Since: 2004/8/6 2


So if I used a select field
like
<select name="height">
        <
option selected="selected" value=""></option>
        <
option value="53">4'5"</option>
        <option value="54">4'
6"</option>
</select>


and stored the VALUE in the database
Then on the template converted the VALUE to feet / inches

how do I write it

Sorry not a programmer but if you say the file name of a module and what woudl go in the file I should be able to figure it out.

Thanks this is the last piece to my puzzle

my database table is "height"
Arowana




TopTop
(1) 2 3 4 ... 27 »



Login

Who's Online

274 user(s) are online (171 user(s) are browsing Support Forums)


Members: 0


Guests: 274


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits