Loading...
 
Skip to main content

Features / Usability


Print Author and version

Hello,
I need to print the author and version pages. Is it possible?
Thanks

SCG wrote:

Hello,
I need to print the author and version pages. Is it possible?
Thanks


UP
Do anyone have any advice? thanks


SCG wrote:

Hello,
I need to print the author and version pages. Is it possible?
Thanks


Well, this need experimenting but for sure, you can use a module to display the version of a page. AuthorS is something that is a little more complex. There are options in Tiki about "contributors" that display differently this information. The few times I had such request from I ended using the plugin list in a custom module to fit the customer's need.

Good luck

Bernard Sfez / Tiki Specialist wrote:

Well, this need experimenting but for sure, you can use a module to display the version of a page. AuthorS is something that is a little more complex. There are options in Tiki about "contributors" that display differently this information. The few times I had such request from I ended using the plugin list in a custom module to fit the customer's need.

Good luck


Sorry but... how do you add a module visible in printed page? Thanks in advance

SCG wrote:
Sorry but... how do you add a module visible in printed page? Thanks in advance


Create a custom module.
Place it on the pagebottom and set visibility (only wiki pages for exemple)
Add in it display media for print query.

If you use Tiki25 or 26 : https://getbootstrap.com/docs/5.3/utilities/display/#display-in-printQuestion
(we have an admin media selector for modules but I think it is still experimental 🤷🏻‍♂️)

Bernard Sfez / Tiki Specialist wrote:

Create a custom module.
Place it on the pagebottom and set visibility (only wiki pages for exemple)
Add in it display media for print query.

If you use Tiki25 or 26 : https://getbootstrap.com/docs/5.3/utilities/display/#display-in-printQuestion
(we have an admin media selector for modules but I think it is still experimental 🤷🏻‍♂️)


I'm using tiki 24... How can I Add in it display media for print query ?
Thanks...


SCG wrote:

Hello,
I need to print the author and version pages. Is it possible?
Thanks


I would start with something like this in your custom module.

Copy to clipboard
{DIV(class="d-none d-print-block")} ||__Page Name:__ |__Version: __ __ Last Author:__ |__ Last Mod. Date:__ __ Approved by:__ | __Approval Date:__ || {DIV}


The d-none class will hide the content on screen.
The d-print-block will unhide the content on printing.

Martin H. wrote:

Image
You can use a header like this:

Page Name: Version:
Last Author: Last Mod. Date:
Approved by: Approval Date:

Image
It works with argument variables:
https://doc.tiki.org/Wiki-Argument-VariablesQuestion


Hi Martin, it's exactly my goal but my poor knowledge doesn't allow me to understand where to insert the code you wrote... obviously not modifying the print.tpl template! So where? How?
Consider I don't want to insert it on every single page but as a model
Thanks in advance

SCG wrote:
obviously not modifying the print.tpl template! So where? How?


Trivial mode:
You can add it at the bottom of each page where you want it to be display.

Advanced mode:
Use it as a custom module: /tiki-admin_modules.php
Place this wiki syntax on a custom module and have this custom module set to the "pagebottom" area.
There, you have a lot of options to control when it should be used or not.
(if this should be only printed then again use the bootstrap print styles)

Bernard Sfez / Tiki Specialist wrote:

Trivial mode:
(if this should be only printed then again use the bootstrap print styles)


THIS IS the part i'm missing... suggestions are accepted!
Thanx

Martin H. wrote:

I would start with something like this in your custom module.

Copy to clipboard
{DIV(class="d-none d-print-block")} ||__Page Name:__ |__Version: __ __ Last Author:__ |__ Last Mod. Date:__ __ Approved by:__ | __Approval Date:__ || {DIV}


I meant... it doesn't work to me. Ok the module is hidden on the page, but it doesn't show on printing.
Not sure if these errors coulb be useful to debug:
NOTICE (E_NOTICE): Undefined variable: approval
At line 1964 in lib/parser/parserlib.php
NOTICE (E_NOTICE): Trying to access array offset on value of type null
At line 1964 in lib/parser/parserlib.php
The d-none class will hide the content on screen.
The d-print-block will unhide the content on printing.



Brilliantly solved by my network engineer.

In footer.tpl edit as follow
{* when we are on a page to be printed open the print dialog auto-magically *}
{if !empty($print_page) and $print_page eq "y"}


$(document).ready(function(){
print();
});

{/if}

Then in wiki/templates create firmaprint.tpl

{wiki}{literal}

Page_name: Version:
Author: Last date mod:
Approved by: Approval date:

{/literal}{/wiki}