Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: Kiriakos GR - heinäkuu 15, 2019, 04:46:24 AP

Otsikko: Browse Ban Triggers - very few reports per page.
Kirjoitti: Kiriakos GR - heinäkuu 15, 2019, 04:46:24 AP
At Browse Ban Triggers  I can view only  10 results as listing of report per page.

My entire Ban list has just 30 recordings.

For practical reasons it would be productive the user to be able to select number of results per page.
Is there such a setting?     
Otsikko: Re: Browse Ban Triggers - very few reports per page.
Kirjoitti: Aleksi "Lex" Kilpinen - elokuu 01, 2019, 11:41:30 AP
I can see about 20 on mine, so there is probably a setting that affects this - but off the top of my head, I can't remember what it would be.
Otsikko: Re: Browse Ban Triggers - very few reports per page.
Kirjoitti: Kiriakos GR - elokuu 01, 2019, 01:09:28 IP
Just as confirmation, I will say that at ->  Ban List -> Browse Ban Triggers ... I can see only 10.
At Ban log ... I can see 30. 

I am unable to predict where such relevant setting this is hidden at.
I am using SMF Default Theme - Curve  SMF 2.0.15



Otsikko: Re: Browse Ban Triggers - very few reports per page.
Kirjoitti: Arantor - elokuu 01, 2019, 01:16:54 IP
Relevant setting: Admin > Forum > Posts and Topics > Topic Settings > Number of posts per page in a topic

And to spare the inevitable wailing about how this needs to be fixed, because that's what it will become otherwise, to change the number on the ban triggers page, you edit Sources/ManageBans.php:

$listOptions = array(
'id' => 'ban_trigger_list',
'title' => $txt['ban_trigger_browse'],
'items_per_page' => $modSettings['defaultMaxMessages'],


Change to
$listOptions = array(
'id' => 'ban_trigger_list',
'title' => $txt['ban_trigger_browse'],
'items_per_page' => 50,


That is assuming you actually mean the 'browse ban triggers' page and not the ban list, in which case you would need to change this code instead:
$listOptions = array(
'id' => 'ban_list',
'items_per_page' => 20,


Where the number is already set to 20 in the code and is not configurable.

And before we get into any more 'this should be configurable' BS, it really shouldn't because that's what mods are for and SMF has too many configuration options already.
Otsikko: Re: Browse Ban Triggers - very few reports per page.
Kirjoitti: Aleksi "Lex" Kilpinen - elokuu 01, 2019, 01:19:17 IP
Thank you Arantor :)