Search found 667 matches

by kasimi
Sun Jul 16, 2017 6:19 pm
Forum: phpBB Custom Coding
Topic: Request class
Replies: 2
Views: 91

Re: Request class

The constructor of the request class copies the super globals and then disables access to them. In common.php, which you include, the request class is already instantiated. You get the error because you create another instance. Just remove the line. :)
by kasimi
Sat Jul 15, 2017 8:27 am
Forum: Extension Writers Discussion
Topic: [Tutorial] Convert to Twig Syntax
Replies: 26
Views: 1444

Re: [Tutorial] Convert to Twig Syntax

It is recommended to not mix them both. Also have a look at the Twig Converter.
by kasimi
Wed Jul 12, 2017 2:27 pm
Forum: Extension Writers Discussion
Topic: Using Breadcrumbs
Replies: 1
Views: 102

Re: Using Breadcrumbs

Have you tried the code you posted? What exactly isn't working?

Here's another example using routes: https://github.com/phpbb-extensions/pag ... hp#L85-L89
by kasimi
Mon Jul 03, 2017 8:02 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

Thank you both for confirming.

Changes in version 1.1.1:
  • When downloading zip file, set content type explicitly to not rely on php_fileinfo extension
  • When converting a style, don't convert bbcode.html
For the latest download see the link to the GitHub releases in the first post.
by kasimi
Mon Jul 03, 2017 4:56 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

It looks like the textformatter expects bbcode.html to use phpBB template syntax: https://github.com/phpbb/phpbb/blob/release-3.2.0/phpBB/phpbb/textformatter/s9e/factory.php#L508 Here's an idea: before this line , add this code: if ($template_file['filename'] == 'bbcode.html') { continue; } Maybe Jo...
by kasimi
Mon Jul 03, 2017 4:30 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

Your style's bbcode.html is missing or incomplete.
by kasimi
Sun Jul 02, 2017 8:20 am
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

Thanks for testing. With these changes the php_fileinfo extension shouldn't be needed anymore.
by kasimi
Sat Jul 01, 2017 8:53 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

Glad to hear it's useful to others. :) Is it possible to check also the styles -Folder to convert styles without copying them to the ext -folder? There's a new version 1.1.0 that adds support for converting styles. It also fixes a critical directory traversal bug in 1.0.0 that could be used to extra...
by kasimi
Sat Jul 01, 2017 11:05 am
Forum: Extension Writers Discussion
Topic: [Tutorial] Convert to Twig Syntax
Replies: 26
Views: 1444

Re: [Tutorial] Convert to Twig Syntax

I haven't done any performance tests but I'd assume it's negligible for two reasons: As phpBB doesn't differentiate between templates that use phpBB syntax and templates that use Twig syntax, the code that checks for phpBB syntax has to run on all template files, regardless of them using phpBB or Tw...
by kasimi
Sat Jul 01, 2017 9:17 am
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

How about support for selecting individual files/folders? Converting doesn't take long and is done only once, usually. You could just convert all .html files and extract only the ones you need from the zip archive. I don't think adding support for individual files is worth it. could this be used to...
by kasimi
Fri Jun 30, 2017 9:14 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

Re: [3.1][3.2][RC] Twig Converter

I wrote this only today. :P After having written a Python script yesterday with ugly regular expressions that didn't even cover all syntax features, I realized that phpBB does the conversion internally already, so this extension just reuses core code, which means that if your template files with php...
by kasimi
Fri Jun 30, 2017 8:22 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 36
Views: 1058

[3.1][3.2][RC] Twig Converter

Extension Name: Twig Converter Author: kasimi Extension Description: This extension converts template files using phpBB syntax to template files using Twig syntax. It adds a very simple ACP module with a dropdown list of all available extensions. When submitting the form, it downloads a zip file wi...
by kasimi
Fri Jun 30, 2017 6:34 pm
Forum: Extension Writers Discussion
Topic: [Tutorial] Convert to Twig Syntax
Replies: 26
Views: 1444

Re: [Tutorial] Convert to Twig Syntax

No need for nesting:
  • {{ lang('KEY', VALUE) }}
  • {% set newvar = VALUE %}
  • {{ TOTAL - USED }}
  • {% set newval = TOTAL - USED %}
by kasimi
Sat Jun 24, 2017 9:27 am
Forum: Extension Writers Discussion
Topic: Right query for mysql fulltext
Replies: 17
Views: 616

Re: Right query for mysql fulltext

Change the collation of your nick column to utf8_general_ci.
by kasimi
Tue Jun 13, 2017 7:54 pm
Forum: Extension Writers Discussion
Topic: Pass the content of a PHPBB's $config to a JS
Replies: 6
Views: 154

Re: Pass the content of a PHPBB's $config to a JS

Actually it would be this: var monkeyList = new List('test-list', { valueNames: ['name'], page: vendorExt.page, pagination: true }); Well I guess I need just the PAGE var there or? Yes, it was just a pointer in case you needed more variables. :) Strings are sanitized before to and while being assign...

Go to advanced search

cron