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
1 answer

Why is Tinybutstrong Mergeblock giving me the error: 'item before ... is neither an object nor an array. Its type is NULL..'

I am trying to use Tinybutstrong to merge a template with an sql query result. Below is the PHP code being run, the custom database reader plugin I am attempting to use, the template file and the error message.... The code is being run from within a…
M B
  • 1
0
votes
3 answers

Load MS Word 2007 document with TinyButStrong class and no file extension .docx

I try to merge documents, with TBS library, but when I try to load a MS Word 2007 doc with $tbs->LoadTemplate($path_file). It doesn't work, I have no error, but the file generated is corrupted. I know where the problem come from : $path_file has no…
Elorfin
  • 2,487
  • 1
  • 27
  • 50
0
votes
1 answer

How to correctly make conditions in TinyButStrong?

I have to make a template in the TinyButStrong language, but I have no access to the PHP side. I'm just able to modify my template and to upload it on my ERP. Anyway, the PHP side is working well. I tried to put an if statement in my ODT template…
0
votes
1 answer

Prepared statements with TBS

I'm trying to merge the results of a prepared statement to TBS. Here's my code: $s = $link->prepare("SELECT * FROM newsletters WHERE newsletter_id = :newsletter_id"); $s->bindParam(":newsletter_id",$newsletter_id); $s->execute(); $newsletter =…
0
votes
1 answer

Is there an openTBS command to write/update the Notes section of a pptx slide?

I am using openTBS to update a slide deck and need to also update/replace template content in the Notes section. Is there a command that supports that?
Katybird
  • 1
  • 2
0
votes
0 answers

Generated Excel File doesn't have adjusted row heights upon opening

I've got a template with row height set to Auto. When I merge it with cells that have multi-line data, the row heights are not adjusted when I open the merged document. Oddly, the first few rows are not adjusted, but the ones further down in the…
0
votes
2 answers

The best way to append data to an existing worksheet

I have a workbook which is used to summerize invoicing data. Each month new data from my database needs to be added to to a new column on the end of the worksheet. Additionally additional information is added by hand to this worksheet so complete…
0
votes
2 answers

Use tbs to merge multiple records from sql to single block with mergeblock

I am using template docx and tbs template engine to generate document by values from sql. I want to load multiple records from sql dynamically to table I created in template docx which have single block called vm.productname. I want to make rows…
Premlatha
  • 1,676
  • 2
  • 20
  • 40
0
votes
1 answer

OpenTBS - checking against individual options in a checkbox field to insert conditional content per option

In an OpenTBS situation, I'm trying to use conditional blocks to check against each individual option/answer that a user selects in a checkbox field in a form whose data is being used to insert the conditional content. I've asked you about this…
Richard
  • 1
  • 2
0
votes
0 answers

OpenTBS removes spaces with formatted text in docx

I have a docx file with formatted text. After merging a variable, the spaces disappear before and after formatted text in the result document. This is the code I use from the example: include_once('../tbs/tbs_class.php'); // Load the TinyButStrong…
Luc
  • 1
  • 2
0
votes
1 answer

Is it possible to use a subblock on a subblock when creating docx with opentbs?

I am trying to output an array to docx file with opentbs plugin. My array has a nested array so im using a block for the main array with a subblock for the nested array. This works perfectly. My problem is the nested array also has a nested array of…
coinrese
  • 3
  • 1
0
votes
0 answers

using tinybutstrong i can generate docx but it corrupted

i am using laravel and php and tiny-but-strong-world engine i have php file that will generate the docx and i have sample template docx but i got the output like this PK!ߤ?Z [Content_Types].xml ¢( ´??E?·Ub袪*>-R?{V?¼þ¾QU l"%3?3Vƃ?l…
gigas
  • 13
  • 1
  • 6
0
votes
0 answers

Error generating docx with opentbs : the textbox tag disappear

I'm trying to use OpenTBS on my project to generate automatically a Resume using a word template (.docx) the template contains multiple images for the frame of the template. when I try to generate the file with my data, i noticed with the debug…
Matt
  • 1
  • 1
0
votes
1 answer

Can I use a flat data source for DOCX file with grouping or subblocks?

I'm wanting to merge into a DOCX file. I've got a flat list of groups and participants, like this (but with more data elements): $my_data=array( array('group'=>'Monday','name'=>'John Smith'), array('group'=>'Monday','name'=>'Lea Bitto'), …
0
votes
1 answer

How to get tinybutstrong mergeblock with condition working for empty value

I am using tinybutstrong as a templating engine. I am trying to get the active link to display in a different color. The following is my (trimmed down) PHP side: $links = array ( '' => 'Home', 'about' => 'About Us', 'faq' => 'FAQ', …
Michael Frey
  • 908
  • 2
  • 14
  • 35