Search found 788 matches

by kasimi
Thu Jul 12, 2018 9:15 pm
Forum: Extension Writers Discussion
Topic: Checking auth of poster
Replies: 23
Views: 475

Re: Checking auth of poster

As Paul suggested, you need to loop over the postrows again: <style> {% for postrow in loops.postrow %} {# CSS for each post here #} {% endfor %} </style> Though not for posts, I'm doing something similar here: https://github.com/kasimi/phpbb-ext-mchatonlinebanners/blob/master/kasimi/mchatonlinebann...
by kasimi
Wed Jul 11, 2018 12:52 pm
Forum: Extension Writers Discussion
Topic: Checking auth of poster
Replies: 23
Views: 475

Re: Checking auth of poster

You need to create a new instance of auth: https://github.com/phpbb/phpbb/blob/rel ... #L250-L252
by kasimi
Tue Jul 10, 2018 9:17 pm
Forum: Extension Writers Discussion
Topic: Drop/change the primary key of a table
Replies: 14
Views: 250

Re: Drop/change the primary key of a table

Unless it's a table that can have many many rows, I'd go with 3Di's suggestion in order to reuse as much core code as possible. In a custom method in a new migration that depends on the migration that added the table with the wrong primary key: Fetch all data from $table_name Fix the data to not vio...
by kasimi
Thu Jul 05, 2018 6:26 pm
Forum: phpBB Custom Coding
Topic: 3.2: Latest topics on external homepage
Replies: 4
Views: 322

Re: 3.2: Latest topics on external homepage

You need to define $forum_id_where to formulate a correct SQL query, for example:

Code: Select all

$forum_id_where = 'WHERE topic_id = 123';
by kasimi
Thu Jul 05, 2018 6:43 am
Forum: Extension Writers Discussion
Topic: Assigning value to user table field during registration
Replies: 5
Views: 178

Re: Assigning value to user table field during registration

Use a hidden field. Subscribe to the core.ucp_register_data_after event to grab the data from the request and add it to the event's data (users table) or cp_data (profile fields table) array, depending on where the data should be stored.
by kasimi
Sun Jul 01, 2018 3:04 pm
Forum: Extension Requests
Topic: Donated and automatic usergroup
Replies: 5
Views: 193

Re: Donated and automatic usergroup

The latest development version of the PayPal Donation Extension can do what you want: https://skouat.github.io/ext_paypal_donation/
by kasimi
Sat Jun 30, 2018 1:25 pm
Forum: phpBB Custom Coding
Topic: 3.2: Latest topics on external homepage
Replies: 4
Views: 322

Re: 3.2: Latest topics on external homepage

What's the complete value of your SQL query (the $topics variable in example 1)?
by kasimi
Sun Jun 17, 2018 8:41 am
Forum: Extensions in Development
Topic: [3.2][BETA] User Topic Count
Replies: 82
Views: 5552

Re: [3.2][BETA] User Topic Count

Because the "Topic Count" for all users is calculated and stored in the column when enabling the extension. Schema changes should be done in migrations only. Run your resync code via a custom method from within your migration on install: https://area51.phpbb.com/docs/dev/3.2.x/migrations/data_chang...
by kasimi
Mon Jun 11, 2018 10:42 am
Forum: Extension Writers Discussion
Topic: the path of extension
Replies: 4
Views: 240

Re: the path of extension

Inject the core.root_path parameter, assign 'AAFS_IMAGES_PATH' => $this->root_path . 'ext/meis2m/aafs/styles/all/theme/images' to the template and use src="{{ AAFS_IMAGES_PATH }}/list.gif" in your template file.
by kasimi
Sat Jun 09, 2018 8:03 am
Forum: Extension Writers Discussion
Topic: Calling Javascript from Template
Replies: 4
Views: 325

Re: Calling Javascript from Template

In your second code block, declare myStream: ... var myStream; var _nsid = '{NSID}'; var _key = '{KEY}'; ... Now put back the no conflict code and change var myStream = (function() to myStream = (function() to reference the global variable instead of using a local one. By the way, make sure you esca...
by kasimi
Wed May 09, 2018 8:43 am
Forum: Extension Writers Discussion
Topic: PHPBB_ENVIRONMENT, production vs development
Replies: 11
Views: 497

Re: PHPBB_ENVIRONMENT, production vs development

Blitze wrote:
Tue May 08, 2018 4:17 pm
I can open a bug and provide a PR to fix it.
Please do.
Blitze wrote:
Tue May 08, 2018 4:17 pm
As for Travis, is it possible to make it run in development so bugs like this are not simply ignored?
I'm sure there's a more elegant way, but you could try calling error_reporting(-1); in setUpBeforeClass().
by kasimi
Tue May 08, 2018 5:40 am
Forum: Extension Writers Discussion
Topic: PHPBB_ENVIRONMENT, production vs development
Replies: 11
Views: 497

Re: PHPBB_ENVIRONMENT, production vs development

Your code doesn't behave differently, the problems are just ignored when in production . If your environment is set to development , all errors are reported. https://github.com/phpbb/phpbb/blob/release-3.2.2/phpBB/common.php#L101 https://github.com/phpbb/phpbb/blob/release-3.2.2/phpBB/phpbb/debug/de...
by kasimi
Mon May 07, 2018 8:38 pm
Forum: Extension Writers Discussion
Topic: core.search_get_topic_data
Replies: 7
Views: 336

Re: core.search_get_topic_data

Try appending to the existing sql_where value instead of overwriting it. Also you should be using $db->sql_in_set():

Code: Select all

$event['sql_where'] .= ' AND ' . $this->db->sql_in_set('t.forum_id', $forums_id_ary);
by kasimi
Mon May 07, 2018 8:34 pm
Forum: Extension Writers Discussion
Topic: Using pagination with another variable in the URL
Replies: 2
Views: 168

Re: Using pagination with another variable in the URL

You can add additional parameters to the $base_url : // For a route: $base_url = $controller_helper->route('my_route', ['another' => 'parameter']); // Otherwise: $base_url = append_sid($root_path . 'index.' . $php_ext, ['another' => 'parameter']); $pagination->generate_template_pagination($base_url,...

Go to advanced search