xoops forums

Forum Index


Board index » All Posts (Arowana)




Arowana

Friend of XOOPS
Posted on: 2011/1/25 6:15
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#1

EXPORT TO PDF

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


Arowana

Friend of XOOPS
Posted on: 2011/1/22 23:45
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#2

Re: Formatting Height

EDIT Removed post testing failed
Arowana


Arowana

Friend of XOOPS
Posted on: 2011/1/22 22:23
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#3

Re: Formatting Height

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


Arowana

Friend of XOOPS
Posted on: 2011/1/22 20:38
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#4

Re: IF Statement in template

<{if $xoops_isuser}> 

Display if logged in  or nothing at all  

    
<{/if}>
Arowana


Arowana

Friend of XOOPS
Posted on: 2011/1/22 20:35
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#5

Re: Formatting Height

Anyone have some ideas?

Sorry pretty stuck here
Arowana


Arowana

Friend of XOOPS
Posted on: 2011/1/22 7:02
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#6

Re: Formatting Height

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


Arowana

Friend of XOOPS
Posted on: 2011/1/22 3:23
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#7

Re: Formatting Height

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


Arowana

Friend of XOOPS
Posted on: 2011/1/22 2:56
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#8

Re: Formatting Height

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


Arowana

Friend of XOOPS
Posted on: 2011/1/22 1:58
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#9

Re: Formatting Height

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

Arowana


Arowana

Friend of XOOPS
Posted on: 2011/1/22 1:49
Arowana
Arowana (Show more)
Friend of XOOPS
Posts: 323
Since: 2004/8/6 2
#10

Re: Formatting Height

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 »