Customizing SMF > Modifications and Packages

FAQ (Frequently Asked Questions) mod

<< < (60/77) > >>

FireDitto:
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 =)

Suki:
If you want to remove that box search on Faq.template.php:


--- Code: ---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>';
}

--- End code ---

and delete that part.

iain sherriff:
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"

??

Suki:
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.

FireDitto:

--- Quote from: La Catrina on September 08, 2012, 07:53:49 PM ---If you want to remove that box search on Faq.template.php:


--- Code: ---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>';
}

--- End code ---

and delete that part.

--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version