News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

FAQ (Frequently Asked Questions) mod

Started by Suki, June 20, 2011, 08:19:18 PM

Previous topic - Next topic

GlitchPC

I've been looking for a mod like this but will wait until the WYSIWYG issue is resolved.

I'd like to see the ability to add the link to the FAQ through a sub menu of the "Help" tab...instead of a totally new tab...since tabs on my site are getting out of hand.

Suki

In Sources/Faq.php file find:

Code (php) Select

// Button menu hook
function FaqMenu(&$menu_buttons){

global $scripturl, $txt, $modSettings;

$faq_insert = empty($modSettings['faq_menu_position']) ? 'home' : $modSettings['faq_menu_position'];

// Lets add our button next to the user's selection...
// Thanks to SlammedDime (http://mattzuba.com) for the example
$counter = 0;
foreach ($menu_buttons as $area => $dummy)
if (++$counter && $area == $faq_insert)
break;

$menu_buttons = array_merge(
array_slice($menu_buttons, 0, $counter),
array('faq' => array(
'title' => $txt['Faq_title'],
'href' => $scripturl . '?action=faq',
'show' => allowedTo('faqperview'),
'sub_buttons' => array(
'faq_add' => array(
'title' => $txt['Faq_add_send'],
'href' => $scripturl . '?action=faq;sa=add',
'show' => allowedTo('admin_forum'),
),
'faq_admin' => array(
'title' => $txt['faq_manage'],
'href' => $scripturl . '?action=admin;area=faqdmin',
'show' => allowedTo('admin_forum'),
),
),
)),
array_slice($menu_buttons, $counter)
);
}


and replace with:

Code (php) Select

// Button menu hook
function FaqMenu(&$menu_buttons){

global $scripturl, $txt, $modSettings;


$menu_buttons['help']['sub_buttons']['faq'] = array(
'title' => $txt['Faq_title'],
'href' => $scripturl . '?action=faq',
'show' => allowedTo('faqperview'),
'sub_buttons' => array(
'faq_add' => array(
'title' => $txt['Faq_add_send'],
'href' => $scripturl . '?action=faq;sa=add',
'show' => allowedTo('admin_forum'),
),
'faq_admin' => array(
'title' => $txt['faq_manage'],
'href' => $scripturl . '?action=admin;area=faqdmin',
'show' => allowedTo('admin_forum'),
),
),
);

}




this will overwrite the mod setting for placing the button.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

GlitchPC

Thanks...and you should also include categories for your FAQs...don't you think?

Suki

well I don't know,  I haven't see any FAQ page with categories just yet,  most FAQ pages are just a question/answer  list.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

TheListener

Quote from: GlitchPC on June 21, 2011, 05:08:54 PM
Thanks...and you should also include categories for your FAQs...don't you think?

I don't agree.

Everyones categories will be dependant on the subject of a persons forum.

ie games, television, local area ( like mine).

GlitchPC

#25
This is true, however, with the type of forum I have...categories are a must.

By the way...I just installed this...excellent job!  It would definitely be a big plus to have the option to add categories...something you may want to think about.

As it stands...I have two FAQ pages...one I created...and yours.  If you check my site...via the link in my profile, or in the postbit...you can see what I'm referring to.

I would remove my FAQ page...if I can get some categories...;)

Categoires can be added by Admin and those who manage FAQ mod.  One can create their own categories.

TheListener


GlitchPC

Quote from: Brack1 on June 21, 2011, 05:28:03 PM
Hate to say this but I see no links.

???

No links, where?  I only have two links so far on both FAQ pages...lol.

TheListener

Quote from: GlitchPC on June 21, 2011, 05:30:40 PM
Quote from: Brack1 on June 21, 2011, 05:28:03 PM
Hate to say this but I see no links.

???

No links, where?  I only have two links so far on both FAQ pages...lol.

Your profile or were ya talking about ya forum?

GlitchPC


Suki

I'm sorry, but this is not something I will add unless there's enough people who request it  and besides I don't know how all the Faqs will be showed or where the categories will be,  I think you are looking for a blog rather than a FAQ page.


oh and guest cannot see your FAQ page ;)   
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

GlitchPC

Well...I guess I'll have to wait to see what happens...

Thanks for looking, though.  Guess I'll go back to my own FAQ page....:(

Cal O'Shaw

Hello,

This is a great MOD.  Looking forward to being able to allow our global moderators to edit and add FAQs as well (why should I have all the fun? :) ).

It would be nice to be able to put FAQ under the Help tab, but don't know if that is something that could only be set during install of the MOD. 

As to sorting, I just put numbers in the titles.  The first FAQ we have is our Rules (as Depreciated's Rules MOD isn't likely to be updated, making Rules the first FAQ gives us the next best thing).

While having a second level would be nice, I'd imagine the code would quickly get complex.  However, if there is some way to optionally add an index page of compact links (not unlike the standard SMF Help page), that might handle lots of FAQ.

What really matters is, you created this MOD and have shared it, and I thank you for doing so.

Grazie mille!

Cal

Suki

Yes, that can be done, I will put it on my to do list, so far I got:

-fix the WYSIWYG editor bug
-Add permission to edit/add FAQs
-List all the FAQS
-Add a setting to put the FAQ button under the Help tab
-Categories  - I'm not so sure about this one, if more people do ask for it then I will add it.


to change the FAQ button to the help tab just follow this:  http://www.simplemachines.org/community/index.php?topic=438980.msg3083817#msg3083817
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

GlitchPC

Just to point something out about "categories"...especially if one has a free computer help website...or, any specific type of website that covers several areas of interest.  Say someone is looking for a faq on a particular subject...let's say "Windows XP".  Why would they need to browse the other faqs in order to find that one they're looking for?  Categories shorten their search time for the faq...correct?  You didn't specify whether or not your FAQ mod is searchable...is it?

You had said that most faq pages you've viewed only list the questions and you've never seen any with categories.  This isn't true...most websites that use any sort of faq page will have it broken down into categories...much like a knowledge base.

Now...I'm not saying you HAVE TO add categories...it's just that it will make the mod much more efficient.  Just listing a bunch of faqs on a page has no order...as a matter of fact...categories add order to an already great idea.  As it stands now...your mod just lists a bunch of faqs on a page...with three ways to sort them but, for people like me...the sorting really doesn't help.

Adding the JavaScript collapse is also a nice feature...especially the ability to turn it off...since over 80% of people who browse the web don't enable their java browser addons.  So if someone didn't enable javascript...they could see the faq answer...if the script was turned off...which it is by default I might add.  Like I said...nice touch.

I look forward to seeing the changes you bring to this mod...and will keep an eye on it.  As it stands now...it's a great mod that can be made even greater...

I, for one, appreciate the work you do...

TheListener

@ Cal the rules mod works on 2.0 except ALL the files have to be manually edited.

Suki

Quote from: GlitchPC on June 22, 2011, 10:08:27 AM
Just to point something out about "categories"...especially if one has a free computer help website...or, any specific type of website that covers several areas of interest.  Say someone is looking for a faq on a particular subject...let's say "Windows XP".  Why would they need to browse the other faqs in order to find that one they're looking for?  Categories shorten their search time for the faq...correct?  You didn't specify whether or not your FAQ mod is searchable...is it?

You had said that most faq pages you've viewed only list the questions and you've never seen any with categories.  This isn't true...most websites that use any sort of faq page will have it broken down into categories...much like a knowledge base.

Now...I'm not saying you HAVE TO add categories...it's just that it will make the mod much more efficient.  Just listing a bunch of faqs on a page has no order...as a matter of fact...categories add order to an already great idea.  As it stands now...your mod just lists a bunch of faqs on a page...with three ways to sort them but, for people like me...the sorting really doesn't help.

Adding the JavaScript collapse is also a nice feature...especially the ability to turn it off...since over 80% of people who browse the web don't enable their java browser addons.  So if someone didn't enable javascript...they could see the faq answer...if the script was turned off...which it is by default I might add.  Like I said...nice touch.

I look forward to seeing the changes you bring to this mod...and will keep an eye on it.  As it stands now...it's a great mod that can be made even greater...

I, for one, appreciate the work you do...


You jump out all of the sudden... wow I haven't even decide if I will include categories and you already started to give ideas on how the mod should fit your needs...  and only your needs...


I didn't say you will have to browse all the FAQs...

I didn't say this mod was search able...


Quote
Just listing a bunch of faqs on a page has no order

this isn't true, you have 3 ways to sort out the FAQs and BTW this is a FAQ  mod not a knowledge base.


Like I said,  I only have saw FAQ pages which list the faq/answer,  most of the times it has only 10 to 20 faqs, I see no reason why add categories if you will only have 10 to 20 faqs...

I will added only if more people request it, so far only you did it,  I will not add a feature that will only be usable by one person.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

GlitchPC

I think you took my post the wrong way...I was not just pointing out my needs but...maybe the needs of others who may be looking for the same thing.

Like I said...I think this is a great mod...did you read that in my post?  Apparently not.  I also said I will be keeping an eye on it...but, not any more.

However, if you think I'm being selfish...I'll move on.  Good luck with your mod, Miss All Sunday...

Suki

Quote from: Miss All Sunday on June 22, 2011, 10:20:54 AM

I will added only if more people request it, so far only you did it,  I will not add a feature that will only be usable by one person.


the way you "ask"  for things  pretty much sounds like you are demanding it...  and most of what you "ask"  are specific things to suit your needs...    I will not make changes to my mod just to satisfy one person,  I create this mod in hope it could be used by many users, not only one.


If a person wants to give a personal touch or change something then I will be glad to help out, like I did to you when you ask how to put the FAQ button on the help tab,  however, that does not mean that I will add such a thing to the mod.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

WasdMan


Advertisement: