FAQ (Frequently Asked Questions) mod

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

Previous topic - Next topic

iain sherriff

thanks.
I switched to default theme and have no errors......

will try installing the facebook theme again
SMF 2.0.12

Suki

Looks like the theme you are trying to install doesn't know how to handle active buttons or is trying to handle them wrong, might be better to ask the theme author about it.

A common mistake lots of people does is using the very same var to check for its existence, some weird servers doesn't know the difference between empty and null thats why it is important to always check for emptiness empty()  rahter than using the var directly.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

iain sherriff

you're right. It is the facebook theme
will go and ask there and point them to this.

thanks
SMF 2.0.12

mattewre

Hi!
It seems that FAQ button doesn't show up for NOT registered members (and they can't access to FAQ).
How I can give them the right permission?
Thank you

Suki

On your permissions admin page, there is a "can see FAQ page" permission,  check that for your guest group.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

mattewre

Quote from: Suki on February 15, 2013, 11:01:34 AM
On your permissions admin page, there is a "can see FAQ page" permission,  check that for your guest group.

I'm so stupid.. I missed it at first, but "find in page" helped me (I was running here to write "solved" but you are faster then light!)
thank you!

MissyNL

Quote from: Suki on February 03, 2013, 06:04:39 PM
As an admin, you can hover the Faq button in the main menu, this will show some submenus, one of them takes you to the create a category section.

Thank you very much for your reple.. however. I use a custom design and my "normal" SMF template is kinda **** up. So i can not see the links that are normally there. Could you tell me what the links / menu items are while hovering the FAQ button?
Sorry for my poor English, but i think it's probably better then your Dutch :)

Suki

The links should be:

admit page: ?action=faq;sa=manage
add a faq:  ?action=faq;sa=add
manage categories: action=faq;sa=managecat
add a category: ?action=faq;sa=addcat

thats all 4 submenus this mod adds.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

MissyNL

Sorry for my poor English, but i think it's probably better then your Dutch :)

Kindred

I ran into this issue as well. My template does not use the dropdown submenus....

So, I added the manage categories link to the FAQ page, just after the add an FAQ button.

Side note, it might be nice if the manager categories and/or add a category were also in the admin menu... :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

FireDitto

Quote from: Kindred on March 06, 2013, 06:20:01 PM
Side note, it might be nice if the manager categories and/or add a category were also in the admin menu... :)

I agree :)

I use the Menu Editor Lite, and it doesn't keep the menu buttons of mods, so I had a lot of trouble figuring out how to access the different sections. It would be much tidier I think, if they were in the admin area.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Kindred

well, I added them into the admin area by adjusting the code. :)

Code (find in Sources/FAQ.php) Select

'subsections' => array(
'basic' => array(self::$faq->get('basic_settings', 'Text')),
'edit' => array(self::$faq->get('edit_page', 'Text')),
'add' => array(self::$faq->get('add_send', 'Text')),
),

Code (replace with) Select

'subsections' => array(
'basic' => array(self::$faq->get('basic_settings', 'Text')),
'edit' => array(self::$faq->get('edit_page', 'Text')),
'add' => array(self::$faq->get('add_send', 'Text')),
'manage' => array(self::$faq->get('faqmod_manage_category', 'Text')),
),

Code (find in Sources/FAQ.php) Select

$subActions = array(
'basic' => 'WrapperBasicFaqSettings',
'edit' => 'WrapperEditFaqAdminPage',
'add' => 'WrapperAddFaqAdminPage',
);

Code (replace with) Select

$subActions = array(
'basic' => 'WrapperBasicFaqSettings',
'edit' => 'WrapperEditFaqAdminPage',
'add' => 'WrapperAddFaqAdminPage',
'manage' => 'WrapperManageCatFaqAdminPage',
);


Code (find in Sources/FAQ.php) Select

/* Main function */

Code (add before) Select

/* And another... */
static function ManageCatFaqAdminPage()
{
redirectexit('action=faq;sa=managecat');
}


this add the "manage categories" into the admin menu for the FAQ section...    from there you can get to "add a category", so I figured it wasn't worth adding another menu item just for that, but you could if you felt you had to using the same method.

I also added the "manage catgeory" button into the actual FAQ page, to appear just after the "add a FAQ" button. (this is, if you want users who have permission to add FAQs to also be able to add categories
Code (find in Themes/default/Faq.template.php) Select

    // Add a  new FAQ
    if($context['faqperedit'])
    echo '
      <div id="confirm_buttons">
        <form action="', $scripturl, '?action=faq;sa=add" method="post" target="_self">
          <input type="submit" name="send" class="sbtn" value="',$txt['faqmod_add_send'],'" />
        </form>
     </div>';

Code (replace with) Select

    // Add a  new FAQ
    if($context['faqperedit'])
    echo '
      <div id="confirm_buttons">
        <form action="', $scripturl, '?action=faq;sa=add" method="post" target="_self">
          <input type="submit" name="send" class="sbtn" value="',$txt['faqmod_add_send'],'" />
        </form>';

    // Manage Categories
    if($context['faqperedit'])
    echo '
        <form action="', $scripturl, '?action=faq;sa=managecat" method="post" target="_self">
          <input type="submit" name="send" class="sbtn" value="',$txt['faqmod_manage_category'],'" />
        </form>';
echo '
     </div>';

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Suki

I'm currently working on a custom mod that pretty much turned into a re-write of this one, while the code is still fresh on my mind I will push it to github.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Skaty

Quote from: Kindred on March 10, 2013, 08:37:13 AM
well, I added them into the admin area by adjusting the code. :)

i did these but members still can't add faqs. when i gave the members ''Edit/Add/Delete FAQs and categories'' permisson this time they can add faq but also they can delete them. i want permission just for add faqs.  what am i doing wrong ?

Kindred

ummm....   read that permission....

'Edit/Add/Delete FAQs and categories


so obviously, they can also delete them.

I am not certain that this mod HAS separate permissions for editing adding and deleting
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Suki

It does on the new version but of course people can't even bother to see that.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Kindred

what new version?

I installed the version from the mod site and it just has the edit/add/delete as a combined permisson
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Suki

.____.

If it doesn't exist here then it doesn't exist anywhere right?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Kindred

never said that, Suki...

but I have too many sites and too many mods to go searching.
I am actually like most of the users here in this...   if it is on the mod site, I assume that it is the current, or at least the currently supported version.

If it's supposed to be gotten from somewhere else, thena large lettered statement in the mod description would be extremely useful.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Suki

uh, no, it won't help, people, as you had demonstrated, can't be bother to search or even go to an external site. They won't put any effort towards something they want, it is ridiculous, there is people that even complain that they have to go to some external site to get the mod. I recall you saying that.

If people don't care then I don't care either, seems fair enough.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: