Just got it set up. Need to ask a few questions

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
DR4296
Posts: 7
Joined: Thu Dec 15, 2005 8:10 pm
Location: Independence, MO

Just got it set up. Need to ask a few questions

Post by DR4296 » Thu Dec 15, 2005 8:18 pm

Greetings All !

OK, so I've just finished setting up phpmyfq and moving all of my old faq system's content (old system = FAQEngine) into it.


OK, I have a category with several subcategories "under" it. When you click on the left-hand navbar for that category, yes, the subcategories appear / expand underneath it. However, the main page area says "no entries available".

Well, no, there are no entries directly under the Category. But there ARE entries under its three subcategories.

I'm concerned that people won't notice the subcategories. Might there be a way to get it to list each subcategory that it has "under" it in that main text area?

Also, I've been going over the CSS code, trying to figure out how to make these subcategories a different color when they expand, so as to make them more noticeable. And, even though I see some references to "subcat" in the CSS code for the "categories", when I change those values, I don't see changes take place in the navbar.

One more thing: I've been trying to figure out where in the CSS code (colors.css) is the reference to that long, thick dark-blue vertical line that's just to the left of the main left-hand navbar ??? Anybody know where this is?

Other than that, so far this looks SWEET !!

I really chose phpMyFAQ because of the whole mod_rewrite thing / search engine support. Been getting almost zero search engine hits on my FAQ system when using FAQEngine.


Thanks!

-= Dave =-

matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Just got it set up. Need to ask a few questions

Post by matteo » Thu Dec 15, 2005 8:59 pm

DR4296 wrote:When you click on the left-hand navbar for that category, yes, the subcategories appear / expand underneath it. However, the main page area says "no entries available".

Well, no, there are no entries directly under the Category. But there ARE entries under its three subcategories.

I'm concerned that people won't notice the subcategories. Might there be a way to get it to list each subcategory that it has "under" it in that main text area?
A first suggestion is to check the language of each category and compare it against the language of the the faq data within that category: they must be equal.
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist

DR4296
Posts: 7
Joined: Thu Dec 15, 2005 8:10 pm
Location: Independence, MO

Re: Just got it set up. Need to ask a few questions

Post by DR4296 » Thu Dec 15, 2005 10:29 pm

matteo wrote:
A first suggestion is to check the language of each category and compare it against the language of the the faq data within that category: they must be equal.
I think you may be misunderstanding me.

When I click on a primary category name on the left hand navbar, the subcategories ARE expanded on that navbar on the next page that I am taken to.

However, I'm thinking, the subcategories aren't really differentiated very well. Their color appears the same. They are indented a little. That's the only difference.

If a user isn't particularly WATCHING that navbar, they're going to look to the center of the page instead. And that center of the page simply says that there are no entries.

This might lead the user to think that there are absolutely no entries at all in that category. This isn't true... the entries are simply within the subcategories that are underneath that category.


So, I'm trying to fix this problem with a two-method approach:
1) Make the subcategories "stand out" on the left-hand navbar.
and
2) Perhaps substitute that "No entries available" message with a list of all the subcategories for that category.



Thanks!

-= Dave =-

matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Just got it set up. Need to ask a few questions

Post by matteo » Thu Dec 15, 2005 11:54 pm

DR4296 wrote:This might lead the user to think that there are absolutely no entries at all in that category. This isn't true... the entries are simply within the subcategories that are underneath that category.
Unfortunately for you this is the design of PMF: it tells the user that under the selected category there aren't faq entries.

A very rough code sample for implementing something similar to your request is provided below.
Please open the inc/functions.php (backup it before!) and locate the printThemes function.
Now modifiy the line:

Code: Select all

	global $db, $sids, $PMF_LANG, $PMF_CONF;
into

Code: Select all

	global $db, $sids, $PMF_LANG, $PMF_CONF, $tree;
and the lines:

Code: Select all

    } else {
		$output = $PMF_LANG["err_noArticles"];
	}
into:

