Reading a template file

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Reading a template file

Post by marcovo »

I'm working on a [hide]-bbcode extension. Now I'm stuck at a certain piece of code. I want to use a template-file for the resulting HTML of the bbcode, just like the bbcode-class does for some bbcodes (see bbcode.php).

I got that working, but I don't know whether it's really the best way to do this. See this line and thereafter:
https://github.com/marcovo/phpbb_hidebb ... r.php#L215

I'm particularly in doubt about this line:

Code: Select all

$this->template->set_style(array('styles', 'ext/marcovo/hide_bbcode/styles'))
I think the rest shouldn't be much of a problem. But is this line above entirely ok? I guess it is not, because it's overwriting all previously set style-settings in some sort of way I guess. What I would like to do is:

Code: Select all

$this->template->set_style(array('ext/marcovo/hide_bbcode/styles'))
, which would only add[/ic] my directory, instead of replace all entries by my directory. But this doesn't seem to work unfortunately.

Any ideas?

Post Reply

Return to “Extension Writers Discussion”