Search found 750 matches

by kasimi
Fri Feb 23, 2018 4:32 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 59
Views: 3891

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

Please read one post above yours. This extension is meant to be used by extension developers for an easier transition to Twig. There really is no point in converting all template files of all your styles and extensions if your goal is improving performance because template files are cached. The time...
by kasimi
Wed Feb 21, 2018 10:34 am
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 59
Views: 3891

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

also I am not sure what happens if an extension is already in Twig when you try to convert In this case all files in the zip file are identical to the existing ones. I don't think this feature needs to be added to the extension but this is how you can do it: Find these lines: https://github.com/kas...
by kasimi
Sun Feb 18, 2018 9:52 am
Forum: Extension Writers Discussion
Topic: loading lang file for another user.
Replies: 13
Views: 590

Re: loading lang file for another user.

On second thought, you don't need to do this. Use the template system. After all, the email.txt files are Twig templates. Assign the data to the template before sending the email: $this->template->assign_var('NUMBER', 2); Contents of email.txt : There are {{ lang('HOW_MANY', NUMBER) }}. HOW_MANY is ...
by kasimi
Sat Feb 17, 2018 5:28 pm
Forum: Extension Writers Discussion
Topic: loading lang file for another user.
Replies: 13
Views: 590

Re: loading lang file for another user.

In 3.2 you don't need a new user instance, you can work with the language class: // Inject this if you're in a service $language_loader = $phpbb_container->get('language.loader'); $other_language = new \phpbb\language\language($language_loader); $other_language->set_user_language($sleeper['user_lang...
by kasimi
Fri Feb 09, 2018 10:37 pm
Forum: Extension Writers Discussion
Topic: Extensions and version-check (w/ github)
Replies: 38
Views: 1412

Re: Extensions and version-check (w/ github)

The version_check json contents are not the problem. The script I posted can't even establish a connection, to neither of our json files. I guess it must be an issue on my server.
by kasimi
Fri Feb 09, 2018 9:45 pm
Forum: Extension Writers Discussion
Topic: Extensions and version-check (w/ github)
Replies: 38
Views: 1412

Re: Extensions and version-check (w/ github)

@3Di, I can't fetch your version check file. The output of this script is Error: '' (0) <?php $host = '3d-i.github.io'; $path = '/site/vchecks/hlposts-vcheck.json'; $port = 443; $timeout = 10; $fp = fsockopen("tls://$host", $port, $errno, $errstr, $timeout); if (!$fp) { echo "Error: '$errstr' ($errn...
by kasimi
Fri Feb 09, 2018 6:36 pm
Forum: Extension Writers Discussion
Topic: Extensions and version-check (w/ github)
Replies: 38
Views: 1412

Re: Extensions and version-check (w/ github)

I use github's gh-pages FWIW Yes, gh-pages work fine for me, too (my bad, they don't, same issue there), but my version checks use github.io. Github deactivated tls 1.1. Maybe that is the problem. That's good to know. It does seem to be an issue with the TLS version: When I run openssl s_client -tl...
by kasimi
Fri Feb 09, 2018 5:17 pm
Forum: Extension Writers Discussion
Topic: Extensions and version-check (w/ github)
Replies: 38
Views: 1412

Re: Extensions and version-check (w/ github)

I noticed my GitHub version checks stopped working. When clicking on Details of an affected extension in the ACP Customize tab, I'm seeing this message: Failed to obtain latest version information. The operation could not be completed because the fsockopen function has been disabled or the server be...
by kasimi
Wed Feb 07, 2018 9:51 pm
Forum: Extensions in Development
Topic: [3.2][RC] Log Connections
Replies: 31
Views: 2726

Re: [3.2][RC] Log Connections

The core.auth_login_session_create_before event has a parameter autologin, maybe that's what you're looking for?
by kasimi
Wed Feb 07, 2018 9:31 am
Forum: Extension Writers Discussion
Topic: How to know phpBB version in getSubscribedEvents?
Replies: 9
Views: 255

Re: How to know phpBB version in getSubscribedEvents?

You cannot check if an event exists. phpBB would have to parse all files in your board to find out. You can use the dispatcher service to check if there is a listener registered for a specific event, but there's no generic way to tell if it ever gets triggered, until it does. Which two events are yo...
by kasimi
Sat Feb 03, 2018 6:22 pm
Forum: Extension Writers Discussion
Topic: [Help] Config_Text Usage Problem.
Replies: 27
Views: 526

Re: [Help] Config_Text Usage Problem.

Your code looks fine. :)
by kasimi
Sat Feb 03, 2018 5:29 pm
Forum: Extension Writers Discussion
Topic: [Help] Config_Text Usage Problem.
Replies: 27
Views: 526

Re: [Help] Config_Text Usage Problem.

Is $db_text a global ? config_text is the service name, db_text the class behind it ( \phpbb\config\db_text ). Of course you could create your own instance of the db_text class, but there really is no reason to, because the container most likely has one already. I was trying to avoid $phpbb_contain...
by kasimi
Sat Feb 03, 2018 5:09 pm
Forum: Extension Writers Discussion
Topic: [Help] Config_Text Usage Problem.
Replies: 27
Views: 526

Re: [Help] Config_Text Usage Problem.

Dark❶ wrote:
Sat Feb 03, 2018 4:55 pm
I prefer not to use : $config_text = $phpbb_container->get('config_text'); .
Is there a reason you don't? $config_text is not a global, there is no way around getting it from the service container.
by kasimi
Wed Jan 31, 2018 8:53 am
Forum: Extension Writers Discussion
Topic: phpBB 3.2 Upgrade Notes for Extensions
Replies: 31
Views: 11638

Re: phpBB 3.2 Upgrade Notes for Extensions

With lang being the @language service: $array = $this->lang->lang_raw('hlposts_tokens') /** * Returns the raw value associated to a language key or the language key no translation is available. * No parameter substitution is performed, can be a string or an array. * * @param string|array $key Langua...

Go to advanced search