Search found 57 matches

by cangor
Tue Dec 04, 2018 2:20 pm
Forum: Extension Writers Discussion
Topic: Easy way to access config in template?
Replies: 4
Views: 354

Re: Easy way to access config in template?

Thanks for you replys!
by cangor
Tue Dec 04, 2018 10:49 am
Forum: Extension Writers Discussion
Topic: Easy way to access config in template?
Replies: 4
Views: 354

Easy way to access config in template?

Hello, I want to add some javascript-code to every page in my extension, so I put it into: /ext/vendor/myext/styles/all/template/event/overall_footer_body_after.html This works fine. But the code is only needed when a config-var says that it's enabled. So is there something like: {% if (config['scri...
by cangor
Fri Nov 30, 2018 2:47 pm
Forum: Extension Writers Discussion
Topic: Output large log/state in ADM
Replies: 3
Views: 380

Re: Output large log/state in ADM

Thanks for your reply. I already made an extension, my question was more about how to handle large outputs which might take a while to complete. I was thinking for example about using some ajax-calls to handle (lets say) 100 PDFs at a time and then getting information about the progress back to the ...
by cangor
Thu Nov 29, 2018 2:50 pm
Forum: Extension Writers Discussion
Topic: Minimum extension (whats needed just to use some template-events?)
Replies: 4
Views: 333

Re: Minimum extension (whats needed just to use some template-events?)

david63 wrote:
Thu Nov 29, 2018 9:03 am
Almost certainly you have a syntax error in your composer.json
Almost right, I got a typo in the first line in composer.json which didn't exactly match the name of my vender/extension :oops: ... Thanks for putting me into the right direction!
by cangor
Thu Nov 29, 2018 8:04 am
Forum: Extension Writers Discussion
Topic: Minimum extension (whats needed just to use some template-events?)
Replies: 4
Views: 333

Minimum extension (whats needed just to use some template-events?)

Hello, I was trying to create a small "minimum" extension just to override some template events. What files are needed to do so? What I did so far: - added folder /ext/vendor/extensionname/ - added a /ext/vendor/extensionname/composer.json (changed from the https://github.com/phpbb/phpbb-ext-acme-de...
by cangor
Tue Nov 27, 2018 6:12 am
Forum: phpBB Custom Coding
Topic: How to access $_SERVER in config.php?
Replies: 2
Views: 402

Re: How to access $_SERVER in config.php?

Ger wrote:
Mon Nov 26, 2018 2:01 pm
AFAIK, you can access $_SERVER in config.php.
Thanks for your reply. You are right, it works - strange, I could swear it gave an error the last time I tried some time ago. So thanks a lot!
by cangor
Tue Nov 27, 2018 6:10 am
Forum: Extension Writers Discussion
Topic: Output large log/state in ADM
Replies: 3
Views: 380

Output large log/state in ADM

Hello, I'm writing an extension which should change all uploaded pdfs. I need to integrate this into the ADM. So I got a button like "Start working" and then need to output the results, something like: file1 - Ok file2 - Ok file3 - Error file4 - Ok ... would be enough. The script already works, but ...
by cangor
Sat Nov 24, 2018 9:23 am
Forum: phpBB Custom Coding
Topic: How to access $_SERVER in config.php?
Replies: 2
Views: 402

How to access $_SERVER in config.php?

Hello, I'm using phpBB on several servers, but I use only one phpBB-codebase for all servers. So in the config.php, I'm doing something like: if ($_SERVER['HTTP_HOST'] == "example1.com") { // set database for example1.com } else if ($_SERVER['HTTP_HOST'] == "example2.com") { // set database for exam...
by cangor
Wed Nov 21, 2018 7:00 am
Forum: [3.2.x] Styles Support & Discussion
Topic: Using template-events without extension
Replies: 4
Views: 492

Re: Using template-events without extension

Thanks for your replies. I see the way I want to use the events is not intended. I will try to use the normal template-system then. Instead of using the event <!-- EVENT overall_header_navbar_before --> I could as well inherit the style and overwrite navbar_header.html. My problem is that I don't wa...
by cangor
Tue Nov 20, 2018 2:34 pm
Forum: [3.2.x] Styles Support & Discussion
Topic: Using template-events without extension
Replies: 4
Views: 492

Using template-events without extension

Hello, whats the easiest way to get some html into an existing style like prosilver, in this place for example: overall_header.html: <!-- EVENT overall_header_navbar_before --> - I don't want to inherit/overwrite overall_header.html, because when the style is updated, you have to compare your versio...
by cangor
Fri Jan 12, 2018 9:31 pm
Forum: Extension Writers Discussion
Topic: Use template of another extension for acp
Replies: 2
Views: 485

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: 485

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: 572

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: 572

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: 572

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 ...

Go to advanced search