sp3ctre wrote: ↑Sat Mar 17, 2018 7:27 amYes, that is selected, but I can still post without having to select a titleMiri4ever wrote: ↑Sat Mar 17, 2018 7:26 am Go inside your ACP -> Forum settings and scroll their down to:
Topic attributes settings
Default attribute of the forum:
The selected attribute will be applied when a new topic is created, whatever the user permissions.
Copy attributes permissions from:
When created, the forum will have the same attributes permissions as the one you selected. If no forum is selected, attributes will not be displayed while their permissions will not have been defined.
Force users to apply an attribute to their topic:
If enabled, users will have to select an attribute for their topic in that forum.
In main_listener.php, replacenou nou wrote: ↑Mon Apr 16, 2018 7:35 pm I have the same thing happening to me. Just tested with the release version a2, as well as with the latest master. I think the issues as described in my previous posts may be related. The first missing attribute counts as a selected attribute internally, so the topic can always be created (I am guessing here...)
Code: Select all
$post_data['attr_id'] = $this->request->variable('attr_id', \ernadoo\qte\qte::KEEP, false, \phpbb\request\request_interface::POST);
Code: Select all
$post_data['attr_id'] = $this->request->variable('attr_id', 0, false, \phpbb\request\request_interface::POST);
Nop:
Code: Select all
'QTE_PER_CENT' => empty($total_topics) ? 0 : round(intval($attribute_count) * 100 / $total_topics),
Sweet! That solves the issue of being able to post with no attribute selectedErnadoO wrote: ↑Mon Apr 16, 2018 8:29 pm In main_listener.php, replacewithCode: Select all
$post_data['attr_id'] = $this->request->variable('attr_id', \ernadoo\qte\qte::KEEP, false, \phpbb\request\request_interface::POST);
Code: Select all
$post_data['attr_id'] = $this->request->variable('attr_id', 0, false, \phpbb\request\request_interface::POST);
Ah - so it's a percentage of total topics - gotcha!ErnadoO wrote: ↑Mon Apr 16, 2018 8:29 pmNop:Code: Select all
'QTE_PER_CENT' => empty($total_topics) ? 0 : round(intval($attribute_count) * 100 / $total_topics),