Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
501 views
in Q2A Core by
edited by
like qa-include/pages/tag.php

There is no functions in those pages.
Q2A version: 1.8.5
by
Like you said, there are no functions in those pages, so overrides won't work. From a quick glance I think a layer (https://docs.question2answer.org/plugins/layers/) might be your best bet. I'm just an absolute beginner at writing plugins, though, so take this with a grain of salt.

2 Answers

+1 vote
by

I think below is the way to customize those pages. I realize that those pages are part of a function called function qa_page_routing()  found in qa-include/app/routing.php

So, we create a custom file and override that routing function.

function qa_page_routing()
{
    if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }

    return array(
        'account' => 'pages/account.php',
        'activity/' => 'pages/activity.php',
        'admin/' => 'pages/admin/admin-default.php',
        'admin/recalc' => 'pages/admin/admin-recalc.php',
        'answers/' => 'pages/answers.php',
        'ask' => 'pages/ask.php',
        'categories/' => 'pages/categories.php',
        'comments/' => 'pages/comments.php',
        'confirm' => 'pages/confirm.php',
        'favorites' => 'pages/favorites.php',
        'favorites/questions' => 'pages/favorites-list.php',
        'favorites/users' => 'pages/favorites-list.php',
        'favorites/tags' => 'pages/favorites-list.php',
        'feedback' => 'pages/feedback.php',
        'forgot' => 'pages/forgot.php',
        'hot/' => 'pages/hot.php',
        'login' => 'pages/login.php',
        'logout' => 'pages/logout.php',
        'messages/' => 'pages/messages.php',
        'message/' => 'pages/message.php',
        'questions/' => 'pages/questions.php',
        'register' => 'pages/register.php',
        'reset' => 'pages/reset.php',
        'search' => 'pages/search.php',
        'tag/' => 'pages/tag.php',
        'tags' => 'pages/tags.php',
        'unanswered/' => 'pages/unanswered.php',
        'unsubscribe' => 'pages/unsubscribe.php',
        'updates' => 'pages/updates.php',
    );
}

by
There should have a better way to do so..
+2 votes
by
try this

function qa_page_routing() {

$oroute = qa_page_routing_base();

$oroute['tag/'] = 'newdirectory/newfile.php';

return $oroute;

}
by
That will do!
...