Search found 1011 matches

by kasimi
Thu Sep 02, 2021 9:26 pm
Forum: phpBB Custom Coding
Topic: Add value of field on posting_editor.html to database column when topic created
Replies: 2
Views: 1383

Re: Add value of field on posting_editor.html to database column when topic created

Add a new line below this one:

Code: Select all

'topic_colour' => $request->variable('colour', '', true),
by kasimi
Sun May 23, 2021 1:13 pm
Forum: phpBB Custom Coding
Topic: Ext Extra language files
Replies: 1
Views: 1412

Re: Ext Extra language files

Don't call $user->add_lang_ext() or $language->add_lang() in the core.user_setup event handler. The $user object isn't fully initialized at that point. Either you use the event core.user_setup and do this: $lang_set_ext = $event['lang_set_ext']; $lang_set_ext[] = array( 'ext_name' => 'gruf/customize...
by kasimi
Sun May 16, 2021 4:46 pm
Forum: Extension Writers Discussion
Topic: Extension adds extra rows on view topic page
Replies: 4
Views: 1667

Re: Extension adds extra rows on view topic page

$this->template->assign_block_vars('postrow', array( You're adding new postrow elements to the template which you don't want to do. Instead, modify the event's post_row array: $event['post_row'] = array_merge($event['post_row'], array( 'DOMAIN' => $domain, 'S_HAS_SHOP_DATA' => ($user_poster_data['c...
by kasimi
Sat Feb 06, 2021 12:49 pm
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 961

Re: DB DISTINCT Query help

The query I posted should return only distinct users. Can you post your code?
by kasimi
Fri Feb 05, 2021 4:23 pm
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 961

Re: DB DISTINCT Query help

My bad, left join won't work. You should run two separate queries: first the post data, then the user data. For the user data you can use the user_loader service: $sql_ary = [ 'SELECT' => 'p.post_id, MIN(p.post_time), p.topic_id, p.poster_id', 'FROM' => [POSTS_TABLE => 'p'], 'WHERE' => 'p.topic_id =...
by kasimi
Fri Feb 05, 2021 2:42 pm
Forum: Extension Writers Discussion
Topic: DB DISTINCT Query help
Replies: 7
Views: 961

Re: DB DISTINCT Query help

Don't cross join. Only select from USERS_TABLE and left join the POSTS_TABLE.
by kasimi
Sun Jan 10, 2021 1:25 pm
Forum: Extension Writers Discussion
Topic: Loop in mail template
Replies: 4
Views: 782

Re: Loop in mail template

assign_block_vars() is called with the elements of the array, not the array itself. foreach ($array => $el) { $template->assign_block_vars('blockname', $el); } is roughly the same as this: $template->assign_vars([ 'blockname' => $array, ]); The second code only works since Twig is used as template ...
by kasimi
Sat Jan 09, 2021 10:15 pm
Forum: Extension Writers Discussion
Topic: Loop in mail template
Replies: 4
Views: 782

Re: Loop in mail template

Remove all <!-- BEGIN x --> and <!-- END x --> and use

Code: Select all

$messenger->assign_vars([
    'USR_TPC_LIST' => $topic_links,
]);
Twig then loops over the USR_TPC_LIST array with {% for user_topic in USR_TPC_LIST %}.
by kasimi
Mon Jan 04, 2021 4:15 pm
Forum: Extension Writers Discussion
Topic: Customising an Extension
Replies: 4
Views: 1050

Re: Customising an Extension

The % operator has higher priority than +. This should work:

Code: Select all

{% if loops.postrow|length > 1 and (postrow.S_ROW_COUNT + 1) % 5 == 0 %}
by kasimi
Tue Oct 06, 2020 9:01 pm
Forum: [3.3.x] Extensions Database Releases
Topic: Advanced BBCode Box
Replies: 9
Views: 7121

Re: Advanced BBCode Box

Extension Updated to version 3.3.0
See first post for Download Link
by kasimi
Tue Oct 06, 2020 9:01 pm
Forum: [3.2.x] Extensions Database Releases
Topic: Advanced BBCode Box
Replies: 13
Views: 12372

Re: Advanced BBCode Box

Extension Updated to version 3.3.0
See first post for Download Link
by kasimi
Tue Oct 06, 2020 8:58 pm
Forum: [3.3.x] Extensions Database Releases
Topic: Poster IP in Viewtopic
Replies: 1
Views: 1079

Re: Poster IP in Viewtopic

Extension validated/released
by kasimi
Wed Sep 30, 2020 12:25 pm
Forum: [3.3.x] Extensions Database Releases
Topic: Terms of use
Replies: 2
Views: 1915

Re: Terms of use

Extension validated/released
by kasimi
Wed Sep 30, 2020 12:25 pm
Forum: [3.2.x] Extensions Database Releases
Topic: Terms of use
Replies: 2
Views: 1963

Re: Terms of use

Extension validated/released

Go to advanced search