Welcome, Guest. Please login or register.
March 21, 2010, 04:29:38 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem Website Baker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite .
110567 Posts in 15967 Topics by 9310 Members
Latest Member: stevenris10
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  FAQ Module
Pages: 1 [2] Go Down Print
Author Topic: FAQ Module  (Read 11452 times)
dihakz

Offline Offline

Posts: 23


« Reply #25 on: June 23, 2007, 11:33:04 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 Offline

Posts: 23


« Reply #26 on: June 23, 2007, 07: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 Offline

Posts: 17



« Reply #27 on: July 17, 2007, 05: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 Offline

Posts: 6


« 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, 03:05:27 AM by Argos » Logged
dfelix

Offline Offline

Posts: 41


« Reply #29 on: August 17, 2009, 02:47:45 AM »

This mod does not work with 2.8RC2...
Logged
Argos
Forum administrator
*****
Offline Offline

Posts: 1349


WWW
« Reply #30 on: August 17, 2009, 03:06:28 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
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
BerndJM
Moderator
******
Offline Offline

Posts: 1677



WWW
« Reply #31 on: August 17, 2009, 03: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  wink
What means "doesn't work"?

Edit:
think I see the problem, pleas try the attached version!

Regards Bernd
« Last Edit: August 17, 2009, 03:19:28 AM by BerndJM » Logged

Recommended site of the day: Help-Projekt | no support via email or pm !!!
dfelix

Offline Offline

Posts: 41


« Reply #32 on: August 17, 2009, 12:40:32 PM »

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 Offline

Posts: 3


« Reply #33 on: September 05, 2009, 11:15:20 PM »

website baker 2.8  with  FAQ intallation is there
 problem.
Logged
timmeh

Offline Offline

Posts: 1


« Reply #34 on: October 18, 2009, 01:31:50 PM »

website baker 2.8  with  FAQ intallation is there
 problem.


1.45 doesn't install, but 1.46 does...see quoted post below.

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  wink
What means "doesn't work"?

Edit:
think I see the problem, pleas try the attached version!

Regards Bernd
Logged
sammedit

Offline Offline

Posts: 6


« 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
Forum administrator
*****
Offline Offline

Posts: 1349


WWW
« 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
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
discofred

Offline Offline

Posts: 1


« Reply #37 on: November 07, 2009, 07:38:17 PM »

When I try to upload the FAQ module I get the following error:



Invalid Website Baker installation file. Please check the *.zip format.

Back


I am using wb v 2.8 any thoughts?
Logged
Argos
Forum administrator
*****
Offline Offline

Posts: 1349


WWW
« Reply #38 on: November 08, 2009, 02:00:59 AM »

When I try to upload the FAQ module I get the following error:



Invalid Website Baker 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
www.argosmedia.nl/portfolio (mostly WB sites)
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pimek

Offline Offline

Posts: 1


« 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 smiley
« Last Edit: November 24, 2009, 07:31:46 PM by Pimek » Logged
Pages: 1 [2] Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!