Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 09:22:35 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155553
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
FAQ Module
Pages:
1
[
2
]
Go Down
Author
Topic: FAQ Module (Read 15441 times)
dihakz
Offline
Posts: 23
Re: FAQ Module
«
Reply #25 on:
June 23, 2007, 10:33:04 AM »
Quote from: doc on June 23, 2007, 06:44:26 AM
you can use the agreggator module as parent page and create as much child pages you have categories:
Aggregator
- Category A (FAQ page)
- Category B (FAQ page)
- Category C (FAQ page)
Thanks for that -- I'm going to try this -- but at first glance, it seems to be the opposite of what I'm trying to do. I already have a page with all the categories on the FAQ's (the current FAQ page) -- now I need to just take each category and spit it out on a different page as well. Maybe it would help to see the page:
http://blackburnsmed.com/prototype/cms/wb/pages/resource-center/frequently-asked-questions.php
(that is the FAQ page). The second category, Rehab/Durable Medical Equipment FAQ, is populated -- I want that to also appear on the FAQ page under the "Rehab/Durable Medical Equipment FAQ" main page, here:
http://blackburnsmed.com/prototype/cms/wb/pages/services/rehabdurable-medical-equipment-dme/frequently-asked-questions.php
...and, so on, for each of those major sections. Even if a little bit of coding is required, I can always attempt it, but I'm hoping for a little more direction if anyone can offer it so that I may be able to attempt it.
Again, Thanks!
Darren
Logged
dihakz
Offline
Posts: 23
Re: FAQ Module - New Snippet
«
Reply #26 on:
June 23, 2007, 06:01:06 PM »
Resolved my own problem! It took me some time, mucking around, but here is the code I'm using, if anyone would like to have it!
Code:
<?php
// Must include code to stop this file being access directly
if(
defined
(
'WB_PATH'
) ==
false
) { exit(
"Cannot access this file directly"
); }
// IMPORTANT - Change section_id below
// Get settings
$query_settings
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_faq_settings` WHERE section_id='33' LIMIT 1"
);
$fetch_settings
=
$query_settings
->
fetchRow
();
$template_summary
=
stripslashes
(
$fetch_settings
[
'template_summary'
]);
$template_details
=
stripslashes
(
$fetch_settings
[
'template_details'
]);
$stage1
=
explode
(
"[category]"
,
$template_summary
);
$stage1
=
$stage1
[
1
];
$stage1
=
explode
(
"[/category]"
,
$stage1
);
// Semi-Important one!
$stage1
=
$stage1
[
0
];
$stage2
=
explode
(
"[question]"
,
$stage1
);
// Important one!
$category_summary_first
=
$stage2
[
0
];
$stage3
=
explode
(
"[/question]"
,
$stage1
);
// Important one!
$category_summary_last
=
$stage3
[
1
];
$stage4
=
explode
(
"[question]"
,
$stage1
);
$stage4
=
$stage4
[
1
];
$stage4
=
explode
(
"[/question]"
,
$stage4
);
// Important one!
$question_summary_final
=
$stage4
[
0
];
$stage1
=
explode
(
"[category]"
,
$template_details
);
$stage1
=
$stage1
[
1
];
$stage1
=
explode
(
"[/category]"
,
$stage1
);
// Semi-Important one!
$stage1
=
$stage1
[
0
];
$stage2
=
explode
(
"[question]"
,
$stage1
);
// Important one!
$category_detail_first
=
$stage2
[
0
];
$stage3
=
explode
(
"[/question]"
,
$stage1
);
// Important one!
$category_detail_last
=
$stage3
[
1
];
$stage4
=
explode
(
"[question]"
,
$stage1
);
$stage4
=
$stage4
[
1
];
$stage4
=
explode
(
"[/question]"
,
$stage4
);
// Important one!
$question_detail_final
=
$stage4
[
0
];
// Add a top anchor
echo
'<a name="top"></a>'
;
// Page header
// IMPORTANT - Change H1 below
echo
'<h1>Bariatric Equipment/Support Surfaces Frequently Asked Questions</h1>'
;
// IMPORTANT - Change section_id below
// Loop through questions
$query_cats
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_faq_categories` WHERE section_id='33' ORDER BY pos ASC"
);
// IMPORTANT - Change section_id AND cat_id below
$query_quests
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_faq_questions` WHERE cat_id='6' and section_id='33' ORDER BY pos ASC"
);
if(
$query_quests
->
numRows
() >
0
)
{
while(
$quest
=
$query_quests
->
fetchRow
())
{
$question
=
$quest
[
'question'
];
$qlink
=
"#question_"
.
$quest
[
'question_id'
];
echo
'<ul><li style="padding:1px 0px;"><a href="'
.
$qlink
.
'">'
.
$question
.
'</a></li></ul>'
;
}
}
/** End of summary **/
echo
'<hr>'
;
// IMPORTANT - Change section_id below
// Loop through answers
$query_cats
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_faq_categories` WHERE section_id='33' ORDER BY pos ASC"
);
// IMPORTANT - Change section_id AND cat_id below
$query_quests
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_faq_questions` WHERE cat_id='6' AND section_id='33' ORDER BY pos ASC"
);
if(
$query_quests
->
numRows
() >
0
)
{
while(
$quest
=
$query_quests
->
fetchRow
())
{
$ansanchor
=
"question_"
.
$quest
[
'question_id'
];
$content
=
$quest
[
'answer'
];
$qhead
=
$quest
[
'question'
];
echo
'<a name="'
.
$ansanchor
.
'" class="faqlink"><strong>'
.
$qhead
.
'</strong></a><br /><p style="margin:0 16px;padding:0;text-align:justify;border:0;">'
.
$content
.
'<span style="font-size:10px;"><a href="#top">^ TOP ^</a></span></p><br/><br/><br/>'
;
}
}
?>
Logged
vixbow
Offline
Posts: 21
Re: FAQ Module
«
Reply #27 on:
July 17, 2007, 04:12:13 PM »
I'm having a strange problem with this module: I'm trying to add dollar amounts in the answer section of a question and it will not take the dollar sign nor the next two characters.
For example, I added "$119,876.00" and what is visible on the live site is "9,876.00".
Anyone have any ideas on how to make this work?
Thanks in advance!
Logged
sammedit
Offline
Posts: 6
Re: FAQ Module
«
Reply #28 on:
November 04, 2008, 02:46:56 AM »
How do you get rid of the bullet in front of the questions on the main faq page?
«
Last Edit: August 17, 2009, 02:05:27 AM by Argos
»
Logged
dfelix
Offline
Posts: 41
Re: FAQ Module
«
Reply #29 on:
August 17, 2009, 01:47:45 AM »
This mod does not work with 2.8RC2...
Logged
Argos
Moderator
Offline
Posts: 2161
Re: FAQ Module
«
Reply #30 on:
August 17, 2009, 02:06:28 AM »
Quote from: dfelix on August 17, 2009, 01:47:45 AM
This mod does not work with 2.8RC2...
And with 2.8 Final? There are lots of changes between these two versions.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
BerndJM
Offline
Posts: 1764
Re: FAQ Module
«
Reply #31 on:
August 17, 2009, 02:09:01 AM »
Hi,
first:
you be aware that allready the 2.8 final is published, please give it a try with this.
second:
please don't give us soooo much information
What means "doesn't work"?
Edit:
think I see the problem, pleas try the attached version!
Regards Bernd
«
Last Edit: August 17, 2009, 02:19:28 AM by BerndJM
»
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.
dfelix
Offline
Posts: 41
Re: FAQ Module
«
Reply #32 on:
August 17, 2009, 11:40:32 AM »
Sorry...
Only posted to notify that the version available on the repository was not fully functional.
BerndJM,
This 1.46 works ok!
Thank you so much!
Logged
cyasar
Offline
Posts: 3
Re: FAQ Module
«
Reply #33 on:
September 05, 2009, 10:15:20 PM »
website baker 2.8 with FAQ intallation is there
problem.
Logged
timmeh
Offline
Posts: 1
Re: FAQ Module
«
Reply #34 on:
October 18, 2009, 12:31:50 PM »
Quote from: cyasar on September 05, 2009, 10:15:20 PM
website baker 2.8 with FAQ intallation is there
problem.
1.45 doesn't install, but 1.46 does...see quoted post below.
Quote from: BerndJM on August 17, 2009, 02:09:01 AM
Hi,
first:
you be aware that allready the 2.8 final is published, please give it a try with this.
second:
please don't give us soooo much information
What means "doesn't work"?
Edit:
think I see the problem, pleas try the attached version!
Regards Bernd
Logged
sammedit
Offline
Posts: 6
Re: FAQ Module
«
Reply #35 on:
October 31, 2009, 10:02:22 AM »
Please does anyone know how to remove the bullet that shows up in front of the questions? I posted this same question almost 1 year ago and I still cannot find the code that is making the bullet. Please please please help me. It is driving me absolutely crazy! Thank you.
sammedit
Logged
Argos
Moderator
Offline
Posts: 2161
Re: FAQ Module
«
Reply #36 on:
October 31, 2009, 11:49:18 AM »
As you can see in the code above somewhere, the FAQ is just an unordered list, so every question is a <li>, which has standard a bullet.
Code:
echo '<ul><li style="padding:1px 0px;"><a href="'.$qlink.'">'.$question.'</a></li></ul>';
You only have to style the bullet with CSS to get rid of it. I don't have the FAQ installed, so I don't where you can do that best. Maybe right in the admin settings, or maybe in a special CSS file that you can open from within the admin, or in the general template CSS file, or even the PHP file. But it's a simple CSS styling matter for sure.
«
Last Edit: October 31, 2009, 11:50:56 AM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
discofred
Offline
Posts: 1
Re: FAQ Module
«
Reply #37 on:
November 07, 2009, 07:38:17 PM »
When I try to upload the FAQ module I get the following error:
Invalid WebsiteBaker installation file. Please check the *.zip format.
Back
I am using wb v 2.8 any thoughts?
Logged
Argos
Moderator
Offline
Posts: 2161
Re: FAQ Module
«
Reply #38 on:
November 08, 2009, 02:00:59 AM »
Quote from: discofred on November 07, 2009, 07:38:17 PM
When I try to upload the FAQ module I get the following error:
Invalid WebsiteBaker installation file. Please check the *.zip format.
Back
I am using wb v 2.8 any thoughts?
Read the posts above on this page. You should use version .6 instead of .5.
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pimek
Offline
Posts: 1
Re: FAQ Module
«
Reply #39 on:
November 24, 2009, 02:28:09 PM »
Thanks a lot for the great plugin!
I would like to ask admin to put link on the new version of this module on the modules-page, there is still link to version 1.45 which is not working with the current version of WB and it's a bit confusing for newbies to search through forums to find out why.
see
http://addons.websitebaker.org/pages/modules/page-modules.php
Thanks and best regards
Pimek
----
Just a quick note, I have found small glitch in the modify_settings.php file - all the rows are styled by "setting_name" class while the second column cells should be styled by "setting_value" class.
There is no a problem with the function of the module, however it's inconvenient while editing the content in module settings.
You can edit that yourself or use my file, nothing else has been touched
«
Last Edit: November 24, 2009, 07:31:46 PM by Pimek
»
Logged
gmastap
Offline
Posts: 2
Re: FAQ Module
«
Reply #40 on:
April 11, 2010, 06:47:25 PM »
Thank you for writing this add-on. I really adore it and use it in nearly every WebsiteBaker installation I do.
But to become a little bit more flexible I just modified 2 lines in the script to get acces to die category ids.
I just replaced:
Code:
echo strtr($category_summary_first, array('{CATID}' => $admin->strip_slashes($cat['cat_id'])));
with
Code:
echo strtr($category_summary_first, array('{CATEGORY}' => $admin->strip_slashes($cat['cat_name']),'{CATID}' => $admin->strip_slashes($cat['cat_id'])));
Further I replaced
Code:
echo strtr($category_detail_first, array('{CATID}' => $admin->strip_slashes($cat['cat_id'])));
with
Code:
echo strtr($category_detail_first, array('{CATEGORY}' => $admin->strip_slashes($cat['cat_name']),'{CATID}' => $admin->strip_slashes($cat['cat_id'])));
Now it is possible just to create an listing for all categories without showing all questions at once.
I just used this for template overview:
Code:
[category]
<h3><a href="#{CATID}">- {CATEGORY}</a></h3>
[/category]
and this for template details:
Code:
[category]
<h2><a name="{CATID}">{CATEGORY}</a></h2>
<br />
[question]
<h5 >Q. {QUESTION}</h5>
<p>{ANSWER}</p>
<p>
<span style="font-size:10px;"><a href="#top">^ TOP</a></span>
</p>
[/question]
[/category]
Probably someone can use it.
Best Regards,
GM
Logged
Argos
Moderator
Offline
Posts: 2161
Re: FAQ Module
«
Reply #41 on:
April 11, 2010, 11:08:32 PM »
Hi gmastap, do you have a URL where we can have a look?
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
gmastap
Offline
Posts: 2
Re: FAQ Module
«
Reply #42 on:
April 16, 2010, 01:58:27 PM »
Sure I can provide you with an URL
Firma USA
For a nice loo,k I even used here the
MooTools
Framework.
«
Last Edit: April 16, 2010, 03:47:28 PM by gmastap
»
Logged
Linger
Offline
Posts: 78
Re: FAQ Module
«
Reply #43 on:
November 18, 2010, 03:54:32 PM »
Hello community,
i just modified the module with a little bit jQuery magic. The answers of the questions are now collapsible in order to make long FAQ more easy to read.
Have a look at the demo page:
http://www.andreherdling.de/generator/content/playground/test-faq-baker-plus.php
I documented any changes (unfortunately only in german language) if you want to apply it to your own instance of the module:
http://www.andreherdling.de/generator/content/webentwicklung/website-baker-cms/f.a.q.-baker-plus.php
Regards
André
Logged
http://www.andreherdling.de
Mediengestalter aus Leidenschaft
----
Avatar created by using the generator at
http://www.sp-studio.de/
nuke
Offline
Posts: 27
Re: FAQ Module
«
Reply #44 on:
February 23, 2011, 07:20:56 PM »
Thanks Linger - works great!
Quote from: Linger on November 18, 2010, 03:54:32 PM
Hello community,
i just modified the module with a little bit jQuery magic. The answers of the questions are now collapsible in order to make long FAQ more easy to read.
Have a look at the demo page:
http://www.andreherdling.de/generator/content/playground/test-faq-baker-plus.php
I documented any changes (unfortunately only in german language) if you want to apply it to your own instance of the module:
http://www.andreherdling.de/generator/content/webentwicklung/website-baker-cms/f.a.q.-baker-plus.php
Regards
André
Logged
Pages:
1
[
2
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...