문제

I'm currently trying out the TinyButStrong library with openTBS plugin to edit an OpenOffice writer template.

If I correctly understand, you can change a default picture to something else using this:

[b.number;ope=changepic;from='pic_[val].png';default=current;adjust]

I tried changing the from='pic_[val].png' to from='example.jpg', this didn't change the picture however.

Anyone knows how to get this working? Help will be greatly appreciated.

도움이 되었습니까?

해결책

Put a fixed value in parameter "from" should force the image (it worked for me).

If your field has been merged (that is it does not appear in the result file) and you have no error message, then having the image unchanged means that the target file cannot be found.

I think the 'example.jpg' file should be placed in the folder with the script that manages TBS and OpenTBS. Otherwise, you have to specify a path.

다른 팁

You don't actually need to the 'from' parameter to just switch a picture out. OpenTBS gets the path of the picture from the first parameter - in your case b.number (which hopefully contains a path to an image). Adjust is also not required, unless you are resizing the picture.

[b.number;ope=changepic;default=current;]

Assuming:

$b->number = '/path/to/image.png'

Also keep in mind, if b.number is a block, you may need to define your block boundary for the data to populate. (If you are able to see the path in the $TBS->PlugIn(OPENTBS_DEBUG_XML_SHOW) mode don't worry about this) Try using [b.number] if you are not sure your data is being processed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top