More great + suggestions...

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
tbronson
Posts: 4
Joined: Mon Oct 25, 2004 12:12 am

More great + suggestions...

Post by tbronson »

I've been keeping up with the 1.4 upgrades, now running 1.4.5 and all's going great. It's really excellent.

I also took some time to change the layout from the default, and I noticed something that maybe there's an easier way to do. I wanted a 3-column layout like on the home page, with top 10 and 5 newest on the right, running throughout. To get it, I added the right column code to most of the templates (tpl), then added the functions for generating the 10 and 5 to the template processing in each of the corresponding scripts, like:

Code: Select all

"writeTopTenHeader" => $PMF_LANG["msgTopTen"],
"writeTopTenRow" => generateTopTen(),
"writeNewestHeader" => $PMF_LANG["msgLatestArticles"],
"writeNewestRow" => generateFiveNewest()
It seems like, since I was doing the same thing to a dozen or so files, maybe that could be done in one shot somewhere? That'd make it easier to add other stuff to the right column as well. Or is there a simpler way to do it?

(You can see what I mean about the 3 colums by clicking through some pages: http://freshlocalorganic.com)

Also, I'd mentioned a while ago about being able to reorder the FAQs. I noticed this is now being considered for 1.6. I find it pretty important, because there are usually FAQs that make sense grouped together, and some that should be at the beginning or before others. I've been manually swapping ID #s in the database to reorder.

Anyhow...thanks again!!!
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the main layout page is index.tpl. You had to change all files because you wanted to have the top 10 on all pages.

The reordering is one of our biggest items on the todo list.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
tbronson
Posts: 4
Joined: Mon Oct 25, 2004 12:12 am

Post by tbronson »

Thorsten wrote:the main layout page is index.tpl. You had to change all files because you wanted to have the top 10 on all pages.
Hi, Thorsten,

I thought about this while using the program, and it still seems like a good idea to be able to more easily include the Top 10 and 5 newest on all the pages. Couldn't there be some sort of switch to turn them on or off in $tpl->processTemplate in all the script files and their tags in the templates? I think at least for sites with lots of FAQs and that are constantly adding more, the 10 and 5 are very useful to have around whatever page you're on when browsing the site.

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

Post by Thorsten »

Hi,

I think about an API to do that. My dream is a really modular version of phpMyFAQ sometime in the future.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply