How to add questions to FAQ

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
User avatar
Tomba
Registered User
Posts: 143
Joined: Tue Jun 18, 2002 7:52 am
Location: Belgium
Name: Steven De Groote
Contact:

How to add questions to FAQ

Post by Tomba »

Hi,

I'm having a bit of difficulty to add questions to the forum's FAQ via an extension for 3.2.

Is there any example code available, or perhaps a current extension that already does this?
User avatar
MarkDHamill
Registered User
Posts: 4885
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: How to add questions to FAQ

Post by MarkDHamill »

While I am not aware of an extension that does this as an example, there is an event you can use: core.faq_mode_validation

From /phpbb/help/controller/help.php, lines 79-89:

Code: Select all

				/**
				 * You can use this event display a custom help page
				 *
				 * @event core.faq_mode_validation
				 * @var	string	page_title		Title of the page
				 * @var	string	mode			FAQ that is going to be displayed
				 * @var	string	lang_file		Language file containing the help data
				 * @var	string	ext_name		Vendor and extension name where the help
				 *								language file can be loaded from
				 * @since 3.1.4-RC1
				 */
You can learn more about making an extension work with a core event here.
Need phpBB services or a phpBB consultant? I offer most phpBB services. Getting lost managing phpBB? Buy my book, Mastering phpBB Administration. Covers through phpBB 3.3.7. eBook and paper versions available.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: How to add questions to FAQ

Post by MattF »

Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
Tomba
Registered User
Posts: 143
Joined: Tue Jun 18, 2002 7:52 am
Location: Belgium
Name: Steven De Groote
Contact:

Re: How to add questions to FAQ

Post by Tomba »

Thanks for the replies.

I've found where the event 'core.faq_mode_validation' is called, but strangely, I can't find anywhere how phpbb would enter in this code.

Can anyone tell me how this method is called? (I never end up in there...)
phpbb\help\controller\help::handle(string $mode)
eindgebruiker
Registered User
Posts: 19
Joined: Thu Oct 11, 2018 8:09 am

Re: How to add questions to FAQ

Post by eindgebruiker »

MarkDHamill wrote: Sun Jul 02, 2017 7:15 pm While I am not aware of an extension that does this as an example, there is an event you can use: core.faq_mode_validation
It seems that event is never triggered: https://tracker.phpbb.com/browse/PHPBB3-14682
User avatar
Ger
Registered User
Posts: 2107
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: How to add questions to FAQ

Post by Ger »

My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
eindgebruiker
Registered User
Posts: 19
Joined: Thu Oct 11, 2018 8:09 am

Re: How to add questions to FAQ

Post by eindgebruiker »

This is an excellent extension, Ger! Much better than working with that pesky event. Thanks a lot.
Post Reply

Return to “Extension Writers Discussion”