Welcome to the Question2Answer Q&A. There's also a
demo
if you just want to try it out.
Login
Login
Register
All Activity
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
About
Wiki
Welcome to the Q&A for
Question2Answer
.
If you have questions about the platform,
click here to ask
and please use English.
If you just want to try Q2A, please use the
demo
, which also grants admin access.
Apr 29:
Q2A 1.5.2
Related questions
Why qa-q-view-buttons, qa-a-view-buttons are formatted as html buttons ?
where i can find this system API or template tags's list?
How to integrate Question2Answer into a WordPress theme?
error integrate with wordpress..why?
Why does WordPress break Ajax updates?
Wordpress Theme Integration or Plugin Development
embedding in to wordpress theme - no login merge, only visual
WordPress integration not working after upgrade
Login not working with wordpress
Wordpress integration not working
All categories
Q2A Core
(3,252)
Plugins
(356)
Why not a similar theme structure as Wordpress?
+2
votes
I have been using Wordpress for years and I really love the simple structure of having individual files like header.php, index.php, post.php, categories.php in your theme folder which you can build according to template tags and WP functions.
However, after I used Q2A for a few days now, extending/editing functions with a qa-theme.php file feels a bit awkward to me.
Would Q2A not be (way) more functional (for developers) if it had a similar theme structure to Wordpress?
Something like: index.php, questions.php, tags.php, users.php et cetera, and then having template tags/functions like: get_recent_questions(), get_askbox(), get_categories(), et cetera, to build these files?
wordpress
template
asked
May 26, 2011
in
Q2A Core
by
Aslan
edited
May 26, 2011
by
Aslan
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
+3
votes
Best answer
It's a fair question, which I've answered before, but let me answer again.
The problem with a template-based approach is that Q2A is evolving very rapidly, so a template-based theme would go out of date when a new version of Q2A is released.
By using an object-oriented approach to theming, it's easy for a new version of Q2A to change the necessary parts of pages, while still remaining backwards compatible with almost all themes already created.
The object-oriented approach also enables the 'layers' functionality in plugins, which allows one plugin to modify small parts of the HTML output, while being compatible with an unrelated plugin that modifies some other part.
In the long run, I imagine giving admins the option of using template-based theming or object-oriented theming, depending on whether they prefer flexibility + backwards compatibility, or ease-of-use. But there's still a lot more basic Q2A functionality that needs to be in place first...
answered
May 26, 2011
by
gidgreen
Please
log in
or
register
to add a comment.