Removing "Views" + Formatting "Questions"

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
acronator
Posts: 2
Joined: Tue Jun 05, 2007 2:59 pm

Removing "Views" + Formatting "Questions"

Post by acronator »

Hi,

phpMyFAQ is incredible..have spent the last 5 days customizing it and love the fact that it can be changed so extensively because of the separation of content and formatting.

I am using 2.0.1 and have customized it quite a bit by updating the index.tpl, main.tpl, css files and other .tpl files. I have a couple of changes I am unable to make and hoping someone can help me.

1. How do I remove the "(XX Views)" under each question in a category? After going through other articles in the forums, I looked for printThemes ($category) in functions.php but could not find it? Has this changed with phpMyFAQ 2.x?

2. I would like to change the style of the questions list under a category. How do I do that? Have tried changing a bunch of things in style.css and colors.css but I am unable to change the indentation/left margin for the question list. Which class/id do i need to modify?

Thanks in advance.

Regards,

Rahul
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Removing "Views" + Formatting "Questions&

Post by Thorsten »

Hi,
1. How do I remove the "(XX Views)" under each question in a category? After going through other articles in the forums, I looked for printThemes ($category) in functions.php but could not find it? Has this changed with phpMyFAQ 2.x?
you have to remove this in the file inc/Faq.php in the function getTopTen().
2. I would like to change the style of the questions list under a category. How do I do that? Have tried changing a bunch of things in style.css and colors.css but I am unable to change the indentation/left margin for the question list. Which class/id do i need to modify?
You can change the layout of this list with the CSS classes

Code: Select all

.main-content .phpmyfaq_ul
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
acronator
Posts: 2
Joined: Tue Jun 05, 2007 2:59 pm

Post by acronator »

Thanks a ton!! :D

I made the following changes :

1. Removing (XX Views)
Original Code in faq.php:

Code: Select all

$listItem = sprintf('<li>%s<br /><span class="little">(%d %s)</span></li>'
Changed to:

Code: Select all

$listItem = sprintf('<li>%s</li>'
2. Formatting "Questions".
I madea couple of changes to give me a little more flexibility as it helps me drill down in css

First I changed faq.php :-
Original Code:

Code: Select all

$output .= '<ul class="phpmyfaq_ul">';
Changed Code:

Code: Select all

$output .= '<ul id="qlist">';
Next I created definitions for #qlist in styles.css and colors.css. Removed styles made redundant.

Categories page now is perfect for my reqs. Havent gone through the entire app yet to see if I screwed up anything. Will update if any. Again thanks!
Post Reply