Search found 729 matches

by kasimi
Sat Jan 20, 2018 4:20 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 53
Views: 3221

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

I added an ext.php that checks for this: https://github.com/kasimi/phpbb-ext-twi ... 79d338fd10
by kasimi
Sat Jan 20, 2018 3:57 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 53
Views: 3221

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

Your PHP installation is missing the ZIP extension: https://stackoverflow.com/questions/387 ... t-found-in
by kasimi
Thu Jan 18, 2018 2:39 pm
Forum: [3.2.x] Support Forum
Topic: Spaces in Usernames - surely there is a registration bug
Replies: 24
Views: 642

Re: Spaces in Usernames - surely there is a registration bug

phil_h wrote:
Thu Jan 18, 2018 1:58 pm
And that has got me stumped - the token does not show up in any other files.
The language key is concatenated. Search for USERNAME_DISALLOWED. You should find it twice, in the language file and in root/includes/functions_user.php.
by kasimi
Thu Jan 18, 2018 9:35 am
Forum: Abandoned Extensions
Topic: [ABD] Delete Inactive Users
Replies: 57
Views: 4766

Re: [ABD] Delete Inactive Users

This topic has been marked as [ABD] - Abandoned as the extension author has not been active recently. If the extension author wishes to continue development, please PM anyone on the Extension Customisations Team to request this topic be unlocked. Notice! We do not recommend that a user of the phpBB ...
by kasimi
Sun Jan 14, 2018 8:10 pm
Forum: Extension Writers Discussion
Topic: Parse/render twig template in php
Replies: 4
Views: 173

Re: Parse/render twig template in php

Here's a solution that does service replacement. The code is for phpBB 3.2. The template service in phpBB 3.1 has different arguments. Re-define the template service: template: class: 'foo\bar\my_template' arguments: - '@path_helper' - '@config' - '@template_context' - '@template.twig.environment' -...
by kasimi
Sun Jan 14, 2018 1:10 pm
Forum: Extension Writers Discussion
Topic: Parse/render twig template in php
Replies: 4
Views: 173

Re: Parse/render twig template in php

The code you posted should work fine. Are you getting any errors? For another example, see here: viewtopic.php?p=14875171#p14875171
by kasimi
Thu Jan 11, 2018 10:58 am
Forum: phpBB Custom Coding
Topic: Help with Template.assign_var
Replies: 4
Views: 186

Re: Help with Template.assign_var

The display() method renders the page and sends the reply back to the client. Your code never executes. Move it between load() and display() and it should work.
by kasimi
Thu Jan 11, 2018 10:27 am
Forum: phpBB Custom Coding
Topic: Help with Template.assign_var
Replies: 4
Views: 186

Re: Help with Template.assign_var

Replace

Code: Select all

$template->assign_var('S_APP_REQUIREMENTS', $result);
with

Code: Select all

$post_text = $db->sql_fetchfield('post_text');
$template->assign_var('S_APP_REQUIREMENTS', $post_text);
and refresh your board cache so that your template changes take effect.
by kasimi
Wed Jan 10, 2018 11:15 am
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 229

Re: Change text without changing language-files

The only way to do that is to include the car language file if the user is using the car style, include the garden language file if the user is using the garden style, and so on.
by kasimi
Wed Jan 10, 2018 9:32 am
Forum: Extension Writers Discussion
Topic: Change text without changing language-files
Replies: 9
Views: 229

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 a...
by kasimi
Tue Jan 02, 2018 11:04 am
Forum: Extension Writers Discussion
Topic: Custom notification based on existing one
Replies: 2
Views: 193

Re: Custom notification based on existing one

Yes to both of your questions.
by kasimi
Wed Dec 20, 2017 2:52 pm
Forum: Extension Writers Discussion
Topic: [3.2][RC] Automatic Reload of certain search.php sites
Replies: 11
Views: 454

Re: [3.2][RC] Automatic Reload of certain search.php sites

Your folder structure is wrong. The zip file contents should look like this:

Code: Select all

- heinrichk
    - searchreload
        - config
        - ...
        - composer.json
Also make sure to submit a stable version number. At the moment it says 0.1. Use the format x.y.z with x >= 1.
by kasimi
Mon Dec 18, 2017 9:02 pm
Forum: phpBB Custom Coding
Topic: First visit (session time out) how to check it?
Replies: 1
Views: 205

Re: First visit (session time out) how to check it?

How about this:

Code: Select all

$first_visit = !empty($this->user->data['session_created']);
by kasimi
Fri Dec 15, 2017 4:17 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 53
Views: 3221

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

The messenger class uses template tags that go in the /language/en/email folder, so extensions that do emailing like mine must create them in our extensions. In 3.0 it was not as sophisticated as the full templating system. You could not use loops, for example. Perhaps this is no longer the case. I...
by kasimi
Fri Dec 15, 2017 9:15 am
Forum: Extension Writers Discussion
Topic: [Tutorial] Convert to Twig Syntax
Replies: 39
Views: 5130

Re: [Tutorial] Convert to Twig Syntax

MarkDHamill wrote:
Fri Dec 15, 2017 12:52 am
I have some language files with the old syntax still embedded in it.
There's template syntax embedded in language files? Do you have an example?

Go to advanced search