Page 1 of 1

(ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 7:58 am
by PhilDiscuss
Is it possible to do this, automatically of Forum Creation?
So the next time I create new Forum I will not do the click? :lol: :lol: :lol:

Image

Maybe a setting or change of code to make this happen?

Thank you

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 10:29 am
by Neculai Anisor
You can do that by giving them a true value in includes/acp/acp_forums.php

// Fill forum data with default values

Code: Select all

							'parent_id'				=> $this->parent_id,
							'forum_type'			=> FORUM_POST,
							'forum_status'			=> ITEM_UNLOCKED,
							'forum_name'			=> utf8_normalize_nfc(request_var('forum_name', '', true)),
							'forum_link'			=> '',
							'forum_link_track'		=> false,
							'forum_desc'			=> '',
							'forum_rules'			=> '',
							'forum_rules_link'		=> '',
							'forum_image'			=> '',
							'forum_style'			=> 0,
							'display_subforum_list'	=> true,
							'display_on_index'		=> true,
							'forum_topics_per_page'	=> 0,
							'enable_indexing'		=> true,
							'enable_icons'			=> true,
							'enable_prune'			=> false,
							'prune_days'			=> 7,
							'prune_viewed'			=> 7,
							'prune_freq'			=> 1,
							'enable_shadow_prune'		=> false,
							'prune_shadow_days'		=> 7,
							'prune_shadow_freq'		=> 1,
							'forum_flags'			=> FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS,
							'forum_options'			=> 0,
							'forum_password'		=> '',
							'forum_password_confirm'=> '',
And change from 'S_ENABLE_QUICK_REPLY' => ($forum_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) ? true : false, to 'S_ENABLE_QUICK_REPLY' => ($forum_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) != true,. That should do it.

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 10:32 am
by david63
Neculai Anisor wrote:
Tue Feb 07, 2017 10:29 am
You can do that by giving them a true value in includes/acp/acp_forums.php
All it needs now is to make it into an extension

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 10:40 am
by Neculai Anisor
david63 wrote:
Tue Feb 07, 2017 10:32 am
All it needs now is to make it into an extension
Ik David! I would love to do it myself but i am new in this "extensions world". I've done just some very simple ones so far. :D He was asking about code changes too so i don't think there is a prob xD

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 1:12 pm
by PhilDiscuss
Hello. Thank you for the replies :)

I will edit that file, save me from thousands clicks :)

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 1:22 pm
by PhilDiscuss
Gee hee hee.. reply again,

Yeah, its good to have an extension for this. That determines the radio buttons on acp forum creation, just turn off or on.

So the core files will not be touch, virgin.

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 2:11 pm
by Neculai Anisor
PhilDiscuss wrote:
Tue Feb 07, 2017 1:22 pm
Gee hee hee.. reply again,

Yeah, its good to have an extension for this. That determines the radio buttons on acp forum creation, just turn off or on.

So the core files will not be touch, virgin.
Well Mr. Phil you cannot count on me with that. I have no idea how to do it :D If i will figure out how it works i'll do it for ya but no too soon unfortunately.

Re: (ACP)Forum Creation radio button default state

Posted: Tue Feb 07, 2017 2:27 pm
by KevC
Just for reference, Phil is trying to make 50,000 forums (despite advice not to :)) so it's not a setting that will be applicable to many other admins.

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 12:27 am
by PhilDiscuss
..chillax. 8-)

Thank you for the advice :) , 50, 000 will see if phpBB will cry :evil: .. seems like you are more worry than me.

Anw, it is a interesting for phpBB. That's how I love phpBB ... 8-)

ADD: back on my topic, I know there is someone out there might have interest.

Thank you Amigo

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 1:48 am
by PhilDiscuss
In /includes/acp/acp_forums.php, I set

Line: 685

Code: Select all

'S_DISPLAY_ACTIVE_TOPICS'	=> ($forum_data['forum_type'] == FORUM_POST) ? ($forum_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS) : false,
to become NO,

but still
Image

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 6:51 am
by PhilDiscuss
I change the value, and works great!
Image

but when I edit, this happen
Image

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 10:26 pm
by Neculai Anisor
Oh ... I don't know why but i find this really funny (the story about the 50.000 forums). Sounds like a comedy movie to me tho.

The values are like that when you are trying to edit the forums because ... THEY ARE SAVED IN THE DATABASE ALREADY. Sorry for caps lock pal.
The modifications i gave you, are only when you are trying to create a new forum and the values are already set to Yes/No. When you submit the forum, values are going to database. Got it? :D
You might need a sql query to change the values in the database.

Regards.

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 11:07 pm
by P_I
KevC wrote:
Tue Feb 07, 2017 2:27 pm
Just for reference, Phil is trying to make 50,000 forums (despite advice not to :)) so it's not a setting that will be applicable to many other admins.
Does he know about phpBB • phpBB3 QuickInstall - Contribution Details? Could it provide a starting point for whatever he/she is really trying to accomplish?

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 11:22 pm
by Neculai Anisor
P_I wrote:
Wed Feb 08, 2017 11:07 pm
Does he know about phpBB • phpBB3 QuickInstall - Contribution Details? Could it provide a starting point for whatever he/she is really trying to accomplish?
50.000 forums not 50.000 boards/installations.

Re: (ACP)Forum Creation radio button default state

Posted: Wed Feb 08, 2017 11:24 pm
by P_I
:oops: Sorry I misunderstood the objective. Carry on.