Code: Select all

    } else if (count($tree->getChildren($category)) > 0) {
        $output .= "<ul>";
        foreach ($tree->getChildren($category) as $catItem) {
            $output .= "<li>".htmlentities($PMF_LANG["msgSearchCategory"])."<a href="".$_SERVER["PHP_SELF"]."?".$sids."action=show&cat=".$tree->categoryName[$catItem]["id"]."">".htmlentities($tree->categoryName[$catItem]["name"])."</a></li>";
        }
        $output .= "</ul>";
    } else {
        $output = $PMF_LANG["err_noArticles"];
    }
I hope this will help you to reach your goal :wink:
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist

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

Re: Just got it set up. Need to ask a few questions

Post by Thorsten » Fri Dec 16, 2005 8:07 am

Hi,
DR4296 wrote:If a user isn't particularly WATCHING that navbar, they're going to look to the center of the page instead. And that center of the page simply says that there are no entries.
I started to work on a addition to show the subcategories then a category do not have any records but sub-categories.

I hope to get this feature completed in the near future for the 1.5.x and 1.6.x releases.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

DR4296
Posts: 7
Joined: Thu Dec 15, 2005 8:10 pm
Location: Independence, MO

Post by DR4296 » Fri Dec 16, 2005 5:08 pm

Thanks, matteo and Thorsten !!

I'll try matteo's code out here in a few minutes.

Meanwhile, I think I found a small typo. I noticed that the HTML for the expanded subcategories was saying:

<ul class"subclass">

I thought perhaps this was a part of the problem... that perhaps there was some CSS code designed to make that class look different, but since the equals sign was missing, it wasn't working.

So I located the part of the code where this was: /inc/category.php ... line 548. Put the equals sign in. Verified the page was loading it. However, it looks the same in appearance. So, I don't know if anybody actually had any intention of using that subclass for anything... but there's the typo fix anyways.

Like I said, I'll try matteo's code here in a few minutes.

Thanks!

-= Dave =-

DR4296
Posts: 7
Joined: Thu Dec 15, 2005 8:10 pm
Location: Independence, MO

Excellent !!

Post by DR4296 » Fri Dec 16, 2005 5:12 pm

Thanks matteo !!

That code does the trick! Looks beautiful!

I'm looking forward to submitting this baby to Google! <grin!>


Thanks very much!
phpMyFAQ rocks !!


-= Dave =-

DR4296
Posts: 7
Joined: Thu Dec 15, 2005 8:10 pm
Location: Independence, MO

Followup

Post by DR4296 » Fri Dec 16, 2005 5:16 pm

Say, just a quick followup.... I think that line in /inc/category.php was intended to "map up" with the sections of the CSS files labelled "subcat".

So, either that line in that file should be changed from "subclass" to "subcat"... or you'd need to change the CSS file references from "subcat" to "subclass".

I did the second method and now expanded subcategories are much more noticeable.


Thanks!

-= Dave =-

matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo » Fri Dec 16, 2005 8:47 pm

DR4296 wrote:Meanwhile, I think I found a small typo. I noticed that the HTML for the expanded subcategories was saying:

<ul class"subclass">
This has already been fixed in PMF 1.5.5
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist

matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Followup

Post by matteo » Fri Dec 16, 2005 8:50 pm

DR4296 wrote:Say, just a quick followup.... I think that line in /inc/category.php was intended to "map up" with the sections of the CSS files labelled "subcat".

So, either that line in that file should be changed from "subclass" to "subcat"... or you'd need to change the CSS file references from "subcat" to "subclass".
Thanks DR4296! I think you're right :wink:
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist

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

Re: Just got it set up. Need to ask a few questions

Post by Thorsten » Sun Dec 18, 2005 4:42 pm

Hi,
DR4296 wrote:If a user isn't particularly WATCHING that navbar, they're going to look to the center of the page instead. And that center of the page simply says that there are no entries.
2) Perhaps substitute that "No entries available" message with a list of all the subcategories for that category.
this is now fixed in upcoming version 1.5.5.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply