Search found 890 matches

by kasimi
Wed Feb 06, 2019 12:33 pm
Forum: Extension Writers Discussion
Topic: Changing a template var from a template
Replies: 28
Views: 608

Re: Changing a template var from a template

Code: Select all

{% set postrow = postrow | merge({'VARIABLE': 'new value'}) %}
But I think you missed this part:
kasimi wrote:
Wed Feb 06, 2019 9:02 am
it won't affect the value outside of your template event file
by kasimi
Wed Feb 06, 2019 9:02 am
Forum: Extension Writers Discussion
Topic: Changing a template var from a template
Replies: 28
Views: 608

Re: Changing a template var from a template

You can change the value within your template event file with the merge filter, but it won't affect the value outside of your template event file which is probably what you're aiming for. You will have to do it in PHP. Maybe should I operate on $postrow in php and next assign it to postrow? Ideally,...
by kasimi
Tue Feb 05, 2019 10:17 pm
Forum: Extension Writers Discussion
Topic: Changing a template var from a template
Replies: 28
Views: 608

Re: Changing a template var from a template

attribute() is a function. You can't assign a value to a function result.

Is there no way for you to change the value in PHP, before it is assigned to the template?
by kasimi
Fri Feb 01, 2019 8:38 am
Forum: Extension Writers Discussion
Topic: Help with guzzle async request
Replies: 5
Views: 270

Re: Help with guzzle async request

I don't have a clue, and like you already said this shouldn't be necessary since PHP 5.4, but this is how you can reference a static method: $request = ['self', 'request']; $response->then(function($response) use ($request) { $crawler = call_user_func($request, 'GET', 'index.php?edit_mode=1'); });
by kasimi
Sat Jan 26, 2019 9:45 am
Forum: [3.2.x] Support Forum
Topic: member counts
Replies: 7
Views: 227

Re: member counts

The number on the index page doesn't include inactive users, it only counts normal users. On the memberlist page, only users that have Can manage users admin permission ( a_user ) see these inactive users in addition to normal users. For users without that permission, the two numbers are the same. T...
by kasimi
Sat Jan 19, 2019 9:54 pm
Forum: [3.2.x] Support Forum
Topic: permission change from 3.1.10 to 3.1.12
Replies: 4
Views: 149

Re: permission change from 3.1.10 to 3.1.12

You can change this line to: 'U_VIEWONLINE' => append_sid("{$phpbb_root_path}viewonline.$phpEx"), Alternatively, you can listen to core.index_modify_page_title in an extension and do this: $this->template->assign_var('U_VIEWONLINE', append_sid($this->root_path . 'viewonline.' . $this->php_ext));
by kasimi
Sat Jan 19, 2019 9:32 pm
Forum: phpBB Custom Coding
Topic: request_var _sid and phpBB behavior and $_GLOBALS
Replies: 5
Views: 273

Re: request_var _sid and phpBB behavior and $_GLOBALS

comparing with == the comparison match? 1234 == '1234abcd' 1234 === (int) '1234abcd' 1234 === 1234 true 1234 === '1234abcd' false because of different types May a post within this forum could be sufficient This forum is not meant for advertising finished products. Feel free to make a post in mChat'...
by kasimi
Sat Jan 19, 2019 10:44 am
Forum: Extensions in Development
Topic: [CDB] Poll on Index
Replies: 25
Views: 2073

Re: [CDB] Poll on Index

by kasimi
Sat Jan 19, 2019 9:44 am
Forum: phpBB Custom Coding
Topic: request_var _sid and phpBB behavior and $_GLOBALS
Replies: 5
Views: 273

Re: request_var _sid and phpBB behavior and $_GLOBALS

session_id is a string. The 2nd argument of request_var() needs to be ''.

When using 0 as 2nd argument, it casts the return value to an integer. I guess in your test scenario, the session ID happened to start with 4 digits. Pass the empty string and $cks will contain the full session ID.
by kasimi
Sun Dec 23, 2018 5:23 pm
Forum: Extension Writers Discussion
Topic: [SPLIT]Getting checkbox posted values
Replies: 6
Views: 340

Re: [SPLIT]Getting checkbox posted values

That's the way it is. Is it not working for you? If not, please post the code you have.
by kasimi
Sun Dec 23, 2018 4:37 pm
Forum: Extension Writers Discussion
Topic: [SPLIT]Getting checkbox posted values
Replies: 6
Views: 340

Re: [SPLIT]Getting checkbox posted values

If they are part of the form, why aren't they included in the array? Unchecked checkboxes and radiobuttons are not POSTed to the server. This is unrelated to phpBB and it's always been like that . This works: <input type="checkbox" name="anonpost" value="1"> $is_anonpost = $this->request->variable(...
by kasimi
Sun Dec 23, 2018 1:23 pm
Forum: [3.2.x] Support Forum
Topic: Board version is not updating
Replies: 7
Views: 266

Re: Board version is not updating

Does the file root/phpbb/db/migration/data/v32x/v325.php exist?
by kasimi
Thu Dec 20, 2018 9:40 am
Forum: phpBB Custom Coding
Topic: Create a new reply with python
Replies: 16
Views: 731

Re: Create a new reply with python

Temporarily allow guests to make posts and see if your script works without the login part.

Go to advanced search