Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3057)
FAQ mod
by Miss All Sunday (http://missallsunday.com)
There is no support for this mod from the mod author, thanks goes to those who only complains but never actually show any gratitudeLicense * This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
Special thanks to Spuds (http://www.simplemachines.org/community/index.php?action=profile;u=11359) for that awesome debugging :D
This mod needs php 5.2+ to work properlyDescriptionThis mod allow you to have a separate page where you can publish your FAQs (Frequently Asked Questions)
some features:
-Categories, you can add as many categories as you want.
-Permission to Edit/Add/Delete FAQs and categories.
-Pagination, to easily navigate through the FAQs if you have too many of them.
-3 ways to sort your FAQs, by title, by ID or by category.
-Select the position for the FAQ button within your Main Menu.
-You can use JavaScript to hide the body/answer to save some space, to show the body/answer, just click on the title.
-Permission to "see" the FAQ page.
-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs.
This mod uses hooks, which means non of your files are edited during the installation.
for SMF 2.0.x onlyLaguage-English
Change Log- 2.0
Cleaner code.
Search feature.
Add more links to manage faqs and cats.
Separate permissions for adding, editing, deleting and searching.
-1.2
Fixed a bug with the categories been reset when editing a faq.
Re-write in OOP, the mod now performs less queries by using the cache system if avaliable.
Some code improved.
-1.1
-Added categories
-Permission to Add/Edit/Delete FAQs and Categories.
-Lots of bugs fixed.
-Previews.
-1.0.1
-Revamp of language strings.
-Use of javascript:void(0) instead of # on Faq.template.php.
-Fixed an issue witht the WYSIWYG editor, thenks to Tenma.
-1.0
-Finished first version.
I installed this and tested out.. very nicely done
Hi MAS
Once installed where would I find the FAQs?
Looks interesting.
Brack1,
Once installed it will be at the top called "FAQ' when you put your mouse over it lets you add a new faq or modify the settings for it.
Cheers bud.
As my forum is related to the area where i live this mod may come in very useful.
What won't be easy will be finding questions ::)
Just installed this MOD and it works great!
Would you consider in the future adding a permission as to who can edit FAQs? We have some global moderators who help manage our site but don't have full admin powers (they don't deal with technical matters). They can edit News and would like them to be able to edit FAQs as well.
Grazie,
Cal
Very useful mod. Please add russian translation.
Thanks for this Mod.
Here the German Lang
Tried to add a FAQ and got
QuoteAn Error Has Occurred!
You must provide a body.
Nothing in my error log.
Congratulations! Finally a nice little package. I was looking for this item!
Are attached to the Hungarian language files.
Quote from: MATTEK on June 21, 2011, 03:43:59 AM
Tried to add a FAQ and got
QuoteAn Error Has Occurred!
You must provide a body.
Nothing in my error log.
are you using the WYSIWYG editor?
mmm, it appears that if you are using it, it won't let you save the body, let me check about it.
@Everyone Thanks you all for your translations, however, I got plans to add a permissions to edit/add FAQs so I may add 3 or 4 new txt strings, hope you can translate those too :)
Quote from: MATTEK on June 21, 2011, 03:43:59 AM
Tried to add a FAQ and got
QuoteAn Error Has Occurred!
You must provide a body.
Nothing in my error log.
I get this as well
where would you change it so you won't be using the WYSIWYG editor?
I am working on it right now, unfortunately its a lot more difficult that I expected :( a quick way to solve it is to turn off the WYSIWYG editor, on your Sources/Faq.php file find:
// Needed for the WYSIWYG editor.
$modSettings['disable_wysiwyg'] = !empty($modSettings['disable_wysiwyg']) || empty($modSettings['enableBBC']);
and replace with:
// Needed for the WYSIWYG editor.
$modSettings['disable_wysiwyg'] = true;
this will turn off the editor, this is not the way I want to solve this as I want that users can be able to use the WYSIWYG editor to add/edit the FAQs.
I went to my Looks and Layout and unchecked 'Turn on WYSIWYG editor on post page by default' and I was able to create FAQs
Quote from: Jessica. on June 21, 2011, 02:14:28 PM
I went to my Looks and Layout and unchecked 'Turn on WYSIWYG editor on post page by default' and I was able to create FAQs
Do you mean Theme and layout?
nope. I went to Profile --> Look and Layout.
I don't have that checked anyway.
@ MissAllSunday - If I change the code like you said do you think it will effect my quick reply with BBC and smilies?
MATTEK No, it will affect only the FAQ mod.
Thank you.
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.
In Sources/Faq.php file find:
// 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:
// 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.
Thanks...and you should also include categories for your FAQs...don't you think?
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.
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).
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.
Hate to say this but I see no links.
???
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.
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?
The globe underneath my avatar...
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 ;)
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....:(
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
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
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...
@ Cal the rules mod works on 2.0 except ALL the files have to be manually edited.
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.
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...
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.
I also need a category.
I don't desperately need categories, but I wouldn't mind that feature :)
MAS - Consider adding 'class="button_submit"' to your buttons so they fit in with SMF Styling. Looks nice though, congratulations on getting it finished :)
@GlitchPC, WasdMan and Jessica., fair enough ;) I will add categories for the next version.
@Labradoodle-360 thanks, I'm going to use the button from the SMF editor and that, I believe, already has that class :)
Fantastic! Looking forward to seeing the next update!
You've written a really great MOD and are making it even better!
Cal
It does utilize the proper class, good luck :) You know where to find me if you have any questions.
For WYSIWYG support:
Sources/Faq.php
isAllowedTo('faqperview');
if (!empty($_REQUEST['body_mode']) && isset($_REQUEST['body']))
{
$_REQUEST['body'] = html_to_bbc($_REQUEST['body']);
$_REQUEST['body'] = un_htmlspecialchars($_REQUEST['body']);
$_POST['body'] = $_REQUEST['body'];
}
isAllowedTo('faqperview');
Themes/default/Faq.template.php
id="postmodify" class="flow_hidden"
id="postmodify" class="flow_hidden" onsubmit="submitonce(this);smc_saveEntities(\'postmodify\', [\'title\', \'body\']);"
Thank you good work
Nice Mod
when Update dont forget portuguese and brazilian
Thank you good work
Nice Mod
when Update dont forget portuguese and brazilian
Very nice mod. :)
Just passing through because I had to give you props for
',FaqCare(),'
To have the option shows class imo. 8)
Cheers :)
Thank you Sabre.
Ok, a Small update:
Change Log
-1.0.1
-Revamp of language strings.
-Use of javascript:void(0) instead of # on Faq.template.php.
-Fixed an issue with the WYSIWYG editor, thanks to Tenma.
Updated russian translation.
Quote from: Miss All Sunday on June 29, 2011, 08:01:44 PM
Thank you Sabre.
Ok, a Small update:
Change Log
-1.0.1
-Revamp of language strings.
-Use of javascript:void(0) instead of # on Faq.template.php.
-Fixed an issue with the WYSIWYG editor, thanks to Tenma.
dang, not used to updating mods. do I have to uninstall the old verison and install the new version, or is there a way to upgrade...? I already have like 6 FAQs and it's a pain to redo them all over again...
You can uninstall and re-install, just do NOT check the box to remove all data, your FAQ's will still be there when you re-install
Thanks for the Update.
Here the new German Lang
Quote from: Spoogs on June 29, 2011, 10:36:40 PM
You can uninstall and re-install, just do NOT check the box to remove all data, your FAQ's will still be there when you re-install
okay doke, thanks ^_^
or you can actually just upload the new version files to their respective folders, since this mod does not made any files edits, you can just upload those files and you will have you mod updated.
Note that this is only valid when there's no database changes.
Excellent mod, waiting for it long time back.
Will try soon.
As said, categories would be so useful too.
Yeah, I'm almost done with the categories and also added some other minor features, should be available soon if nothing mayor occurs.
Hi Miss All Sunday,
Thank you for the wonderful mod.
I just have a problem: guests can't see the FAQs at all. How do I fix this?
Thanks. :)
EDIT: Oops, I found it. Should have tried the Permissions section before posting here. :P
Yes, you must set up the permissions for all your user groups ;) by default only the admin can see the faq page.
Hey MAS
I've been thinking.
Now I have finally started using the mod is there a way questions can be placed in a particular order.
Example:
I have written two questions but want the second to be in place of the first.
you can sort them by ID, the question you want to appear first, will be created first, the second one will be the second.
you can also sort it by name, just include something like 1 in the first and 2 on the second on their respective titles.
OK, here's a test package for the 1.1 version release with categories and all that other stuff added.
Please report any glitch you may find.
To install this just uninstall the old one, DO NOT click in the "Remove all data associated with this modification. [Details]" check box, then install the new one.
Done and no glitches so far.
The mod was tested by Spuds (http://www.simplemachines.org/community/index.php?action=profile;u=11359) and I could safely said its stable enough, however, I'm sure issues will arrive as people use this in ways We couldn't think of :P
BTW thanks for showing the copy stuff ;)
Copy stuff?
There will always be one user whom wants something more added.
Hi there,
thank you for this mod and the new category option.
The categories can't be edited or deleted from the smf acp. Editing/deleting them in the database seems to work fine though.
@ thxx1138 Hi, whats seem to be the issue? you can edit/delete/create categories directly from the SMF admin panel.
@Brack1 the copyright link ;)
No, i can't.
No changes are saved (changing a category name, deleting a category) when i'm using the smf admin panel (as stated before).
It's not a great deal breaker because making these changes in the smf_faq_categories table seems to work without breaking something.
I tried this with a fresh installation of smf gold and your mod.
any error on your error log?
After trying to edit a categories name i get these three errors:
- see screenshot1 -
After trying to delete a category i get the same errors:
- see screenshot 2 -
To be sure that the changes i made in the the smf_faq_categories table by hand aren't causing this i made a fresh install with smf gold and your module and tried to edit/delete the 'default' category but got the same errors.
mmm, looks like I forgot to globalize $GetCats variable, my bad.
try the attached file.
Russian translation for 1.1 beta
Editing categories works now, but deleting them doesn't.
Error log: see screenshot
mm, that is weird, I don't recall missing globals as that are pretty visible and common errors.
use this one, hopefully this will be the one.
Quote from: Miss All Sunday on July 26, 2011, 11:39:27 AM
use this one, hopefully this will be the one.
It IS the one ;).
Everything works fine now. Thank you for your hard work.
After removal of this mod in the database are saved unnecessary data.
The customization approval guidelines does not force you to uninstall the hooks you use.
This is actually a good thing about hooks, even if you upgrade or completely overwrite all SMF files, the mod will still be working.
with that said, this mod does give the user the option to remove the Tables this mods creates:
faq
faq_categories
How can other users post a faq ?? for example normal users ??
This mod uses permissions, the one I attached here:
http://www.simplemachines.org/community/index.php?topic=438980.msg3119417#msg3119417
Does have permissions to edit/create/delete faqs
Ok, thanks , but the problem is , that i want to separate the rules for editing and creating of faq´s
Normal Users should be able to post faq´s , only mod´s should be able to edit faq´s and create categories..
It can be done, let me see and I'll post later the necessary changes
thanks a lot :)
OK PS4DEV
on your /Sources/Faq.php file find:
// Permission hook
function FaqPermissions(&$permissionGroups, &$permissionList){
$permissionGroups['membergroup']['simple'] = array('faqper');
$permissionGroups['membergroup']['classic'] = array('faqper');
$permissionList['membergroup']['faqperview'] = array(false, 'faqper', 'faqper');
$permissionList['membergroup']['faqperedit'] = array(false, 'faqperedit', 'faqper');
}
replace with: (this will also solve a bug I recently found.)
// Permission hook
function FaqPermissions(&$permissionGroups, &$permissionList){
$permissionGroups['membergroup']['simple'] = array('faqper');
$permissionGroups['membergroup']['classic'] = array('faqper');
$permissionList['membergroup']['faqperview'] = array(false, 'faqper', 'faqper');
$permissionList['membergroup']['faqperedit'] = array(false, 'faqper', 'faqper');
$permissionList['membergroup']['faqperadd'] = array(false, 'faqper', 'faqper');
}
find this:
'faq_add' => array(
'title' => $txt['Faq_add_send'],
'href' => $scripturl . '?action=faq;sa=add',
'show' => allowedTo('faqperedit'),
),
and replace with this:
'faq_add' => array(
'title' => $txt['Faq_add_send'],
'href' => $scripturl . '?action=faq;sa=add',
'show' => allowedTo('faqperadd'),
),
find this:
// Fill out the form to get a nice brand new FAQ...
function FaqAdd() {
global $txt, $context, $scripturl;
isAllowedTo('faqperedit');
$context['sub_template'] = 'add';
$context['page_title'] = $txt['Faq_adding'];
$context['linktree'][] = array(
'url' => $scripturl. '?action=faq;sa=add',
'name' => $txt['Faq_adding'],
);
}
and replace with this:
// Fill out the form to get a nice brand new FAQ...
function FaqAdd() {
global $txt, $context, $scripturl;
isAllowedTo('faqperadd');
$context['sub_template'] = 'add';
$context['page_title'] = $txt['Faq_adding'];
$context['linktree'][] = array(
'url' => $scripturl. '?action=faq;sa=add',
'name' => $txt['Faq_adding'],
);
}
find this:
// Adding...
function FaqAdd2() {
global $txt, $context, $scripturl;
checkSession('post', '', true);
isAllowedTo('faqperedit');
replace it with this:
// Adding...
function FaqAdd2() {
global $txt, $context, $scripturl;
checkSession('post', '', true);
isAllowedTo('faqperadd');
on your Themes/default/languages/Faq.yourlanguage.php find:
$txt['permissionname_faqperedit'] = 'Edit/Add/Delete FAQs and categories';
replace with:
$txt['permissionname_faqperedit'] = 'Edit/Add/Delete FAQs and categories';
$txt['permissionname_faqpereadd'] = 'Add FAQs';
$txt['cannot_faqperadd'] 'I\'m sorry, you are not allowed to add FAQs.';
Now you should be able to view a new permission in the FAQ permissions section, you only need to give this permission to the user groups you want to be able to add FAQs, keep in mind that this is a completely new permission, groups with the permission to edit/delete must have also permission to add.
1.
hmm... i can´t find the function FaqAdd2
2.
now there is the option in the drop down menu but the permission to post still isn´t there
Can you attach the Fag.php ?
FaqAdd2 its on Sources/Faq.php around line 404:
// Adding...
function FaqAdd2()
did you do all the edits? including the language ones?
no i did now all changes on the latest release of this mod ( the one that you referred me ) and i doesn´t work ...
Any other ideas ?
define "doesn't work" there is no other ideas, I tested it before I posted it, did you give your users the proper permissions?
did you do all the changes correctly? you must do all the changes I told you in order to work properly.
to add and to edit are now two separate permissions, one group that can edit does not necessarily can add and vice versa.
i did this changes several times but it still won´t work.
besides you did some mistakes here:
$txt['permissionname_faqperedit'] = 'Edit/Add/Delete FAQs and categories';
$txt['permissionname_faqpereadd'] = 'Add FAQs'; // faqperadd != faqpereadd
$txt['cannot_faqperadd'] 'I\'m sorry, you are not allowed to add FAQs.'; // forgot "="
if i solve that mistakes it doesn´t work even :(
Cant you attach your ready version that you tested before ?
again, please define "doesn't work" I can't help if I don't know whats the issue...
you just need to add a =
$txt['cannot_faqperadd'] = 'I\'m sorry, you are not allowed to add FAQs.';
whats the issue? do you can't give the permission to add faqs to your users?
I need more info if you want me to help you, otherwise I will just ignore the request and proceed with the release of version 1.1
any way, here's version 1.1:
Change Log
-1.1
-Added categories
-Permission to Add/Edit/Delete FAQs and Categories.
-Lots of bugs fixed.
-Previews.
-Added Russian language
-Added Spanish_es, Spanish_latin language
ok, that how i do it :
first i do all your changes , that you listed.
than i give the member group "normal users" the permissions Add FAQs + View FAQs
that works all very well ,
but if i test it on a test account it doen´t work , i gave the permissions but you still can´t add a faq :(
thats the problem
Quote from: Miss All Sunday on August 05, 2011, 03:30:30 PM
any way, here's version 1.1:
Change Log
-1.1
-Added categories
-Permission to Add/Edit/Delete FAQs and Categories.
-Lots of bugs fixed.
-Previews.
-Added Russian language
-Added Spanish_es, Spanish_latin language
Quick question... do I just install this new one, or is the uninstall of the older version necessary first?
If so... what of all the present FAQ's done up for the forum?
If you do not check "Remove all data associated with this modification" you entries should be preserved. Miss all Sunday, you did not use overwrite to create your db tables, correct?
Hi,
I uninstalled 1.0.1 and replaced it with 1.1 and I have one small problem:
I don't speak Spanish.
Could you please put English support back in?
Thanks,
Cal
Yeah... the Spanish isn't helping ;)
LOL I used the English file as a base for the Spanish translation, I guess I saved the file as it was.
I have updated the package, there's no need to install it again, just replace your /Themes/default/languages/Faq.english.php file with the one I attached and clean your cache.
Quote from: live627 on August 05, 2011, 08:07:58 PM
If you do not check "Remove all data associated with this modification" you entries should be preserved. Miss all Sunday, you did not use overwrite to create your db tables, correct?
the mod will attempt to look for older tables and update only if necessary. but yes, as long as you don't click on the "Remove all data associated with this modification" you should be fine.
I have ver 2.0 and have tried to install FAQ mod.
I get the error: BLOB/Text column "body" can't have a default value. File /temp/database.php line 117
What should I do to install this mod?
Perhaps your MySQL version is too old for having a default value for text types.
You can try changing this:
array(
'name' => 'body',
'type' => 'text',
'size' => '',
'default' => '',
),
with this
array(
'name' => 'body',
'type' => 'text',
'size' => '',
),
in the database.php file, then zip it all again and install
Love the mod. I wanted to get rid of a little wasted space on the Categories and FAQ List block as shown below. What changes would I need to make in the Template to move them over a little closer to left side?
Also, is there a way to increase the number of characters or length of the subject. I am moving some of my FAQs over from the forum and it does not accept the same number of characters in the subject length as the SMF post do.
Thanks,
RGecy
The CSS for the faq mod is stored in Sources/Faq.php file in the function faq_headers()
from there you can change the css for the categories.
.faq_list ul, .faq_categories ul {
list-style-image: none;
list-style-position: outside;
list-style-type: none;
padding-left:10px;
}
the length and max length can be edited in the /Themes/default/Faq.template.php file, search for this:
<input type="text" name="title" size="55" tabindex="1" maxlength="55"
That doesnt seem to change it. Is there some padding for that table that needs to be changed?
Can you change the permissions so guest can see the FAQ page.
i had some problem to install it,
but i managed to do it, and it works perfect now/.
thanks
OK, I'm going to do some cleaning on this one, better code, optimize thing here and there, etc if someone has any features/ideas that you would like to see on the next version, now is the time ;)
Grief MAS Am I right in saying ya enjoying this mod?
I can't think of any way to improve on this more than you have already.
better than enjoying I'm learning, a lot ;)
This might be a stupid question, but where do I set the permissions for other members to view the FAQ? Right now, the Admin is the only one that can see the FAQ tab. When a member tries to manually enter the FAQ address, it gives this error: I'm sorry, you are not allowed to view the FAQ page.
the permissions are set in the same place where all permissions are, you can access the permissions right in the admin tab in the main menu, the last sub menu its permissions, there you select your member group then modify then you will see the permissions for the faq page.
Quote from: Miss All Sunday on August 27, 2011, 06:02:00 PM
the permissions are set in the same place where all permissions are, you can access the permissions right in the admin tab in the main menu, the last sub menu its permissions, there you select your member group then modify then you will see the permissions for the faq page.
Got it. Thanks for the quick response!
How to add category?
there should be an admin submenu under the FAQ tab where you can mange your categories, including adding a new one.
MAS I recently manually installed Remove Help Mod (http://custom.simplemachines.org/mods/index.php?mod=2640)
Thankfully there was only 1 file involved. :)
However the FAQs has moved from being between the Forum and Forum Rules menu tabs to the wron side of the Logout menutab.
Is there a way I can move it back?
That behavior suggests that it looks for the help tab. It needs modified to look for the forum tab. I can't remember for sure off the top of my head, but the code might be in Subs-FAQ.php.
Quote from: Brack1 on September 05, 2011, 08:04:27 PM
MAS I recently manually installed Remove Help Mod (http://custom.simplemachines.org/mods/index.php?mod=2640)
Thankfully there was only 1 file involved. :)
However the FAQs has moved from being between the Forum and Forum Rules menu tabs to the wron side of the Logout menutab.
Is there a way I can move it back?
You can select where do you want to place the button, I assume you selected "search", you can select another tab, the code is on Sources/Faq.php:
// 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_admin' => array(
'title' => $txt['faq_manage'],
'href' => $scripturl . '?action=faq;sa=manage',
'show' => allowedTo('faqperedit'),
'sub_buttons' => array(
'faq_add' => array(
'title' => $txt['Faq_add_send'],
'href' => $scripturl . '?action=faq;sa=add',
'show' => allowedTo('faqperedit'),
),
),
),
'faq_category' => array(
'title' => $txt['faq_manage_category'],
'href' => $scripturl . '?action=faq;sa=managecat',
'show' => allowedTo('faqperedit'),
'sub_buttons' => array(
'faq_add' => array(
'title' => $txt['Faq_addcat_send'],
'href' => $scripturl . '?action=faq;sa=addcat',
'show' => allowedTo('faqperedit'),
),
),
),
),
)),
array_slice($menu_buttons, $counter)
);
}
Sheesh MAS I wasn't expecting a reply for at least a day. :)
The code you supplied.. is it to go somewhere?
No, the code its just the function to show the button.
You dont actually need to add code, you just need to select another option for the menu, currently you can chose between: Home
Help
Login
Register
if the htlp button dont exist anymore, just chose another button, "home" for example.
I was looking at between Forum and Forum Rules.
Just trying to fully understand what I have to do.
(besides it's almost 3am). :o
Go to the mods settings page:
yoursite/index.php?action=admin;area=faqdmin
Select the position for the FAQ button in the menu
By default is next to home.
and select nother option, select home, for example.
Call me a banana I completely forgot about that part of the mod.
Thanks MAS
This mod sounds great. Is it compatible with SMF 2.0.1? If not, when will you be updating it?
It should be compatible now.
Works like a charm with SMF 2.0.1! I can now move all the "How to..." topics to FAQ's.
Thanks.
After updating to SMF 2.0.1, "Uninstall" is not available for this mod. Do I need to update it? If so, what is the procedure?
Thank you for a great mod and I absolutely love the modifications you have added since its original release.
Im pretty sure I added the for="2.0 - 2.0.99" for uninstall too, did you downloaded the mod recently? I just updated the mod yesterday to add compatibility to 2.0.1
for uninstall you can emulate version 2.0, on your mod list, below theres an Advanced link, click on it, on the text filed type SMF 2.0 and click on apply, now you would be able to uninstall the mod, once uninstalled, click on advance again and then on "Revert"
No, I did not download your most recent version. I will perform the emulation and revert...and upload and re-install your most recent version. Thank you for the quick reply.
Edit: Just a heads up... Everything went smoothly and the "Uninstall" feature is back. Thanks, again, for the quick response.
Helou,
I use FAQ Mod 1.0.1 after update to SMF 2.0.1 it works normally :)
Should I reinstall to new version ?
Will I loose text in FAQ ?
The mod is really very nice,
Thank YOU
You will not lose the FAQs on upgrading to 2.0.1
Downloaded
Install packages
Message is: You already have instaled this mod and ther is no upgrade ???
Should I first uninstall than install again in that case will i loose data ??
:(
Thanks
Ok :) Thanks I understud but if I deinstall mod than i install new version this is not upgrade this is new install ??
You will NOT lose any FAQs
::)
ok :) if You say so i'll try :-)
Quote from: pevanis on September 24, 2011, 01:01:09 PM
ok :) if You say so i'll try :-)
Only reason I know is because I have already done this.
:) Thanks I did and everything is fine
Miss All Sunday,
Any plans for adding new features to this mod?
am sorry if posting on the wrong board pls
am new 2 smf i having been trying to install mods and i keep getting
/You cannot download or install new packages because the Packages directory or one of the files in it are not writable!/
i need help pls
Quote from: GlitchPC on October 16, 2011, 05:52:15 AM
Miss All Sunday,
Any plans for adding new features to this mod?
What were you looking at for features?
IMHO the mod has plenty as it stands now.
@banks12
You are better off asking in the support boards.
Quote from: GlitchPC on October 16, 2011, 05:52:15 AM
Miss All Sunday,
Any plans for adding new features to this mod?
I have no ideas for this mod, if you have some then post your ideas.
Quote from: Miss All Sunday on October 16, 2011, 07:16:05 PM
Quote from: GlitchPC on October 16, 2011, 05:52:15 AM
Miss All Sunday,
Any plans for adding new features to this mod?
I have no ideas for this mod, if you have some then post your ideas.
Don't get me wrong...this is an AWESOME mod! I like the fact you added categories. This was a major plus for this mod.
You're right...it does have plenty of features as it stands now.
Would it be possible to have a setting, in admin, which would allow you to move a category up/down on the list? You already have the category list where we can add/remove categories...but we can only sort the faqs themselves and not the categories. It's no big deal...but, would be a great feature...if you're so inclined to add it...and it's not too much trouble.
Well do you need a way for changing the number ID for each category or do you just want a way to sort the categories like the option to sort the FAQs?
It wouldn't be like the faqs themselves. On the faq page you have the categories on the left....right?
Would it be possible to have an admin feature that allows you to move a category up/down on the list so that it's displayed on the faq page in the order you'd like to have it displayed?
Great mod! :)
Quote from: GlitchPC on October 17, 2011, 01:25:24 PM
It wouldn't be like the faqs themselves. On the faq page you have the categories on the left....right?
Would it be possible to have an admin feature that allows you to move a category up/down on the list so that it's displayed on the faq page in the order you'd like to have it displayed?
If I can find a clean solution for that then I will add it.
Thank you...I'll keep my fingers crossed.
Just installed this with a work-around for the "temp" package installation issue. I get the settings page, but when I try to add an FAQ it gives me a blank page.
Can you list simple steps to install your mod manually. The "manual mod installation" write-up does not seem to apply at all. My package manager does not work.
Move the included file "Faq.php" to "./Sources".
Move the included file "Faq.template.php" to "./Themes/default".
Move the included file "Subs-Faq.php" to "./Sources".
Move the included directory "languages" to "./Themes/default" or the content of the languages folder to ./Themes/default/languages
move hooks.php and database.php to your forum root and call them with your browser: myforum.com/hooks.php
the manual Installation Instructions does not apply because this mod does not perform any file edit.
Thanks for your answer, but I do not see hooks.php.
my bad, hooks.php its just an archive I'm working on, this version only has database.php, upload that file to your forum root and call it with your browser.
OK, thanks. I'll try that with what I have learned so far.
I just installed this mod, I thinks it's a really interesting, but I have a problem, I can create the Faqs but I can't create categories, I only have "default" created and I can't even change it. Any solution?.
Thank you :)
If you are the admin, under the FAQ button, as a sub-button there should be a button called "Manage the categories" clicking there will take you directly to the category manage page, from there you can add another category.
also, the manage categories have a sub-button called add a new category.
Gracias, Thank you!, the problem was my theme navigation didn't show these two options. I've changed it and now it's working.
I guest the main menu button been the only way to access the categories is an issue, the mod must provide an admin button just like the "add a new faq" button, I'll take a look at it.
Thankyou for this good mod
Only thing missing is spell check :)
The mod uses the WYGIWYS SMF editor, if you enable the spell check in your forum it will appear on the add faq page.
Most modern browsers already have an inbuilt spell check.
Quote from: Miss All Sunday on November 08, 2011, 07:06:26 PM
The mod uses the WYGIWYS SMF editor, if you enable the spell check in your forum it will appear on the add faq page.
Most modern browsers already have an inbuilt spell check.
Er don't you mean WYSIWYG?
meh, typo... you get my point.
Rasp
:-X
Quote from: Miss All Sunday on November 08, 2011, 07:06:26 PM
The mod uses the WYGIWYS SMF editor, if you enable the spell check in your forum it will appear on the add faq page.
Most modern browsers already have an inbuilt spell check.
I do have spell check enabled from same day my forum was installed. spell check work every where else but don't show in FAQ.
I guess I will have to look into it and see what I can work out..
the problem I'm having with it is,
it only shows up when I'm logged in as Admin.when I log on as a regular member,It does not show at all.
Quote from: krash661 on November 11, 2011, 09:04:41 PM
the problem I'm having with it is,
it only shows up when I'm logged in as Admin.when I log on as a regular member,It does not show at all.
You need to set the permissions for each user.
Hi
I alredy installed this mod (works well and looks nice). Unfortunately when I try put html code to WYSIWYG editor and save - i see all html code (preview works well)
Previev
(https://lh3.googleusercontent.com/-em08GVqO8CY/Tr7VX5oJ2vI/AAAAAAAAJms/IrJcswPX2jQ/s800/faq-mod-prev.jpg)
Save
(https://lh5.googleusercontent.com/-JtNqn7Venlo/Tr7VX9E71pI/AAAAAAAAJmw/FuRBBpU1m9Q/s800/faq-mod-save.jpg)
Thanks for any serviceable solutions
-----------------------------
info: theme default, SMF v. 2.0.1
Quote from: live627 on November 11, 2011, 09:34:39 PM
Quote from: krash661 on November 11, 2011, 09:04:41 PM
the problem I'm having with it is,
it only shows up when I'm logged in as Admin.when I log on as a regular member,It does not show at all.
You need to set the permissions for each user.
ok,so where is the permission for it at?
Admin->Permissions [Members] -> General permissions [Modify] - set for each membergroups -> (label) "FAQ mod permissions"
oh.ok thanks i found it its working great now..thanks for your help
is there a way to enable the html codes for this mod? i need it for the paypay verified seal...thanks for your help.
Use a portal page or a block. IIRC, this mod just uses the bbc parser.
Quote from: live627 on November 28, 2011, 10:26:45 PM
Use a portal page or a block. IIRC, this mod just uses the bbc parser.
"""-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs."""
above is the quote from the Description ..
""" Use a portal page or a block. IIRC, this mod just uses the bbc parser."""
I don't understand what the above means.
Quote from: krash661 on November 29, 2011, 09:24:13 AM
Quote from: live627 on November 28, 2011, 10:26:45 PM
Use a portal page or a block. IIRC, this mod just uses the bbc parser.
"""-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs."""
above is the quote from the Description ..
""" Use a portal page or a block. IIRC, this mod just uses the bbc parser."""
I don't understand what the above means.
It means HTML tags are not allowed in the FAQs.
Quote from: Miss All Sunday on November 29, 2011, 10:32:51 AM
Quote from: krash661 on November 29, 2011, 09:24:13 AM
Quote from: live627 on November 28, 2011, 10:26:45 PM
Use a portal page or a block. IIRC, this mod just uses the bbc parser.
"""-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs."""
above is the quote from the Description ..
""" Use a portal page or a block. IIRC, this mod just uses the bbc parser."""
I don't understand what the above means.
It means HTML tags are not allowed in the FAQs.
so then this is not true,"""-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs."""
and in other words the answer is no?
Quote from: krash661 on November 29, 2011, 02:12:30 PM
Quote from: Miss All Sunday on November 29, 2011, 10:32:51 AM
Quote from: krash661 on November 29, 2011, 09:24:13 AM
Quote from: live627 on November 28, 2011, 10:26:45 PM
Use a portal page or a block. IIRC, this mod just uses the bbc parser.
"""-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs."""
above is the quote from the Description ..
""" Use a portal page or a block. IIRC, this mod just uses the bbc parser."""
I don't understand what the above means.
It means HTML tags are not allowed in the FAQs.
so then this is not true,"""-You can use BBC code on your FAQs, this mod uses the SMF editor which make it easy to add/edit your FAQs."""
and in other words the answer is no?
it's exactly as it says... BBC code is NOT HTML code.
you can use BBc code in any FAQ, you cannot use HTML code.
sorry my english ;)
I can not install the mod without emulation versions.
I can not edit category:
8: Undefined variable: GetCats
File: C:/xampp/htdocs/smf/Sources/Faq.php
Line: 471
2: in_array() expects parameter 2 to be array, null given
File: C:/xampp/htdocs/smf/Sources/Faq.php
Line: 471
Delete Category:
http://localhost/smf/index.php?action=faq;sa=deletecat2;catid=1
2: in_array() expects parameter 2 to be array, null given
File: C:/xampp/htdocs/smf/Sources/Faq.php
Line: 498
meh.. it's an old bug, I thought I released a fixed version but it appears I didn't... I'll update the mod later today.
I liked your mod I've been wanting this
another look at the BBC editor - there is no width is specified and it looks crooked:
$editorOptions = array(
'id' => 'body',
'value' => !empty($context['edit']['current']['body']) ? $context['edit']['current']['body'] : '',
'width' => '90%',
);
this is not enough :-\
For example:
// Now create the editor.
$editorOptions = array(
'id' => 'body',
'value' => $form_message, // BBC coded not html
'rows' => 12,
'columns' => 600,
// add height and width for the editor
'height' => '175px',
'width' => '100%',
// 'form' => 'add',
'labels' => array(
'post_button' => 'Send',
),
// We do XML preview here.
'preview_type' => 2,
// 'preview_type' => false,
);
Thanks, however, before I do some changes I need to know if those changes will benefit the vast majority of users, not all users uses the same screen resolution or the same theme.
I already provide an external send and preview button, not using the ones provided by the editor it's fully intentional.
Hi,
became this Error
Quote
http://.../index.php?action=faq;sa=category;catid=1
8: Undefined index: 1
Datei: /.../Sources/Faq.php
Zeile: 551
Will this mod install ok on smf 2.0.2 or should I wait for you to update it?
How do questions get added to the FAQ page?
Can I just mark a topic in our forum as a FAQ and it automatically gets added to the FAQ page?
thanks,
Edited to add: Do FAQ's show up in forum searches?
Will this mod install ok on smf 2.0.2 or should I wait for you to update it?
Yes, you just need to emulate version 2.0
How do questions get added to the FAQ page?
one you istalled the mod, you will be redirected to the mod's admin interface from there you will be able to add faqs via the "add a new faq" button, you can also see this button in the faq page.
Can I just mark a topic in our forum as a FAQ and it automatically gets added to the FAQ page?
No, FAQs are independent from the messages.
Edited to add: Do FAQ's show up in forum searches?
No.
this mod uses permissions, if you need someone else to add FAQs make sure this person have the permission in the membergroup
@Eclipse16V attach your /Sources/Faq.php file.
Ok, going to give it a try.
Was about half way through reading this whole topic and was glad to see categories got added.
Going to have FAQ with categories for
Refrigerators
Washers
Dryers
etc....
I tried creating FAQ topics at one time and pinning them to the top of the different board, but did not like the way it looked.
This should make a nice addition to our forum, thanks.
Edited to add: Seem to install just fine, thanks!
I have not added a new mod to our site in sometime. It's kind of like getting a new toy. :)
Happy to add the FAQ mod © Miss All Sunday at the bottom for all your hard work.
I notice after you click to preview a FAQ it changes the category back to the #1 category if you had something other then that selected.
Maybe it's just me or it's already been reported?
No it hasn't been reported before, thank you. Most likely a bug.
I will take a look, and will update the mod when I find some time.
Quote from: Miss All Sunday on December 23, 2011, 03:56:38 PM
No it hasn't been reported before, thank you. Most likely a bug.
I will take a look, and will update the mod when I find some time.
When you go to edit a FAQ it also automatically switches back to the #1 category.
How can I increase the max amount of text I can add to the title?
Thanks,
I think I've found the mistake.
Had all the FAQ again re-entered and created the new categories. Since coming to me ever any more error messages. I'm waiting times from the day whether there's times that result.
Thanks anyway for the help ever.
Quote from: ApplianceJunk on December 23, 2011, 04:00:17 PM
Quote from: Miss All Sunday on December 23, 2011, 03:56:38 PM
No it hasn't been reported before, thank you. Most likely a bug.
I will take a look, and will update the mod when I find some time.
When you go to edit a FAQ it also automatically switches back to the #1 category.
How can I increase the max amount of text I can add to the title?
Thanks,
currently it is harcoded in the FAQ.template.php file, find:
<input type="text" name="title" size="55" tabindex="1" maxlength="55" value="',$faq_edit == 1 ? (isset($context['preview_subject']) ? $context['preview_subject'] : $context['edit']['current']['title']) : (isset($context['preview_subject']) ? $context['preview_subject'] : ''),'" class="input_text" />
and change maxlength="55" to whatever you want to be the maxlength.
Quotechange maxlength="55" to whatever you want to be the maxlength.
Thanks
QuoteUse Javascript to hide the body?
If enable, this mod will use javascript to hide the FAQ content,
So if I use the option to hide the body does it also hide the body from google index it or can google still open it and index the context of the body?
I want to make sure google can index everything in the FAQ section.
Well, the hide is made with JavaScript by changing the div's display property to none but the entire body is still there and can be indexed by Google.
On my site I had see the few FAQs I have are all indexed by Google, if you enable the FAQ list then Google will index every FAQ's own page.
Quote from: Miss All Sunday on December 23, 2011, 06:55:29 PM
Well, the hide is made with JavaScript by changing the div's display property to none but the entire body is still there and can be indexed by Google.
On my site I had see the few FAQs I have are all indexed by Google, if you enable the FAQ list then Google will index every FAQ's own page.
Awesome,
How can I refer someone to a certain FAQ or post a link to it?
If you enable the FAQ list, the list will contain a direct link to the FAQ, also if you don't hide the body and you click in the FAQ title it will take you to that FAQ own page.
the generic url is this: yoursite.com/index.php?action=faq;sa=show;faqid=x
where x is the FAQ id you want to see or link to.
Thank again,
Great Mod!
I haven't seen this mentioned within this mod support topic...
Have any of you checked the number of queries this mod generates? Any concerns?
I made this mod in a time where I wasn't too worry about queries or performance for that matter.
The mod indeed can generate a large amount of queries if you have a large amount of FAQs/categories, however, those queries aren't that resource-intensive.
I should probably add the SMF cache system to those queries and probably fetch the FAQs just once instead of fetching it whenever I got a chance. Problem is time and in a lesser extent, motivation.
Same Error
Quote from: Eclipse16V on December 23, 2011, 12:22:49 PM
Hi,
became this Error
Quote
http://.../index.php?action=faq;sa=category;catid=1
8: Undefined index: 1
Datei: /.../Sources/Faq.php
Zeile: 551
Quote from: Suki on December 24, 2011, 08:01:03 PM
I made this mod in a time where I wasn't too worry about queries or performance for that matter.
The mod indeed can generate a large amount of queries if you have a large amount of FAQs/categories, however, those queries aren't that resource-intensive.
I should probably add the SMF cache system to those queries and probably fetch the FAQs just once instead of fetching it whenever I got a chance. Problem is time and in a lesser extent, motivation.
I still like it ;)
Thanks,
Thanks.
For what it's worth, I didn't built this thinking: "Hey! I'm going to build this mod so I can ****** up someone else's forum, you know, just for fun..."
Can no one help me with my error message?
do you have a category with id 1?
what do you do when the error appear?
Yes i have.
This error comes on guest visits.
the error appears only for guest people?
Yes, currently it looks like this.
Quote from: Suki on December 23, 2011, 06:55:29 PM
Well, the hide is made with JavaScript by changing the div's display property to none but the entire body is still there and can be indexed by Google.
On my site I had see the few FAQs I have are all indexed by Google, if you enable the FAQ list then Google will index every FAQ's own page.
Our FAQ section was quickly indexed by google and tonight I notice Google added it to our sitelinks too. :)
Thanks again for this mod.
Cool :)
Im working in a new version that hopfully will reduce the number of queries
Suki, this mod is pretty amazing. I like how you've set everything up and given such clear instructions.
One thing: what code would I need to modify to change the text color in the FAQ body and the sidebar menu to white text? The black doesn't look great on the colors of my forum.
Thanks so much for this mod!
Quote from: Suki on January 16, 2012, 08:08:24 AM
Cool :)
Im working in a new version that hopfully will reduce the number of queries
Alternatively, if there's a way I can change the background color of each FAQ box to be grey instead of red?
PM me if you need to see my forum and I'll give you Tester login info.
All the css is set at Sources/Faq.php file, look for a function name "headers" or something, I renamed the function and forgot the old name.
On that funciton you can change the style.
Each Faq uses generic SMF styles.
Quote from: Suki on January 19, 2012, 03:46:09 PM
All the css is set at Sources/Faq.php file, look for a function name "headers" or something, I renamed the function and forgot the old name.
On that funciton you can change the style.
Each Faq uses generic SMF styles.
Suki, I'm sorry.
I worked all afternoon on this and couldn't figure out how to find which style you used for the function. As you can see, I'm still clearly new to all this. When sub files start messing with the core template, things get wonky for me.
I got into the Sources/Faq.php file and found the header function you mentioned (I think...), but couldn't figure out what to modify to change the background colors.
So, I went into the CSS file to see if I could find any sort of "header" background color and couldn't find that either.
I'm lost. :-\
Any direction you could give me would be very much appreciated.
Is there any way to modify the Sources/Faq.php to reference my board index or post style instead of the "header" style you mentioned so that the text is more legible?
@Michael Pfaff link to your site? and tell me the specific part you want to change.
@everyone interested
Here's a beta for the new version, there is no new features, it's mainly just bug fixes and a re-write in OOP, I didn't have time to re-do the template so that part is pretty much the same.
This will hopefully reduce the number of queries this mod make.
Tested on 5.3.8, it will probably fail on a php4 server, I didn't have time to implement some checking and warnings.
To update just uninstall the old version and DO NOT check the "Remove all data associated with this modification. [Details]" and install the new one, all your faqs and categories will not be deleted.Remove all data associated with this modification. [Details]
Quote from: Suki on January 19, 2012, 08:10:20 PM
@Michael Pfaff link to your site? and tell me the specific part you want to change.
Link: http://louisvillednd.com/forum/index.php
I've made the FAQ visible to guests, so you should be able to view it.
I want to change the text boxes that are dark red where it says "Coming Soon..." and also the Sidebar text boxes that have "Default" and "How do I roll up a starting character?".
If I can somehow get these colors to match the greyish brown color on my board index where each board is listed (Getting Started, Meetups, Gaming Discussion, etc.) that would be ideal.
I'm fine with the actual headers (where it says, "Categories", "FAQ list", etc.) remaining the lighter red color. Just need the content below more readable.
Think that's possible?
OK, open your Themes/default/faq.template.php file and find:
<div class="faq_categories description">
replace with
<div class="faq_categories windowbg">
find
<div class="faq_list description">
and replace with
<div class="faq_list windowbg">
Quote from: Suki on January 19, 2012, 08:47:24 PM
OK, open your Themes/default/faq.template.php file and find:
<div class="faq_categories description">
replace with
<div class="faq_categories windowbg">
find
<div class="faq_list description">
and replace with
<div class="faq_list windowbg">
Yes! That worked. The sidebar is perfect now.
Now, is there a <div class="something"> that I can modify to make the each FAQ description on the page also have the windowbg image behind the text?
I noticed there are two <div class="faqs">. Should I add in windowbg after those?
On the site, it's where I have the "Coming Soon..." text.
The faq itself its a tricky one, the code that controls each faq is this one:
<span class="clear upperframe">
<span></span>
</span>
<div class="roundframe rfix">
<div class="innerframe">
<div class="content',$faq['id'],'" id="content',$faq['id'],'" ',$faqmod_display,'>
',$faq['body'],'
</div>
</div>
</div>
<span class="lowerframe">
<span></span>
</span><br />
Since SMF does some tricks to show rounded corners in every browser, a lot of span tags are needed, you can erase all those spans and just have this:
<div class="custom_class" id="content',$faq['id'],'" ',$faqmod_display,'>
',$faq['body'],'
</div>
where custom_class is the class you want each faq to have, could be windowgb or windowbg2 or some other custom made class.
Quoteit will probably fail on a php4 server
Yep. Just say that on the mod page once this gets there and you'll be fine. But you already know that :)
Quote from: Suki on January 19, 2012, 09:19:24 PM
The faq itself its a tricky one, the code that controls each faq is this one:
<span class="clear upperframe">
<span></span>
</span>
<div class="roundframe rfix">
<div class="innerframe">
<div class="content',$faq['id'],'" id="content',$faq['id'],'" ',$faqmod_display,'>
',$faq['body'],'
</div>
</div>
</div>
<span class="lowerframe">
<span></span>
</span><br />
Since SMF does some tricks to show rounded corners in every browser, a lot of span tags are needed, you can erase all those spans and just have this:
<div class="custom_class" id="content',$faq['id'],'" ',$faqmod_display,'>
',$faq['body'],'
</div>
where custom_class is the class you want each faq to have, could be windowgb or windowbg2 or some other custom made class.
Wow, yeah. There was a lot in there to change and when I thought I had it right, I got an error. So, I just got the theme creator to help me change the text to white and now it is readable.
Thanks so much for your help, Suki!
So, new version, 1.2:
Change Log
-1.2
Fixed a bug with the categories been reset when editing a faq.
Re-write in OOP, the mod now performs less queries by using the cache system if available.
Some code improved.
To update just uninstall the old version and install the new one, if you DO NOT check the "Remove all data associated with this modification. [Details]" you won't lose all your existing Faqs.
Remember, this mod now needs php5 to work properly.
This mod would be highly useful to my forum, I recently downloaded it, but when I go to edit the FAQ or Category, I get this error:
Fatal error: Cannot call method self::FaqManage() or method does not exist in /home/a5023204/public_html/forums/Sources/Faq.php on line 341
My SMF version is 2.02
Perhaps it would be helpful if I took a screenshot of all my current mods I have installed.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffiles.myfrogbag.com%2Fdqvq63%2Fcurrent%2520mods.png&hash=dc955843d981ea2805ca5b02ea3cafce6466267b)
My PHP version is:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffiles.myfrogbag.com%2Fdqvq63%2Fphpversion.png&hash=219d977d0dec7cada4c457d2f2c72c537bdc4e83)
I'm not a coder and have no idea what's even going on. But if I can get some help on this, it would be most appreciative.
Try this, open your /Sources/Faq.php and find;
call_user_func($subActions[$_REQUEST['sa']]);
and replace with:
$subActions[$_REQUEST['sa']]();
Tried it. Did it on first one, then the other. No go.
Error:
Fatal error: Call to undefined function self::FaqCategory() in /home/a5023204/public_html/forums/Sources/Faq.php on line 341
what do you mean?
it works on all other actions in the mod?
Basically, it installs, I get the FAQ link, but if I go to make any edits at all. It gives that PHP error.
I still dont get it, can you see the mods admin panel? can you see the faq action? I need as much details as posible...
Just tried the admin panel.
Since editing the code you gave me, no. The admin panel link' appear and it gives me this:
Fatal error: Call to undefined function FAQ::BasicFaqSettings() in /home/a5023204/public_html/forums/Sources/Faq.php on line 188
When I try to go to the editing section by navbar, I get this.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Ffiles.myfrogbag.com%2Fdqvq63%2FFAQ%2520Visual.png&hash=d8636c46556ec84ddfbd5bb1904626765582eedd)
Also, my apologies if I'm not giving you the needed details.
It seems that your php version cannot handle call methods with a string, you will need to replace all th values in the subActions array with wrapper functions and then declare those wrapper functions at the beginning of the Faq.php file, those wrapper functions will call the right static methods.
Uh, well, since I didn't understand any of that, I guess I won't be using this mod. Thanks anyway.
I guess I should add those wrapper functions to increase compatibility, I'll look on to that later today.
That would be marvelous. My apologies if this is causing a huge inconvenience for you, however.
I have the same problem. ???
@CannedSoup and watchhorse
Try the new version I uploaded, it got the wrapper functions added.
Works wonderfully for me now, thanks. Though, I'll admit, I changed host recently.
A future update, I'd like to see, is an option for a "front page" for the FAQ, with the Category list to the side, and upon clicking the Category, it'll show you all the FAQs.
But this is awesome so far.
I upgraded to 1.2 without any problems, thanks!
Quote from: Suki on December 23, 2011, 04:14:59 PM
Quote from: ApplianceJunk on December 23, 2011, 04:00:17 PM
Quote from: Miss All Sunday on December 23, 2011, 03:56:38 PM
No it hasn't been reported before, thank you. Most likely a bug.
I will take a look, and will update the mod when I find some time.
When you go to edit a FAQ it also automatically switches back to the #1 category.
How can I increase the max amount of text I can add to the title?
Thanks,
currently it is harcoded in the FAQ.template.php file, find:
<input type="text" name="title" size="55" tabindex="1" maxlength="55" value="',$faq_edit == 1 ? (isset($context['preview_subject']) ? $context['preview_subject'] : $context['edit']['current']['title']) : (isset($context['preview_subject']) ? $context['preview_subject'] : ''),'" class="input_text" />
and change maxlength="55" to whatever you want to be the maxlength.
After upgrading to FAQ 1.2 I'm trying to edit the FAQ.template.php file again so i can change the maxlength.
When I open FAQ.template.php in my text editor TextWrangler I get a window that pops up with the message that reads...
QuoteIncorrectly Formed UTF-8
The UTF-8 file "Faq.template.php" is damaged or incorrectly formed; please proceed with caution.
I have tried to download the file a few times and always get this message for some reason.
I never got the message before when I edited the old FAQ.template.php file, so I'm wondering why I get it now and if it's ok to edit or not.
thanks,
That's weird. I attached a new clean version of that file, if you still have issues you can just convert the file back to ANSI with your code editor.
Quote from: Suki on January 28, 2012, 09:50:14 AM
That's weird. I attached a new clean version of that file, if you still have issues you can just convert the file back to ANSI with your code editor.
I was able to view that one in my text editor without getting that message, so I made the edit on that one and uploaded it.
thanks,
Cool :D
Only negative thing I have to say about this MOD is ... wish I would have found it sooner :D
Very nice, Suki! :)
Cool, glad you find it useful :)
Basically, if i want it to show just the categories instead of the list of FAQ, is it possible?
I mean when user click on the FAQ , they will just see the categories, then each categories got different FAQ questions and answers, so the user will click on one of them and enter the category then see the list of FAQ questions, and click them . :)
It can be done, however, you will need to move the default page and replace it with one that list the categories and or course you need to build that page first.
I see. May i know how can i move the default page and replace it? :) I not quite understand on the build that page 1st >.<
Just look how the default page is created and replace that code with the code to fetch the categories via a query, then you will need to create a new template function and code the html for the categories.
If enough people ask then I'll add it.
I see >.< oh my T.T
Than i shall suggest it :P Just a suggestion. Well, having people to view categories instead the list if FAQ is better, because if there are a lot of categories , there will be a lot of FAQ , so it will become kinda messy >.<
Hi,
How do I upgrade the local testing database from 2.0 to 2.0.2? My forum version says 2.0.2 yet I see this error when trying to install this mod:
Where is the upgrade.php file found? Running upgrade.php from the latest large upgrade package failed.
BLOB/TEXT column 'body' can't have a default value
File: C:\vhosts\domainname\smf\Packages\temp\database.php
Line: 149
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.2, while your database is at version 2.0. The above error might possibly go away if you execute the latest version of upgrade.php.
Thank You!
is this the first time you are installing the mod?
Yes, first time installing the FAQ mod.
Are you using mysql in strict mode? if you can, contact your host and ask them to turn off strict mode or download the mod again, unzip it open database.php find:
array(
'name' => 'body',
'type' => 'text',
'size' => '',
'default' => '',
),
and change with:
array(
'name' => 'body',
'type' => 'text',
'size' => '',
'default' => null,
),
zip it again and install.
Hi Suki,
really great mod, just what I was looking for.
How difficult would it be to add the ability to parse html in faqs.
I made a test faq using html tables in the editor, which previews perfectly fine but once saved and then viewed as an actuall faq it just shows all the coding exactly like viewing a webpage source.
A big ask I know but maybe you could steer me in the right direction.
Regards..,
The mod uses SMF's parse_bbc function, that means th ere is no way to use pure html code on the faqs unless you're de admin or you enable basic html tags on our admin panel.
maybe you can convert your html code to bbc code.
If you want to use just html then you can remove the parse_bbc function and then you can directly type html, but you won't be a be to use bbc tags anymore and could be a security issue.
Thank You Suki! This edit did the trick as I was unable to have the database strict mode turned off.
Thank You
Quote from: Suki on February 12, 2012, 08:26:04 PM
Are you using mysql in strict mode? if you can, contact your host and ask them to turn off strict mode or download the mod again, unzip it open database.php find:
array(
'name' => 'body',
'type' => 'text',
'size' => '',
'default' => '',
),
and change with:
array(
'name' => 'body',
'type' => 'text',
'size' => '',
'default' => null,
),
zip it again and install.
I cannot add or edit Categories. I have no option to do so under Admin> Configuration> FAQ mod admin panel
The only options i get are: Basic Settings, Edit FAQ, Add FAQ.
Under the FAQ button in the nav bar i dont get a drop down, and when i click it i just get the current FAQ's that i can edit or delete.
thpengine.info/public_html
What happens if you go to this pages?
index.php?action=faq;sa=managecat
index.php?action=faq;sa=addcat
That works :)
Any way i can fix it so it shows the menu though?
Do you use another language in your forums?
Did you do any change to any faq file recently?
The forum is English only.
I have only installed the mod thats all, i run a different theme to the standard one though?
Any error on your error log?
Attach your Sources/Faq.php file here.
I have attached the file, no i dont have any errors relating to it in the error log :-\
Did you have the proper permissions to edit faqs/categories? the buttons only appear if you have the proper permissions, are you viewing it as an admin?
Yes i am logged in as admin, but the tabs dont appear. Do i need to give permissions somewhere else?
I have been editing my menu buttons in Subs.php but I don't see anything for the FAQ menu button in the Subs.php file.
Could you tell me were I find the code for the FAQ button?
Also how does it knows were to place the button in the menu without it being in the Subs.php?
Thanks,
Hi, to avoid editing files, I used a hook to insert the button on the menu.
The FAQ button code is located in Sources/FAQ.php file.
To know where the button will be placed I use some php functions to search in the whole menu array, stop at an specific place defined by the admin in the mod's setting and after that insert the button, it's a combination of array_merge() and array_slice(), both are php functions
Interesting, going to check the code out.
Thanks,
It doesn't like me.
AN ERROR HAS OCCURRED!
Unable to load the 'main' template.
Any idea why that is coming up?
Where does this error occur? how do you installed the mod?
I installed it through my package manager, and this comes up when I try to click on the FAQ link in my menu.
Do you have the Faq.template.php file in your /Themes/default/ folder? if not, upload the file there.
Great mod Suki .....just a small problem i have been editing some menu buttons in Subs.php of my own,and now i am unable to modify or remove this buttons in Subs.php.
When i try to remove/modify such button in Control Panel I get this command returned and nothing will change.Is it possible that Faq.php overrules Subs.php ?
Hi,
I installed this mod on my forum. there is a strange thing happening here. when the user default language is english everything is ok, but when the language is RTL like mine Arabic, the mod shift the forum to about 5px down!
I also noticed two characters extra when I am on FAQ section and Arabic. please see attached files.
do you know how to solve this problem?
thanks
This mod is exactly what I was looking for, many thanks Suki :D
@French What exactly are you trying to do?
@BaghdadGhost link to your site?
As I pointed out it´s no longer possible to remove or modify menu buttons added by myself in Subs.php,when i try to remove or modify one of those buttons in Subs.php it fails (command to remove or modify will not be carried out) and everything remains the same without changes
I wonder if this has anything to do with the installing of the FAQ Mod or in specific with Faq.php
Well, this mod uses the menu hook to insert the FAQ button, it takes the "home" button as reference by default or you can select a button as reference from the admin panel.
The menu hook is used after the long button array so any changes you made will be passed to the hook, this mod only add the FAQ button to the existing array but i doesn't change anything else, how do you exactly are you trying to change your buttons? keep in mind that the menu gets cached for half hour (or something like that, dunno the exact time) so if you change something in the buttons array you need to clean your cache or wait for a new cache entry to be generated.
Hungarian Language:
Included in the language files.
Thanks for your reply Suki
When i make a change and save this,it seems that the processing in Subs.php will not been overwritten.As an example, i remove the following button(called Wiki) and save this as Subs.php,but after i have done this button still remains in Subs.php
),
),
'wiki' => array(
'title' => 'Wiki',
'href' => 'http://linuxmintusers.be/wiki/index.php/Hoofdpagina',
'show' => true,
'sub_buttons' => array(
),
),
Its difficult to understand why this is happening.
I'll check to see if I have that file when I install it. Could my PHP version be too old?
Suki,
I sent you link to my site. just let me know when you want me to re-install and activate the mod for you to take a look at it.
thanks
Quote from: French on July 06, 2012, 06:19:51 AM
Thanks for your reply Suki
When i make a change and save this,it seems that the processing in Subs.php will not been overwritten.As an example, i remove the following button(called Wiki) and save this as Subs.php,but after i have done this button still remains in Subs.php
),
),
'wiki' => array(
'title' => 'Wiki',
'href' => 'http://linuxmintusers.be/wiki/index.php/Hoofdpagina',
'show' => true,
'sub_buttons' => array(
),
),
Its difficult to understand why this is happening.
If you have the cache enable, then you must wait until a new cache gets generated, this mod doesn't do anything to that file. Hooks cannot insert code physically.
@BaghdadGhost I'm sorry, I do not know much about RTL languages, I followed the SMF css classes as far as I could, should be fixed by changing something in your css files, oepra/dragonfly can help you there.
@trekkie2444 check this mod's parser and check that you have all the files on your server.
Suki,
thanks for the reply. I tried using chrome inspect element feature and no luck so far.
see I installed the mode on a test forum on the same version and the same theme and it is working perfectly. I think it has something to do with a mod I have already installed on the actual forum!
based on the way FAQ install and operate, do you think of any other mod that might do this error?
thanks
Finally managed to remove Wiki button from Subs.php by using FTP (FileZilla)instead of trying to make this change using Cpanel DirectAdmin.Wiki button is now successful removed from Subs.php.
Sorry Suki for my wrong conclusion,to think that this may have been caused by the FAQ Mod
Update:
so after the above I decided to install all mods that I have in actual forum on the test forum with FAQ already installed also and see which one of them is going to make the change in page display.
almost all mods installed without any changes. every mod I installed was compatible with FAQ.
I even replaced index.css and rtl.css of actual forum with the once on test forum, hoping to see if it will also effect the test forum in order to determine the cause of it but it did not. so I know for sure that it is not a code in css files.
one of the moderators indicated that not only a change in page display, when forum in RTL it also effected quote!! it wont get quoted text in field. just loading bar stuck up.
Please Suki with these note can you figure out what might be the problem. I have the mod active on the forum.
thanks
I'm sorry, I don't know what can be the cause since I don't even know whats the exact error you have, you need to check your pages to see where is the error. I went to your forum and couldn't see the mod installed there.
Just use some tool like opera/dragonfly to see what part exactly has the error and what css bits are controlling that part.
Check the encoding on the FAQ languages, the languages needs to have the proper encoding, if there are any utf8 files, they must be encoded on utf8 without BOM
QuoteCheck the encoding on the FAQ languages, the languages needs to have the proper encoding, if there are any utf8 files, they must be encoded on utf8 without BOM
it was the stupid encoding >:(
thank you so much Suki. You are a great support.
do you think you are done with me, you are wrong lol. kidding
two things, a question and demand
Size of the FAQs what does it mean
my demand is to remove the option of showing mod author copyrights and make it permanent.
thanks
Size of the FAQs means the width of the FAQs, for example, if you put 20 then the faqs width will be 20%, the side bar will automatically take the rest 80% if you set that option to 0 it will take the default value.
This mod is open source, you can remove the copyright whenever you want... the license allows that... but keep in mind that the same license doesn't force me to bring you support.
who said anything about forcing someone to bring support!
I think there was some misunderstanding here, I really meant it when I said you are a great support because you were.
neglect my previous demand.
thanks
There is no misunderstanding here, whatever your intentions are, my statement is still valid.
I said it was completely legal to remove my copyright and you can do so at any time, you don't need to even say it to me, you can even redistribute your own copyright-free version if you really want. What you decide to do with my mod doesn't concern me.
Quotemy demand is to remove the option of showing mod author copyrights and make it permanent.
"It" refers to the copyrights.
so make the copyrights permanently there because it is a very useful mod and I think the author deserves a lots of credit for it.
If you go to mine you will see I have the copyrights on.
do you still think there was no misunderstanding here :(
I already know what you are talking about, from the very first sentence, English isn't my first language either so I tend to understand vague sentences better than natural English speakers, I highly appreciate your intention :)
It was a general statement for all those people who wander if they can remove my copyright. To avoid having to repeat myself over and over again. I just used your vague sentence to make that statement, nothing else.
Hello
I have installed the faq module 1.2 on my forum.
Can anyone explain how to edit Categorys. I want 4 or more Categorys, and is it possible to change the default Categorys name to another name.
Thanks in advance.
Best regards
Noeyes
From the main menu, just go to the FAQ button / Manage Categories. Remember this mod uses permissions and on install all the permissions are set to off so you have to give the proper permissions to all your user groups.
I can find the FAQ mod admin panel, but i can't find out, how to make categorys and rename categorys in the FAQ mod admin panel.
Is it possible to do that?
Thanks in advance
Best regards
Noeyes
Follow this link: index.php?action=faq;sa=managecat just add your site url to it: my.site.com/index.php?action=faq;sa=managecat
The link isn't on the admin panel but your main menu where login, register, help, home profile and and my messages buttons are.
Suki, why not to add class="button_submit" for all button elements in this mod?
It seems you forgot to add "_sub" in some cases, in Faq.php
Example:
'subtext' => self::$faq->get('sidebar_size', 'Text')
"sidebar_size" should be replaced with "sidebar_size_sub", isn't it?
Yeah, you're right, looking at the code it needs a total rewrite, will put this on my to do list.
Edit, 10,000 post :laugh:
I'm not using the Categories, and I'd like to remove the category box.
How do I go about this? Deleting the default category simply fill the box with "Without Category" and it's bright red and quite obnoxious XD
It would be nice if deleting the categories removed the box so as that it only showed up if categories were applicable.
In the mean time; what do I edit to remove it?
Thanks =)
If you want to remove that box search on Faq.template.php:
if(empty($context['FAQ']['AllCategories']))
echo '<div class="faqmod_categories faqmod_warning">
',$txt['faqmod_no_cat'],'
</div>';
else{
echo '<div class="faqmod_categories description"><ul>';
foreach($context['FAQ']['AllCategories'] as $category)
echo '<li><a href="',$scripturl,'?action=faq;sa=category;catid=',$category['category_id'],'">',$category['category_name'],'</a></li>';
echo '</ul>
</div>';
}
and delete that part.
Hi.
I have your FAQ mod running, thanks for it :)
Is there a way I could make users who go to "search" (outside FAQ) to be sent to FAQ initaily or to get a message saying "you may fund your answer quicker by using our FAQ section"
??
Well, it depends, changing the url to display the FAQs before the actual search page might be tricky, a message is just a matter of modifying the search.template.php file to add your message.
Quote from: La Catrina on September 08, 2012, 07:53:49 PM
If you want to remove that box search on Faq.template.php:
if(empty($context['FAQ']['AllCategories']))
echo '<div class="faqmod_categories faqmod_warning">
',$txt['faqmod_no_cat'],'
</div>';
else{
echo '<div class="faqmod_categories description"><ul>';
foreach($context['FAQ']['AllCategories'] as $category)
echo '<li><a href="',$scripturl,'?action=faq;sa=category;catid=',$category['category_id'],'">',$category['category_name'],'</a></li>';
echo '</ul>
</div>';
}
and delete that part.
This didn't work.
It didn't remove the Category box from view; that is still there. What it did do was remove it from the 'Add a FAQ' page, which than tells me I can't add a FAQ until there are categories created.
I just wanna remove the box from the FAQ viewing page.
Well, that part is the category box, I don't know what else you want to remove, maybe a screenshot?
That is the piece I want to remove; Like I said, it didn't seem to work with the code you gave me. :/
That is the piece I want to remove; Like I said, it didn't seem to work with the code you gave me. :/
But thats the part I told you to remove, I didn't gave you any code.
Are you sure you deleted the right bit of code? is the part inside faqmod_sidebar() function.
Yep
Used the exact code you told me to remove, removed it.
The box remains, but if I attempt to go to "/index.php?action=faq;sa=managecat" I get the following;
Template Parse Error!
There was a problem loading the /Themes/default/Faq.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
Parse error: syntax error, unexpected '}' in .../Themes/default/Faq.template.php on line 644
635:
636: foreach($context['FAQ']['AllFaqs'] as $faq)
637: echo '<li><a href="',$scripturl,'?action=faq;sa=show;faqid=',$faq['id'],'">',$faq['title'],'</a></li>';
638:
639: echo '</ul></div>';
640: }
641:
642: // faqmod_side end
643: echo '</div>';
644: }
645:
646:
I did some poking around, and in the end all I had to do was this:
// faqmod_sidebar();
// echo '<div class="faqs">';
To all occurrences.
I just installed the FAQ mod and really like it. Thank you.
Could you advise me please.
Whenever I refresh a forum page, I am getting error messages like this:
8: Undefined index: active_button
File: forum/Themes/darkmodern_20g_1/index.template.php
Line: 449
Would I need to alter something on the darkmodern theme that I am using?
I have searched this help area and cannot find a similar question.
Thanks for any ideas.
Hi, welcome to SMF.
Does this happens only when you are on the FAQ page?
No it is not just on the FAQ page. The error message appears whatever page is opened, or if it is refreshed.
Can you please attach that file here.
Attached is the index.template.php file from the Dark Modern theme.
Thank you for your help.
Found the problem and solved it using this
http://www.simplemachines.org/community/index.php?topic=375308.0
Thank you for your help in pointing me to the file to check.
Best wishes
Hello, Suki!
May You add subcategories in categories in FAQ Mod?
Hi, welcom to SMF.
Probably no because of how this mod was wrote, will need if not a total, a partial rewrite. Perhaps a way to include more than 1 category but thats as far as the code can go.
In this days in all in for code re-usability and just looking at this mod's code is just painful as there are so many places where it can be improved.
Hi, Suki!
You say bad news...
Maybe later a desire to re-write Your mod, I must wait :)
But anyway, thanks for the great mod!!
This is a fantastic mod i have installed it on my test forum which is 2.0.3 and it works great along side other mods i am having fun playing around with it but there is just one thing i cannot figure out how to do.
Move the FAQ button on the menu bar
At the moment it sits between my home button & search button but i want to move it onto my support drop down menu. Like you can see on my website.
http://keepitrealkeepitgoth.com/index.php (http://keepitrealkeepitgoth.com/index.php)
I though it would of been added to subs.php file but it's not there so my question where would i find it or edit code to move it ?
Thanks :)
Please attach your Sources/Faq.php file and tell me how did you added your Support button to Subs.php
Well i manually added a drop down button called support to the forum menu in subs.php and added info, help, donate, contact, what we support, as sub buttons to the support button. Then i just had to point to my pages i did it like so
'support' => array(
'title' => 'support',
'href' => '',
'show' => true,
'sub_buttons' => array(
'Info' => array(
'title' => 'Info',
'href' => 'http://keepitrealkeepitgoth.com/info.php',
'show' => true,
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'Donate' => array(
'title' => 'Donate',
'href' => 'http://keepitrealkeepitgoth.com/donate.php',
'show' => true,
'sub_buttons' => array(
),
),
'contact' => array(
'title' => 'Contact',
'href' => 'http://keepitrealkeepitgoth.com/contact.php',
'show' => true,
'sub_buttons' => array(
),
),
'What we Support' => array(
'title' => 'What we support',
'href' => 'http://keepitrealkeepitgoth.com/whatwesupport.php',
'show' => true,
'sub_buttons' => array(
Attached the FAQ for you :)
Use this file and this is the entire faq button:
'faq' => array(
'title' => self::$faq->get('title_main', 'Text'),
'href' => $scripturl . '?action=faq',
'show' => allowedTo('faqperview'),
'sub_buttons' => array(
'faqmod_admin' => array(
'title' => self::$faq->get('manage', 'Text'),
'href' => $scripturl . '?action=faq;sa=manage',
'show' => allowedTo('faqperedit'),
'sub_buttons' => array(
'faqmod_add' => array(
'title' => self::$faq->get('add_send', 'Text'),
'href' => $scripturl . '?action=faq;sa=add',
'show' => allowedTo('faqperedit'),
),
),
),
'faqmod_category' => array(
'title' => self::$faq->get('manage_category', 'Text'),
'href' => $scripturl . '?action=faq;sa=managecat',
'show' => allowedTo('faqperedit'),
'sub_buttons' => array(
'faqmod_add' => array(
'title' => self::$faq->get('addcat_send', 'Text'),
'href' => $scripturl . '?action=faq;sa=addcat',
'show' => allowedTo('faqperedit'),
),
),
),
),
)
Be careful, since you will put it as a submenu, the third menu will not appear as SMF only supports up to 3 buttons, in that case you can move the third buttons to a level above.
Thank you will get back to you once i test it :)
I copied over the faq.php but when it come to adding the button i couldn't get it to work here is my code for the menu
'home' => array(
'title' => 'home',
'href' => '',
'show' => true,
'sub_buttons' => array(
'Website main' => array(
'title' => 'Main',
'href' => 'http://keepitrealkeepitgoth.com/index.php',
'show' => true,
),
'forum home' => array(
'title' => 'Forum index',
'href' => 'http://keepitrealkeepitgoth.com/forum/',
'show' => true, ), ),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'moderate' => array(
'title' => $txt['moderate'],
'href' => $scripturl . '?action=moderate',
'show' => $context['allow_moderation_center'],
'sub_buttons' => array(
'modlog' => array(
'title' => $txt['modlog_view'],
'href' => $scripturl . '?action=moderate;area=modlog',
'show' => !empty($modSettings['modlog_enabled']) && !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl . '?action=moderate;area=reports',
'show' => !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl . '?action=calendar',
'show' => allowedTo('calendar_post'),
),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
'is_last' => true,
),
),
),
'Radio' => array(
'title' => 'Radio',
'href' => '',
'show' => true,
'sub_buttons' => array(
'Keep it Radio' => array(
'title' => 'Keep it Radio',
'href' => 'http://keepitrealkeepitgoth.com/keepradio.php',
'show' => true,
),
'Other Radio' => array(
'title' => 'Other Radio',
'href' => 'http://keepitrealkeepitgoth.com/otherradio.php',
'show' => true,
),
),
),
'Links' => array(
'title' => 'Links',
'href' => '',
'show' => true,
'sub_buttons' => array(
'Various Links' => array(
'title' => 'Various Links',
'href' => 'http://keepitrealkeepitgoth.com/links.php',
'show' => true,
),
),
),
// Aeva Media changes
'media' => array(
'title' => (isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media') . (!allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? '' : ' [<b>' . $user_info['aeva_unseen'] . '</b>]'),
'href' => $scripturl . '?action=media',
'show' => allowedTo('aeva_access'),
'sub_buttons' => !allowedTo('aeva_access_unseen') || empty($user_info['aeva_unseen']) || $user_info['aeva_unseen'] == -1 ? array() : array(
'aeva_home' => array(
'title' => $txt['aeva_home'],
'href' => $scripturl . '?action=media',
'show' => true,
),
'aeva_unseen' => array(
'title' => $txt['aeva_unseen'],
'href' => $scripturl . '?action=media;sa=unseen',
'show' => true,
'is_last' => true,
),
),
),
// End Aeva Media changes
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
'is_last' => true,
),
),
),
'Shops' => array(
'title' => 'Shops',
'href' => '',
'show' => true,
'sub_buttons' => array(
'Other Shops' => array(
'title' => 'Online Shops',
'href' => 'http://keepitrealkeepitgoth.com/othershops.php',
'show' => true,
'sub_buttons' => array(
),
),
),
),
'support' => array(
'title' => 'support',
'href' => '',
'show' => true,
'sub_buttons' => array(
'Info' => array(
'title' => 'Info',
'href' => 'http://keepitrealkeepitgoth.com/info.php',
'show' => true,
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'Donate' => array(
'title' => 'Donate',
'href' => 'http://keepitrealkeepitgoth.com/donate.php',
'show' => true,
'sub_buttons' => array(
),
),
'contact' => array(
'title' => 'Contact',
'href' => 'http://keepitrealkeepitgoth.com/contact.php',
'show' => true,
'sub_buttons' => array(
),
),
'What we Support' => array(
'title' => 'What we support',
'href' => 'http://keepitrealkeepitgoth.com/whatwesupport.php',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
);
I tried adding it just after
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
but i get the error
Parse error: syntax error, unexpected ';', expecting ')' in /home/keepitii/public_html/test/forum/Sources/Subs.php
Now i know i am missing out ), or something of the sort somewhere as i am still learning but i carn't figure it out.
If you just want to move the FAQ button next to the serach button, the mod itself has a setting to do so without having to edit any file.
this is exactly what i need, thank you so much :)
is there i way to do permissions for members they just can add new faq not to delete them ?
Create a new permission (there is a tutorial somewhere here) and then modify both methods FaqAdd() and FaqAdd2() in Sources/Faq.php change this line:
isAllowedTo('faqperedit');
And replace it with your new permission.
http://www.simplemachines.org/community/index.php?topic=438980.msg3125341#msg3125341
Checked twice and i think i do all right, but didn't show up the add faq button for members. Also something is wrong in the permissions area too.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2Ff2pJf.png&hash=5e00ec2a33f542fbd803f14078527e35620dd427)
Did you add the correct language strings?
Make sure you properly add the correct language strings, see your error log to see an undefined error, that error will indicate the correct language string SMF is looking for.
yes, i just have Faq.english.php so i add it here.
There is no log for faq in my error page.
here is my files if you can look at them.
Ok, you have the cannot_ text string:
$txt['cannot_faqperadd']
But you also need to add the actual permission text string, add this on your Faq.english.php file:
$txt['permissionname_faqperadd'] = 'Add FAQs';
i was mixed up a word :-[
$txt['permissionname_faqpereadd'] = 'Add FAQs';
fix it, now there is no problem in permission page. but the add faq button still is not showing up for regular members, i give them the a permissions.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FUjxt2.png&hash=1fd46f78f66400fa1abedb7903412c3f2d9f1f64)
Does following the direct url works? ie, type the url directly to the browser and hit enter, if so, you only need to change the if in Faq.template.php:
// 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>';
To your own permission.
Quote from: Suki on January 16, 2013, 11:47:16 AM
Does following the direct url works? ie, type the url directly to the browser and hit enter, if so, you only need to change the if in Faq.template.php:
// 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>';
To your own permission.
i have this codes. i can add faqs and everything but the regular members can't. i give them permission but the button doesnt show up.
Of course you have that, thats from a vanilla faq file.
You need to change that to your own permission:
if($context['faqperedit'])
to
allowedto('permission_name')
Dunno if it was allowedto or the other one, can't remember since it has been a while since I look at those functions, in the function DB you will find more info about it.
well i'm confused so bad :D i think i'm not gonna give them this permission :D sorry for all of this question, i guess i'm missing a something very easy.
the direct link is openin work regular member: action=faq;sa=add but when send it, it gave an error that you can not. and then the faq is showing, it is actually accept it.
and again the button is not shown :D
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FowcMB.png&hash=39e59e4e8fbd12235897fd39c4a8ad88c8e50ba5)
can i give you the files that you need and you can check it :)
Its not difficult for someone who is familiar with the code, unfortunately, or rather, very fortunately, I've been away from SMF code for weeks now, even months, learning new ways to code.
I have to go back to SMF code to add some permissions to another mod I'm building, when I get to it I'll post some proper instructions.
Hi.. this is a great mod :) However... how do you make categories? Because i have been searching but i really can not find it...
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.
hi. Just put your mod in on a test site isthatagnu.com/smf
thanks
I'm getting errors in the log which I think are down to other mods.
Apply Filter: Only show the error messages of this URL
http://*.com/smf/index.php?action=faq;sa=add
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /*.com/smf/Themes/default/languages/SearchFocus.english.php (body_above sub template - eval?)
Line: 441
Apply Filter: Only show the error messages of this URL
http://*.com/smf/index.php?action=admin;area=faqdmin;sa=basic
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /*.com/smf/Themes/default/languages/SearchFocus.english.php (body_above sub template - eval?)
Line: 441
Do you know what I should do?
:)
Disable evaluation of templates (admin/ configuration/server settings), clean your error log, browser your forum or do whatever you did earlier and then check your error log again, post the new errors here.
Its a test board if you want admin access ?
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:36 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?action=faq;sa=manage
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:27 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?action=faq;sa=add
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:24 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?action=faq
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:20 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?board=1.0
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:14 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?action=post;topic=1.0;last_msg=2
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:11 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?topic=1.0
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:09 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?board=1.0
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:06 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
Apply Filter: Only show the error messages of this member Administrator
Apply Filter: Only show the error messages of this IP address 86.134.203.59
Reverse chronological order of list Today at 10:21:01 AM
Apply Filter: Only show the error messages of this session 234ca87d91decee30fd97207b1751620
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://isthatagnu.com/smf/index.php?action=admin;area=logs;sa=errorlog;desc
Apply Filter: Only show the errors with the same message
8: Undefined index: active_button
Apply Filter: Only show the errors from this file
File: /home/uklows/public_html/isthatagnu.com/smf/Themes/New_Folder/index.template.php
Line: 441
did you change anything in index.template.php?
the Undefined index: active_button can be triggered by any button in the menu.
thanks.
I switched to default theme and have no errors......
will try installing the facebook theme again
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.
you're right. It is the facebook theme
will go and ask there and point them to this.
thanks
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
On your permissions admin page, there is a "can see FAQ page" permission, check that for your guest group.
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!
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?
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.
thank you very much :D
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... :)
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.
well, I added them into the admin area by adjusting the code. :)
'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')),
),
'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')),
),
$subActions = array(
'basic' => 'WrapperBasicFaqSettings',
'edit' => 'WrapperEditFaqAdminPage',
'add' => 'WrapperAddFaqAdminPage',
);
$subActions = array(
'basic' => 'WrapperBasicFaqSettings',
'edit' => 'WrapperEditFaqAdminPage',
'add' => 'WrapperAddFaqAdminPage',
'manage' => 'WrapperManageCatFaqAdminPage',
);
/* Main function */
/* 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
// 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>';
// 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>';
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.
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 ?
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
It does on the new version but of course people can't even bother to see that.
what new version?
I installed the version from the mod site and it just has the edit/add/delete as a combined permisson
.____.
If it doesn't exist here then it doesn't exist anywhere right?
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.
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.
now you're just being unreasonable, Suki.
I like this mod a lot... I'm using it on two sites, currently.
There is a mod presented HERE on SMF.
If the support for the mod and further updates have been takden somewhere else, then it is the MOD AUTHOR'S responsibility to inform people of that fact in a clear manner. Otherwise, people will assume (as I did) that the latest version of the mod is here on the SMF site. If you don't tell us, how the hell are we supposed to know?
This is not like a technical question, where we can be expected to search the thread for key terms and find our problem has already been answered... What keyword would I use to find a link to the new version in this thread?
new version?
offsite?
The only mention I find of a different version is a few posts back, where you say that you are working on one... on github (but you don't provide a link) and you don't mention that you have released a new version.
Actually... if you no longer support this version here and require people to go elsewhere to find it, then I suggest that it should either be removed from the mod list or, at the very least, clearly stated that the version here is outdated, no longer supported and you can find the new version somewhere (link)
QuoteIf the support for the mod and further updates have been takden somewhere else, then it is the MOD AUTHOR'S responsibility to inform people of that fact in a clear manner.
And people still won't listen whether that notice is there or not.
QuoteActually... if you no longer support this version here and require people to go elsewhere to find it, then I suggest that it should either be removed from the mod list or, at the very least, clearly stated that the version here is outdated, no longer supported and you can find the new version somewhere (link)
Waste of time as we proved with SimpleDesk. All it ended up with here is people asking why the thread was locked. Oh, and something like 1/10 questions being about people wanting to use SimpleDesk without SMF because it wasn't clear enough that it needed SMF.
that may be true Arantor.
However, if it is clearly stated, then I will defend the mod author when he/she says so....
Still a waste of time because most people don't care. They just want what they want, when they want it, how they want it and fewer and fewer mod authors want to be forced into that position.
Suki could update every mod page to point to its Github repo and then it'll be BUT IT'S NOT PACKAGED WAAAAAAAAAAAAAAH.
again, though... if she did point things to the github, She'd be in the right and I would defend her to the users' whining... :P
In this case, however, as far as I can tell, she has never posted a link to where the new verison can be acquired (or even that there IS a new version available)
I have never said that she's WRONG to have the new version elsewhere... I just wish that she's post the link to it - in which case I can use it myself and I can point other users to that version when they complain about the permissions (like the last one did) or something else (which may have been updated or corrected)
I really like this mod.
I want to keep it up to date and continue to use it. :)
Because I use it myself, I can help to answer questions that some other users may have....
Quoteif she did point things to the github, She'd be in the right and I would defend her to the users' whining...
It doesn't matter because the users would still whine - defended or not.
QuoteIn this case, however, as far as I can tell, she has never posted a link to where the new verison can be acquired (or even that there IS a new version available)
So? Why should she have to? It's not her responsibility to do so. The only responsibility she has, if there is one, is to write good code. People here don't even tend to be grateful that someone bothered to write something good and share it. It's always about what they want, and never respect for the fact that the author chose to make something and give it away. You did know that in the past I'd actually had people threatening me if I didn't customise a mod I made, right? Here, in fact.
QuoteI have never said that she's WRONG to have the new version elsewhere... I just wish that she's post the link to it
And this is the problem. You could be a little proactive yourself, you know... instead of asking her to update things in two places, you could set it up to keep you notified in the one place where it is updated but as you're so admirably proving, that's too much like hard work.
Arantor...
I know nothing about Git...
I would not even know where ot start searching for her stuff on git.
Yup... When she mentioned it, I tried... I either got several hundred results or zero results searching for her stuff on Git (and I am usually pretty good with the google-fu).
I didn't say that she has to keep things updated in two places... I said that - if she posted a link to the git site (not even the download, just the git site) then I (or anyone else on the team) could direct users there rather than annoying Suki further. :P
QuoteI know nothing about Git...
Evidently since Git is just a methodology and software to run it. Github is a specific implementation of that.
But let me save you the < 30 seconds trouble. https://github.com/MissAllSunday/faq
QuoteI didn't say that she has to keep things updated in two places... I said that - if she posted a link to the git site (not even the download, just the git site) then I (or anyone else on the team) could direct users there rather than annoying Suki further.
Which is updating things in two places. Because people will still ask for information here, will still post their demands here, will still post their bugs here... so it splits everything in two.
but, once again... if they are not informed that the support and updates have been taken off site, how are they supposed to know? (because SOME users will read and care)
Thanks for the link. I was forgetting that she used to go by the name MissAllSunday (and THAT is something that a new user would not even have a clue about)
(and yes... I already said that I know nothing about git or github - and the fact that I even know about them puts me ahead of most of the normal users)
Again, you seem to be missing the point that I was trying to make.
She doesn't have to support it here (or anywhere)
However, if she IS going to support it and/or update it and then expects a user to even begin to try to post in the correct place or find the updates then she could at least tell the users where to go for that. :)
If there is no notice, then users will (quite correctly) assume that this is the latest version and that someone here can help support the mod
Quotebut, once again... if they are not informed that the support and updates have been taken off site, how are they supposed to know? (because SOME users will read and care)
Because it's been stated more than once and it even used to be in her signature. Point is, no-one wants to do any work towards it. Everyone just complains that she's not doing it. (Hint: this is directly parallel to other circumstances. Funny old world.)
QuoteAgain, you seem to be missing the point that I was trying to make.
She doesn't have to support it here (or anywhere)
Really? You could have fooled me by saying things she had to do. More importantly, the users don't care about what she wants. They just want it updated etc.
Quotethen users will (quite correctly) assume that this is the latest version and that someone here can help support the mod
How is that a correct assumption? As we've just seen it's not.
I siad that she doesn't HAVE to support it.
However, if she plans to support it, she should at least give the users the information they need to find the support.
Let me rephrase then.
The users used correct logic to assume that support for this mod should be requested here. (since there is no other site mentioned, and it is not mentioned that Suki is no longer supporting this mod)
The fact that this was an incorrect assumption does not mean that the users were wrong to assume it... it means that no one had provided them with any information suggesting otherwise.
It was stated more than once? In this thread?
Again, I searched the thread for any mention of it and only found her last statement that she was working on a new version on github. No mention of an actual new version. no link pointing people there.
I know that users are lazy and that they don't bother to read or search.... However, I did... and I was unable to find the information. Since I know how to search (normally) and I do read and search, that means that a normal user won't be able to... even if they bothered to try.
Quote(since there is no other site mentioned, and it is not mentioned that Suki is no longer supporting this mod)
You do know that this applies to all her mods not just this one...
I would continue arguing but you and I won't see eye to eye on this.
:P
Because I dislike complainers and I wanted to re-write this, the mod has been updated. For updating, uninstall any old version and install the new one.
No support and no spoon-feed either. Knock yourselves out.
Parse, but at install:
Unknown column 'category_last_user' in 'field list'
File: /var/www/username/data/www/forum/Packages/temp/database.php
Line: 190
Just delete that column from the faq_categories table as this new version does not need that anymore.
The mod does check for older versions and/create update the rows as needed, I didn't think that table was going to cause any issues since the new code does not use it anywhere and I didn't have this issue when testing the mod with old data from old versions.
Quote from: Suki on April 22, 2013, 10:18:21 AM
Just delete that column from the faq_categories table as this new version does not need that anymore.
The mod does check for older versions and/create update the rows as needed, I didn't think that table was going to cause any issues since the new code does not use it anywhere and I didn't have this issue when testing the mod with old data from old versions.
I've delete what you say, it install without a problem, you can setting the mod without a problem, but when I try to access the FAQ from menu:
Unknown column 'c.category_log' in 'field list'
File: /var/www/username/www/website/forum/Sources/Subs-Faq.php
Line: 279
Can you please update the mod ?
10x!
BTW: I have SMF 2.0.4
P.SThis mod should be in default core, as wiki mod too(SMF team use wiki and FAQ as modifications but keep this features only for them - hard to understand !).
actually, the SMF team uses media wiki for our manual and we have released the bridge to link smf <-> mediawiki for anyone to use.
Quote from: mariusfv on April 23, 2013, 04:51:49 AM
Quote from: Suki on April 22, 2013, 10:18:21 AM
Just delete that column from the faq_categories table as this new version does not need that anymore.
The mod does check for older versions and/create update the rows as needed, I didn't think that table was going to cause any issues since the new code does not use it anywhere and I didn't have this issue when testing the mod with old data from old versions.
I've delete what you say, it install without a problem, you can setting the mod without a problem, but when I try to access the FAQ from menu:
Unknown column 'c.category_log' in 'field list'
File: /var/www/username/www/website/forum/Sources/Subs-Faq.php
Line: 279
Can you please update the mod ?
10x!
BTW: I have SMF 2.0.4
P.S
This mod should be in default core, as wiki mod too(SMF team use wiki and FAQ as modifications but keep this features only for them - hard to understand !).
Are you using the modsite version of this mod? the table you are referring to was deleted from the final version (and this is why I hate to maintain things in several places...). Anyway, attach your Subs-Faq.php file.
Quote from: Tasha Thompson on April 23, 2013, 06:04:39 AM
Quote from: Jessica. on June 21, 2011, 02:14:28 PM
I went to my Looks and Layout and unchecked 'Turn on WYSIWYG editor on post page by default' and I was able to create FAQs
Ya its easy but i found hazard across access WYSIWYG .MY FAQS is that why it occur when i open it its turn off?
huh? ???
I'm using this wonderful MOD from more than a year, really very useful.
Just install it on my test server and skip this error
Unknown column 'category_last_user' in 'field list'
File: D:\xampp\htdocs\Perut\Packages\temp\database.php
Line: 190
The error actually is on the line 184 that was defined as the field name: "id_category" when it should be category_id.
Sorry, we must also remove the "category_last_user" field and its value.
I've just updated to the latest version. Thanks Suki, I do like this mod :)
Ola. I'm trying to install this mod. Even in a clean install of SMF. More pops up the following error:
Database Error
Unknown column 'category_last_user' in 'field list'
File: /home/dsystem/public_html/smf/Packages/temp/database.php
Line: 190
I'll be very grateful if you have any solution
Thank you.
I am using the latest version of SMF and had a version of this mod previously installed in June of last year - sorry don't know the version number.
I am getting the same error as an earlier poster after uninstalling the old version and installing the new, as follows:
Unknown column 'c.category_log' in 'field list'
File: /home3/awolonl1/public_html/forum/Sources/Subs-Faq.php
Line: 279
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.4 while your database is at version 2.0.1. The above error might possibly go away if you execute the latest version of upgrade.php.
It installs without errors but this message appears when clicking on the FAQ link. I have not tried the database upgrade solution yet as I saw the previous poster who had the same issue; I also don't know where I can find the latest version of upgrade.php. Is this the complete forum package? I don't really understand why my database would not have been upgraded when i went to 2.0.4.
I also tried uninstalling and then installing from the Github repository (as argued at length on here) but whether with a zipped set or files uploaded to the Packages my SMF won't allow me to - with the zipped package it tells me there is nothing there and with the unzipped files it doesn't see the package at all to allow me to install. There are no installation instructions on Github either as far as I can tell.
With the previous poster you asked them to attach a file but there was nothing more since, so would it be possible to put what code changes are required on here? I have looked at the line the error is meant to have occurred on but of course the error is somewhere before that.
don't worry about that message.... it's a generic and incorrect message that has nothing to do with your issue
OK, thanks Kindred I figured it might be. If anyone knows how to resolve the issue then I would be very grateful.
Quote from: DSystem on April 28, 2013, 07:01:25 PM
Ola. I'm trying to install this mod. Even in a clean install of SMF. More pops up the following error:
Database Error
Unknown column 'category_last_user' in 'field list'
File: /home/dsystem/public_html/smf/Packages/temp/database.php
Line: 190
I'll be very grateful if you have any solution
Thank you.
I get the same error. How to fix it?
Quote from: jsx on March 09, 2020, 02:55:53 PM
Quote from: DSystem on April 28, 2013, 07:01:25 PM
Ola. I'm trying to install this mod. Even in a clean install of SMF. More pops up the following error:
Database Error
Unknown column 'category_last_user' in 'field list'
File: /home/dsystem/public_html/smf/Packages/temp/database.php
Line: 190
I'll be very grateful if you have any solution
Thank you.
I get the same error. How to fix it?
This error might cause by the database. Go to your
phpmyadmin and try to
run these SQL statements:
--
-- Table structure for table `smf_faq`
--
DROP TABLE IF EXISTS `smf_faq`;
CREATE TABLE `smf_faq` (
`id` int(5) unsigned NOT NULL AUTO_INCREMENT,
`cat_id` int(5) NOT NULL,
`log` text NOT NULL,
`title` varchar(255) NOT NULL DEFAULT '',
`body` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `smf_faq`
--
INSERT INTO `smf_faq` (`id`, `cat_id`, `log`, `title`, `body`) VALUES
(1, 1, 'a:1:{i:0;a:2:{s:4:\"user\";i:1;s:4:\"time\";i:1584116938;}}', 'Your FAQ question 1', 'This is your answer 1 ;)'),
(2, 1, 'a:1:{i:0;a:2:{s:4:\"user\";i:1;s:4:\"time\";i:1584116972;}}', 'Your FAQ question 2', 'This is your answer 2 :)');
-- --------------------------------------------------------
--
-- Table structure for table `smf_faq_categories`
--
DROP TABLE IF EXISTS `smf_faq_categories`;
CREATE TABLE `smf_faq_categories` (
`category_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`category_name` varchar(255) NOT NULL DEFAULT '',
`category_last_user` int(11) DEFAULT NULL,
`category_log` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`category_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `smf_faq_categories`
--
INSERT INTO `smf_faq_categories` (`category_id`, `category_name`, `category_last_user`, `category_log`) VALUES
(1, 'General', 1, '0');
--
-- Dumping data for table `smf_settings`
--
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_settings_enable';
UPDATE `smf_settings` SET `value` = '5' WHERE `smf_settings`.`variable` = 'faqmod_num_faqs';
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_show_catlist';
UPDATE `smf_settings` SET `value` = '3' WHERE `smf_settings`.`variable` = 'faqmod_show_latest';
UPDATE `smf_settings` SET `value` = 'id' WHERE `smf_settings`.`variable` = 'faqmod_sort_method';
UPDATE `smf_settings` SET `value` = 'home' WHERE `smf_settings`.`variable` = 'faqmod_menu_position';
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_use_javascript';
UPDATE `smf_settings` SET `value` = '1' WHERE `smf_settings`.`variable` = 'faqmod_care';
Note: change all values "smf_" prefix with your own {database_prefix}
Heya Suki,
Installing on 2.1 I get the following error
BLOB, TEXT, GEOMETRY or JSON column 'log' can't have a default value
File: .../Packages/temp/database.php
Line: 165
I commited a few fixes to the 2.0 branch: https://github.com/MissAllSunday/faq/tree/2.0
Can you test it out to see if there isn't any more errors before releasing a new version?
direct download: https://github.com/MissAllSunday/faq/archive/2.0.zip Its double-foldered so unzip and re-zipjust the needed folders and files
Will check on monday!
Just installed FAQ mod version 2.0 on my SMF 2.1 RC3 test forum, running on PHP 8.0
It seems that mod is working properly, I have tested creating of new categories and new FAQs. New FAQs are saved successfully, editing of existing FAQs too.
I think that drop-down menu in admin panel for position of the FAQ mod button in the main forum menu next to... (Home, Help, Search, Login, Sign Up) needs to be edited, because in SMF 2.1 'Help' and 'Login' buttons do not exist.
Cool, good to know an almost 10 years old codebase still holds up.
Yeah the button position didn't aged well, will see what I can do to release a patch for it.