Questions tagged [tinybutstrong]

TinyButStrong is a template engine for PHP.

TinyButStrong is a template engine for PHP. It can merge not only HTML, but also XML, text, and any textual source by the technical of template. Provided in a single file, TinyButStrong is a brick in your application, and can be inserted in any framework. It can thus cover only one feature or being a central component of your application.

TinyButStrong can be empowered by the plug-in OpenTBS in order to merge OpenOffice, LibreOffice and Microsoft Office documents.

159 questions
0
votes
2 answers

Merging Sub blocs on 3 levels with TinyButStrong template engine

The final goal is to merge write OpenDocument with OPENTBS. But I haven't managed to merge 3 levels blocks on an html template to test. There is the code of that test below. Could you explain me what is wrong? The first and the second level of data…
O.Hot
  • 1
  • 1
0
votes
1 answer

merge watermark in OpenTBS/TinyButStrong

I am successfully using OpenTBS to merge data in MS-Word files. How can I conditionally display a watermark in OpenTBS? Using the [TBS tag] syntax in the watermark text does not work.
Marco
  • 1
0
votes
1 answer

In OpenTBS demo an image is replaced, where in code is this done?

I have problem to understand how to manage the image replace. So I look into the demo project (demo_ms_word.php) but I can't find the PHP code where definition and the actual image replace is…
0
votes
1 answer

Nodata use with parentgrp

I am using parentgrp to organize tab data. I have 4 tabs. I have an array of data sorted by status (which correlates with the tab name...active inactive etc). Was wondering the best way to display a no data message if one of the groups has no data.…
0
votes
1 answer

TinyButStrong OpenTBS include output of one template into other Sub Templating

we are using TinyButStrong and OpenTbs to prepare word (docx) documents from templates. We basically need to process several sub-templates (based on what user selected) and then merge all as table rows into the main template. So basically we need…
Jack
  • 99
  • 5
0
votes
1 answer

Multiple Parameters for Onformat

I cannot get TBS to merge one of the fields I reference as a parameter to a function. The eventid gets merged, but eventdate does not. Any thoughts on why? [blk.mp3filename; onformat=f_constructPath; year=[blk.eventdate; frm='YYYY'; noerr];…
user5919866
  • 69
  • 1
  • 8
0
votes
1 answer

TinyButStrong Set font color in table rows

Is there a way to set the font color in table rows? I'm using the PHP class of tbs and ODT documents. It would be perfect to be able setting individual colors to each row. But I don't know if it's possible. I have a HTML table with different colors…
Martin
  • 59
  • 1
  • 6
0
votes
1 answer

opentbs error in docx file

My .docx file created with opentbs is unreadable. It contains the tags that causes the error. When I delete them the file is ok I added this code to force the removal of tags but they are still in my file $bookmark = array('w:bookmarkStart',…
0
votes
1 answer

TinyButStrong: TBS object accessing one global variable but not the other

I have a base template that then builds sub-templates. Template side:
{onload;file={var.flag;if [val]=1;then 'nav.tpl';else ''}}
{onload;file={var.templatePath}}
So the main tag is…
k.wig
  • 39
  • 1
  • 7
0
votes
1 answer

Unable to generate the same table twice

I got a weird bug today and it seems that you can't use 2 times (or more) the same table with the same data in a document. Screenshots below use the following data: $first_event = [ "first_date" => "22/06/2018", "last_date" =>…
Lama
  • 136
  • 10
0
votes
1 answer

Conditional display within a merged block

I am trying to get conditional display to work properly. What I am attempting to do is: Within a block that has been merged, if a value is empty I want to display an input box along with a few other hidden variables I need to carry along with it,…
Peter
  • 3
  • 1
0
votes
1 answer

Nested conditionals or some such

I need to do something like: [onshow;if [onload.project.sortBy]='Id';then if [onload.project.sortAscending]=1;then '↓';else '↑'] But, perhaps as expected, ↑ is always displayed. What's the alternative here? Thank you and be well.
user1908746
0
votes
2 answers

How to apply background color to the Excel cell in OpenTBS?

I cannot figure out how to apply background color to the cell in OpenTBS. I've tried Word's syntax but it did not work. [row.cell.val][row.cell.bg;att=w:shd#w:fill] Code in PHP (simplified) $rs = [ // ... 'cell' => [ 'val' => 5, …
0
votes
2 answers

tiny but strong: remove unused fields

I use TBS and OpenTBS for parsing office templates in a PHP script. Files of type rtf or txt are processed with TBS and those of types docx or pptx with OpenTBS. The merged files are used in an office context for letters, submissions and the lot, so…
patmin
  • 117
  • 1
  • 10
0
votes
1 answer

Tiny but strong russian issue

Plugin Used : http://www.tinybutstrong.com/plugins.php Russian characters are not displaying correctly. In mysql database they are stored correctly collation is utf8_general_ci. I used define('OPENTBS_ALREADY_UTF8','already_utf8');