Search found 47 matches

by cangor
Fri Jan 12, 2018 9:31 pm
Forum: Extension Writers Discussion
Topic: Use template of another extension for acp
Replies: 2
Views: 252

Re: Use template of another extension for acp

Thanks for your reply. Did you click on the PHP tab at the symfony link? Yes: Putting it in __constructor or main of my acp-module, it gives me an exception: GLOBAL $phpbb_container; $phpbb_container->loadFromExtension('child-company/child-extension', array( 'paths' => array( '/ext/parrent-company/p...
by cangor
Fri Jan 12, 2018 2:10 pm
Forum: Extension Writers Discussion
Topic: Use template of another extension for acp
Replies: 2
Views: 252

Use template of another extension for acp

Hello, I'm writing an extension ("child-extension") for another extension ("parent-extension"). Is there a way to re-use the acp-templates in the parent-extension for my child-extension? Of course I could just copy the files, but I would prefer using just the same files so that changes in the parent...
by cangor
Wed Jan 10, 2018 1:03 pm
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 432

Re: Change text without changing language-files

warmweer wrote:
Wed Jan 10, 2018 11:31 am
Still, even with user-defined styles you'll probably have to check whether if your user-defined changes are still applicable after the parent-style was updated (probably yes, but you never know).
You are right. Would be a good world if we run out of work :lol:
by cangor
Wed Jan 10, 2018 10:57 am
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 432

Re: Change text without changing language-files

As David already hinted at, you can put 'GALLERY' => 'My gallery of cars', in a language file of your own extension, use the same event where the Gallery extension loads that language file but with a lower priority so that your event is handled after (or basically any other event that is triggered ...
by cangor
Wed Jan 10, 2018 10:04 am
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 432

Re: Change text without changing language-files

Your reasoning isn't logical in that respect because any update to the style would also overwrite the changes you made. Not if it's an user-defined style. A style can be inherited from a parent style. For example I use "my style", inherited from prosilver, which only contains the changes I made to ...
by cangor
Wed Jan 10, 2018 10:02 am
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 432

Re: Change text without changing language-files

Thanks for your reply.
david63 wrote:
Wed Jan 10, 2018 9:12 am
cangor wrote:
Wed Jan 10, 2018 8:57 am
but updating the extention would overwrite my changes
Npt sure what that means.
If I change the language-file of the extention and update the extention afterwards, the language-file will be replaced with the language-file of the update (replacing my changes as well).
by cangor
Wed Jan 10, 2018 8:57 am
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 432

Change text without changing language-files

Hello, I use an extention (for example phpbb-gallery) and want to change a text in it, for example I want to change 'GALLERY' => 'Gallery' in /ext/phpbbgallery/core/language/en/info_acp_gallery.php to 'GALLERY' => 'My gallery of cars' . Of course I could change the language-file itself inside the ex...
by cangor
Tue Jan 09, 2018 6:05 pm
Forum: Extension Writers Discussion
Topic: Change route without changing .yml? Change RouteCollection?
Replies: 2
Views: 357

Change route without changing .yml? Change RouteCollection?

Hello, is there a way to change a route without changing the routing.yml? For example forum-feeds: $url = $controller_helper->route('phpbb_feed_forum', array('forum_id' => $forum_id)); is defined in config/default/routing/feed.yml as: phpbb_feed_forum: path: /forum/{forum_id} defaults: { _controller...
by cangor
Fri Dec 29, 2017 6:58 pm
Forum: Extension Writers Discussion
Topic: Make extention depending on another extention
Replies: 4
Views: 264

Re: Make extention depending on another extention

Thanks for your reply. I'm not sure whats the way to do it in ext.php. I tried to overwrite public function is_enableable(), but got 2 problems: - I'm not able to give any error-message back to the user (like 'You need to install and enable extention 'anotherext' first before enabling 'myext'") - Th...
by cangor
Fri Dec 29, 2017 10:05 am
Forum: Extension Writers Discussion
Topic: Make extention depending on another extention
Replies: 4
Views: 264

Make extention depending on another extention

Hello, I'm trying to write an extention which only works when another extention is installed. So I wrote a migration like: static public function depends_on() { return array('\phpbb\db\migration\data\v320\dev', '\ext\another\anotherext\migrations\v1' ); } But even when \ext\another\anotherext\migrat...
by cangor
Mon Dec 18, 2017 4:18 pm
Forum: Extension Requests
Topic: Extension for minifying HTML, CSS, JS
Replies: 11
Views: 682

Re: Extension for minifying HTML, CSS, JS

Anything new on this? Google Pagespeed is giving me a hell of a bad rating...
by cangor
Thu Nov 30, 2017 7:40 am
Forum: Extension Writers Discussion
Topic: Fill template in code
Replies: 6
Views: 473

Re: Fill template in code

Exactly what I needed - thanks a lot!
by cangor
Thu Nov 23, 2017 4:46 pm
Forum: Extension Writers Discussion
Topic: Fill template in code
Replies: 6
Views: 473

Re: Fill template in code

The thing is I don't want that the users of my extension have to fiddle with the templates. But I want to offer my extention as flexible as possible so the users of my extension might change MyTemplate.html for their own needs and purposes. Thats the reason for coming up with my own template being "...
by cangor
Thu Nov 23, 2017 4:15 pm
Forum: Extension Writers Discussion
Topic: Fill template in code
Replies: 6
Views: 473

Re: Fill template in code

Thanks for your reply. I want to add some code (styles and javascript) to {$STYLESHEETS} in overall_header.html So what I'm doing now in the event page_footer_after is: $txt = $template->retrieve_var('STYLESHEETS'); $txt .= $mycode; $template->assign_var('STYLESHEETS', $txt); So $mycode contains my ...
by cangor
Thu Nov 23, 2017 3:55 pm
Forum: Extension Writers Discussion
Topic: Fill template in code
Replies: 6
Views: 473

Fill template in code

Hello!

Imagine you have a template like (just an example) in a file:

Code: Select all

This is my {TEMPLATE}. I want to fill in all {DATA}.
Is there a way to give that template and the variables (TEMPLATE, DATA) to phpBB and get the evaluated text back in a php-variable?

Go to advanced search