How to add questions to FAQ

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

How to add questions to FAQ

Post by Tomba » Sun Jul 02, 2017 6:43 pm

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: 3508
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: How to add questions to FAQ

Post by MarkDHamill » 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

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.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4681
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: How to add questions to FAQ

Post by VSE » Sun Jul 02, 2017 8:43 pm

Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

Tomba
Registered User
Posts: 131
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 » Thu Jul 27, 2017 9:18 pm

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: 13
Joined: Thu Oct 11, 2018 8:09 am

Re: How to add questions to FAQ

Post by eindgebruiker » Thu Oct 11, 2018 8:24 am

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
Recognised Extension Developer
Posts: 1773
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: How to add questions to FAQ

Post by Ger » Thu Oct 11, 2018 10:25 am

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:
-Available for custom work-

eindgebruiker
Registered User
Posts: 13
Joined: Thu Oct 11, 2018 8:09 am

Re: How to add questions to FAQ

Post by eindgebruiker » Mon Oct 15, 2018 8:44 pm

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

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 246 guests