Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.1k views
in Q2A Core by
edited by
I want to add below usage/information-dynamic-pages by pages-feature.

Ex.)
     [for user pages]                         [Admin pages]
top->usage->Post style              <-- admin->Posts
top->usage->Point System         <-- admin->Points
top->usage->Category variation <-- admin->Category
top->usage->RSS feed variation <-- admin->RSS feed
top->usage->Site Summary        <-- admin->Stats

My hope)
I edit HTML by oneself for data-pickup and read-only. If possible, please teach a method to get admin-data-array. Not a complete cord, you may be able to have a hint. I seem not to be able to write the php cord on the page, and HTML cache is good when I consider performance and sequrity.

Best regards.
by
Before answering this, can you please confirm if you mean you want to offer this information to all viewers of the site, not just the administrator?
by
edited by
Thanks gidgreen.
Yes. I want to show system information except some important information to anonymous users for the purpose of showing the usage of the site. It can be realized even to paste the HTML code admin pages to static page, but wants to make information pages turning dynamic with admin setting change. Then, As an example... when Admin changes system setting, system data are exported to external file with HTML-format...

Related feature example)
"Import/Include option (by absolute-path/URL)" in pages feature of V1.2.

Think that there is more better method elsewhere ...

1 Answer

+1 vote
by
The easiest way is to duplicate the existing qa-page-admin-*.php page into a new PHP file, and then add a routing rule at the top of qa-page.php to make that file accessible from your Q2A site.

Then modify the admin page to remove the parts you don't want, e.g. get rid of the qa_admin_check_privileges(...) check which prevents non-admins from seeing the page, and remove parts of the PHP which would allow users to make changes to the settings or database (before the comment "Prepare content for theme").

Finally once the page works use the 'Pages' section of the 'Admin' panel to add a custom link to that page from within your Q2A site.
by
Thank you so much gidgreen. I try it !
by
I made 3 first of all. It was able to easily come true unexpectedly.
http://qa.modxclub.net/info  (bottom menu link)
...