thorsten/phpMyFAQ — Issue #362: Make easier to re-locate menu items from public and administrative pages
Author: pauljohn32
Created: 2011-12-01 16:09:13+00:00
State: open

Greetings:

We had such a nice conversation about fonts and pdfs I decided to try my hand at some other features.

I'd like to shuffle the things in the top menu bar. I want only registered and logged in users to see any of the buttons that lead to entry of data. On the other hand, I want visitors to be able to create a pdf export of the faq, so I'd move the export button from admin to the other menu.

I've done this kind of re-organization in MediaWiki, there's a macro that one can use to ask if the user is logged in and only then show particular content. phpMyFAQ makes this a bit more complicated because the menu items are in separate directories, some are under template, while some are under admin in the source code. So I'm getting very confused trying to figure how to re-assign buttons. I've figured how to change artikel.php in order to stop phpMyFAQ from showing edit buttons to visitors, as you see here:

http://pj.freefaculty.org/faq/Rtips/

I found it pretty easy to comment out those entries in the template artikel.tpl file. (Is that best way?) Like so:

{showSitemap}

But I can't understand how to
1. Put the Export to PDF button in there
2. Make those buttons show for users who are logged in.

The admin folder has the export stuff, how to call that from index.tpl?

I'm not a php guy, was good at Perl 5 years ago. If this is a bad problem, or too hard for a part time hacker, I should just give up. Am I making this too complicated for myself?

Do you know what I mean?

PJ