Categories > OpenTBS with DOCX >

TinyButStrong Error with PlugIn() method: '16'

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: mpol_ch
Date: 2016-04-24
Time: 14:30

TinyButStrong Error with PlugIn() method: '16'

Hello
I want to use tbs with . docx and I am getting the following error. I can also not open the generated docx documents which are generated.

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\12\libox12\tbs\tbsvorschuss.php on line 314
TinyButStrong Error with PlugIn() method: '16' is an invalid plug-in key, the type of the value is 'integer'.
TinyButStrong Error with PlugIn() method: '80' is an invalid plug-in key, the type of the value is 'integer'.

My using code is:
<?php
include_once('tbs_us/tbs_class.php');
include_once('tbs_plugin_opentbs/tbs_plugin_opentbs.php');


$cnx_id = mysql_connect('localhost','root','');
mysql_select_db('MYDATABASE',$cnx_id);

$sql_ok = ( isset($cnx_id) && is_resource($cnx_id) ) ? 1 : 0;
if ($sql_ok==0) $cnx_id = 'clear'; // makes the block to be cleared instead of merged with an SQL query.

$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);

$Id=$_GET['Id'];
$template = 'vorlagen/vorschuss.docx';
$TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8);

//$TBS->PlugIn(OPENTBS_DEBUG_XML);
//$TBS->PlugIn(OPENTBS_DEBUG_XML+OPENTBS_DEBUG_AVOIDAUTOFIELDS);
//$TBS->Render = OPENTBS_DEBUG_AVOIDAUTOFIELDS;
//$TBS->PlugIn(OPENTBS_DEBUG_CHART_LIST);

$TBS->MergeBlock('b1','mysql',"SELECT * FROM klienten_konto WHERE kkid=$Id");
$output_file_name = str_replace('.', '_'.date('d_m_Y').'.', $template);
$TBS->Show(OPENTBS_DOWNLOAD, $output_file_name);
exit();
//$TBS->Show();
?>

Could you please advice where to start?
mpol_ch
By: Skrol29
Date: 2016-05-05
Time: 23:39

Re: TinyButStrong Error with PlugIn() method: '16'

Hi,

The error message « TinyButStrong Error with PlugIn() method: '16' is an invalid plug-in key, the type of the value is 'integer'. »
seems related to the line
  //$TBS->PlugIn(OPENTBS_DEBUG_XML);
I guess you have this message when the line is uncommented.

The error message « TinyButStrong Error with PlugIn() method: '80' is an invalid plug-in key, the type of the value is 'integer'. »
seems related to the line
  //$TBS->PlugIn(OPENTBS_DEBUG_XML+OPENTBS_DEBUG_AVOIDAUTOFIELDS);

Those commands are noticed as deprecated in the documentation, but in fact there is an error, they can be used only with method Show, like this :
$TBS->Show(OPENTBS_DEBUG_XML);
$TBS->Show(OPENTBS_DEBUG_XML+OPENTBS_DEBUG_AVOIDAUTOFIELDS);