Categories > TinyButStrong general >

Large system integration?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: nathangray
Date: 2006-12-05
Time: 20:22

Large system integration?

Two parts:
1.  How can I get rid of global variables (not allowed) and just pass in an associative array for [var.] or
2.  Get non-var replacement in OOo headers and footers?
By: Skrol29
Date: 2006-12-05
Time: 20:27

Re: Large system integration?

Hi,

1. :
  http://www.tinybutstrong.com/support.php#faq_limit_variables

2. : what do you mean by "non-var replacement" ?
By: nathangray
Date: 2006-12-05
Time: 20:35

Re: Large system integration?

$TBS = new clsTinyButStrong('','allowed_vars');
That appears to take a string, the name of an array, rather than an array.
I assume that means the array with that name needs to be global.
I'm hoping for:
$data = array();
$data['name'] = 'me';
$data['date'] = date('U');

$TBS = new clsTinyButStrong('', $data);

As for 2, there is a restriction that only variables of the style [var.name] in an OpenOffice.org document will be replaced, instead of [data.name] (using a MergeBlock).
By: Skrol29
Date: 2006-12-07
Time: 03:06

Re: Large system integration?

Hi,

Yes you're write. It must be the name of a global variable.
In fact, to be exact, this feature limits the names of Var fields with a prefixes. So all this is about global variables (Var fields are for global variables).

But you can also stop all global variables using this feature, and  just allow your own values using :
HTML:
[mine.xxx]
PHP:
$TBS->MergeField('mine',$data)

By: Skrol29
Date: 2006-12-07
Time: 03:09

Re: Large system integration?

> As for 2, there is a restriction that only variables of the
> style [var.name] in an OpenOffice.org document will be replaced,
> instead of [data.name] (using a MergeBlock).

I'm sorry, I don't well understand this question.
Var fields are merged automatically in both tbsOOO and TBS standard.
MergeBlock() works the same way in the two versions.

But tbsOOo is still under TBS version 2.05.
We are working on an upgrade for TBS 3.