Search found 654 matches

by kasimi
Sat Jun 24, 2017 9:27 am
Forum: Extension Writers Discussion
Topic: Right query for mysql fulltext
Replies: 17
Views: 404

Re: Right query for mysql fulltext

Change the collation of your nick column to utf8_general_ci.
by kasimi
Tue Jun 13, 2017 7:54 pm
Forum: Extension Writers Discussion
Topic: Pass the content of a PHPBB's $config to a JS
Replies: 6
Views: 122

Re: Pass the content of a PHPBB's $config to a JS

Actually it would be this: var monkeyList = new List('test-list', { valueNames: ['name'], page: vendorExt.page, pagination: true }); Well I guess I need just the PAGE var there or? Yes, it was just a pointer in case you needed more variables. :) Strings are sanitized before to and while being assign...
by kasimi
Tue Jun 13, 2017 7:27 pm
Forum: Extension Writers Discussion
Topic: Pass the content of a PHPBB's $config to a JS
Replies: 6
Views: 122

Re: Pass the content of a PHPBB's $config to a JS

This is how I've done it many times: in overall_footer_after.html, do this:

Code: Select all

<script>
var vendorExt = {
	page: {{ PAGE }}
	// add more data here, make sure to sanitize strings
};
</script>
{% INCLUDEJS '@vendor_ext/my.js' %}
Now can access your data in my.js like this: alert(vendorExt.page);
by kasimi
Mon May 29, 2017 10:38 am
Forum: phpBB Custom Coding
Topic: Uncaught Reference Error: days is not defined
Replies: 2
Views: 228

Re: Uncaught Reference Error: days is not defined

As the error message indicates, you haven't defined days , hours and minutes anywhere. The countdown doesn't know where to start counting. You're passing a 0 as second argument to setInterval() which makes your browser trigger the function as often as it can. As you're only counting down minutes, yo...
by kasimi
Fri May 26, 2017 1:50 pm
Forum: phpBB Custom Coding
Topic: Help with the user class
Replies: 14
Views: 504

Re: Help with the user class

All columns in the users table are put into the data array for the current $user : $user_vip = $this->user->data['user_vip']; $user_special = $this->user->data['user_special']; $user_immunity = $this->user->data['user_immunity']; I want to access that information in the functions_content.php file in...
by kasimi
Mon May 22, 2017 8:38 pm
Forum: Extension Writers Discussion
Topic: Posting event not working in extension
Replies: 7
Views: 188

Re: Posting event not working in extension

Would this be sufficient for CDB approval? Yes. Yeah, interestingly, this works. I've had a look, here's why: in viewforum and viewtopic, the template file is assigned before the event is triggered: $template->set_filenames(array( 'body' => 'viewforum_body.html') ); Inside your event, you call $thi...
by kasimi
Mon May 22, 2017 8:13 pm
Forum: Extension Writers Discussion
Topic: Posting event not working in extension
Replies: 7
Views: 188

Re: Posting event not working in extension

I wonder, don't you have the same problem in viewtopic and viewforum? According to your code on GitHub, you're also using $this->helper->message() which shouldn't be working there either.

Be that as it may, maybe trigger_error($message) is what you're looking for?
by kasimi
Mon May 22, 2017 8:28 am
Forum: Extension Writers Discussion
Topic: Posting event not working in extension
Replies: 7
Views: 188

Re: Posting event not working in extension

You're calling $this->helper->message() which creates and returns a new Response object. As you're in an event listener, you can't use this response object. Instead, add your error message to the event's error array: $error = $event['error']; $error[] = $this->user->lang('POSTCOUNT_NO_POST', $forum_...
by kasimi
Fri May 19, 2017 8:38 am
Forum: Extension Writers Discussion
Topic: [3.1] Display fetched results in a HTML5 table
Replies: 7
Views: 274

Re: [3.1] Display fetched results in a HTML5 table

I think what you want is a CSS flex layout.

Code: Select all

.container {
	display: flex;
	flex-wrap: wrap;
}

.container .item {
	flex-grow: 1;
	width: 25%;
}
Also see the answer and the link to a JSFiddle example here: http://stackoverflow.com/questions/2419 ... ns-per-row
by kasimi
Sat Apr 29, 2017 9:50 pm
Forum: Extension Writers Discussion
Topic: Class loader class
Replies: 19
Views: 667

Re: Class loader class

I know close to nothing about autoloading in PHP, but maybe you could use spl_autoload_functions() to get all registered loaders, spl_autoload_unregister() to remove the loader you want to extend, and then register your decorated service.
by kasimi
Sat Apr 29, 2017 8:36 pm
Forum: Extension Writers Discussion
Topic: tables.yml table in ACP...
Replies: 2
Views: 123

Re: tables.yml table in ACP...

Code: Select all

global $ajax_chat_chat_table;
The parameters in your tables.yml aren't added as global variables.

You need to fetch them from the container:

Code: Select all

$this->ajax_chat_chat_table = $phpbb_container->getParameter('spaceace.ajaxchat.tables.ajax_chat_chat_table');
by kasimi
Fri Apr 28, 2017 2:48 pm
Forum: Extension Writers Discussion
Topic: Get user_lastpost_time with $event in submit_post_end event?
Replies: 5
Views: 164

Re: Get user_lastpost_time with $event in submit_post_end event?

$event['data'] contains information about the post itself. user_lastpost_time is a field in the $user object:

Code: Select all

$user_lastpost_time = $this->user->data['user_lastpost_time'];
by kasimi
Thu Apr 27, 2017 3:00 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Mark Post Unread
Replies: 55
Views: 4660

Re: [3.1][3.2][RC] Mark Post Unread

Version 1.1.1 is now available. In earlier versions there was a bug that allowed users without m_approve permission to find out if a certain post was soft- or hard-deleted. Furthermore users were able to find out if a post was moved to a forum where they don't have read permission. Please update to ...
by kasimi
Fri Apr 21, 2017 9:54 am
Forum: Extension Writers Discussion
Topic: Routing to php page
Replies: 6
Views: 236

Re: Routing to php page

With rewriting enabled, no app.php/ is added to the generated routes.

Do you get 404s when you change the route to /compat (without .php)?

Go to advanced search