(ACP)Forum Creation radio button default state

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Anti-Spam Guide
Post Reply
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

(ACP)Forum Creation radio button default state

Post 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
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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.
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator
User avatar
david63
Registered User
Posts: 17798
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored
User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: (ACP)Forum Creation radio button default state

Post by PhilDiscuss »

Hello. Thank you for the replies :)

I will edit that file, save me from thousands clicks :)
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: (ACP)Forum Creation radio button default state

Post 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.
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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.
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator
User avatar
KevC
Support Team Member
Support Team Member
Posts: 69920
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: (ACP)Forum Creation radio button default state

Post 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
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: (ACP)Forum Creation radio button default state

Post 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
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
PhilDiscuss
Registered User
Posts: 155
Joined: Fri Aug 19, 2016 8:44 am

Re: (ACP)Forum Creation radio button default state

Post by PhilDiscuss »

I change the value, and works great!
Image

but when I edit, this happen
Image
Professionally develop phpBB Premium Style and Extension.

The Philippines Discussions Website
User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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.
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator
User avatar
P_I
Registered User
Posts: 1161
Joined: Tue Mar 01, 2011 8:35 pm
Location: Staying home - Calgary
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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?
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
Neculai Anisor
Registered User
Posts: 172
Joined: Tue Jan 08, 2013 9:36 pm
Location: Renfrew, Renfrewshire, Scotland
Name: Neculai Anișor
Contact:

Re: (ACP)Forum Creation radio button default state

Post 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.
Image | Romanian Support Team | Animo @ phpBB.ro - Administrator
User avatar
P_I
Registered User
Posts: 1161
Joined: Tue Mar 01, 2011 8:35 pm
Location: Staying home - Calgary
Contact:

Re: (ACP)Forum Creation radio button default state

Post by P_I »

:oops: Sorry I misunderstood the objective. Carry on.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
Post Reply

Return to “Extension Requests”