Loading...
 
Features / Usability

Features / Usability


How to print a tracker?

posts: 3630 United States

What's the easiest way to print the contents of a tracker? I'd like to have the printout formatted as the tracker appears, on tiki-view_tracker.php.

-Rick

posts: 1551 Canada

I usually copy & paste the page to an offline editor and reformat everything.

I am also looking forward to a faster solution...

M ;-)

posts: 3630 United States

Faster is on its way... stay tuned!

-Rick

> I usually copy & paste the page to an offline editor and reformat everything.
>
> I am also looking forward to a faster solution...
>
> M ;-)


posts: 3630 United States

OK, this was actually pretty easy to hack together.

  1. Make a copy of tiki-view_tracker.php and rename it to tiki-print_tracker.php.
  2. At the very end of the file, replace these 2 lines:
    $smarty->assign('mid', 'tiki-view_tracker.tpl');
    $smarty->display("tiki.tpl");

    with this line:
    $smarty->display('tiki-print_tracker.tpl');
  3. Make a copy fo tiki-view_tracker.tpl and rename it to tiki-print_tracker.tpl.
    • Add {include file="header.tpl"} at the start of the file.
    • Add {include file="footer.tpl"} at the end of the file.
    • Delete anything that you don't want to appear on "printer formatted" page.


I also created a "printer formatted" version of the tiki-view_tracker_item page. You can see my implementation here. I'm going to do the same thing for the HTML pages, too.

Next: Optimizing the new print.php files — I have feeling I'm making a lot of expensive queries to the DB for things that I'm not using on the "printer formatted" pages. Any optimization experts out there?

-Rick


posts: 36

Hey Rick! Sorry to resurrect an old thread, but I loved the way you implemented that "print this page" button in a "toolbox" in the lower right of your demonstration page here.

Please please please tell me/us how you got that toolbox happening? By now, I'll bet it's a standard feature abd I just haven't found it.

Thanks in advance, -Horch


posts: 36

Self Reply...

Ah Ha! I see that the "toolbox" is part of the tikipedia theme. I also just found that there is a little printer icon on most pages of any theme - but just not in tracker items listings.

So I'll go ahead and try the "here's how..." method above.
Pardon the interruption... (PTI). -H


posts: 4617 Japan

Just to clarify: the Tikipedia Toolbox is the normal wiki page action icons, etc. but moved to the side column (to emulate the Mediawiki layout) from the top right of the page where they display in other themes.

-- Gary