1
jmass
Creating a unstyled report
  • 2005/2/2 13:38

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


I am still working on my crappy little time tracking module.

I want to create a report that does not look like my XOOPS site. I already have the module query the DB and get the info. It then poulates a table(html) in my template for display on screen. I then have the template pass the info to a new window vai javascript. The new window has the print styled (no header left column, etc.) report.

This has worked ok until the user put in ' and " into some data fields. This broke the javascript. I now think that there should be a better way.

Any help as to how the tinycontent and other modules do the "printable version" I think this would be a much better way.

2
ackbarr
Re: Creating a unstyled report

here's how we created a printable ticket page in xhelp:

<?php
require('../../mainfile.php');
require_once 
XOOPS_ROOT_PATH.'/class/template.php';
$xoopsTpl = new XoopsTpl();

//Fill each necessary template var using $xoopsTpl->assign()

$tplname 'db:'$name_of_tpl_file;
$xoopsTpl->display($tplname);
?>


And the template was just like every other smarty template, except that it also has to write the HTML <head>, <body> tags:
<html>
<
head>
<
meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<
meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<
meta name="generator" content="XOOPS" />
<
title>Page Title</title>
</
head>

<
body>
[
b][color=008000]Page Content Goes Here[/color][/b]
</
body>
</
html>

3
jmass
Re: Creating a unstyled report
  • 2005/2/2 14:55

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


Thanks!!!

I will give it a try and let you know.

Login

Who's Online

245 user(s) are online (173 user(s) are browsing Support Forums)


Members: 0


Guests: 245


more...

Donat-O-Meter

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

Latest GitHub Commits