function drawArgumentBoxExtended(Question $q, $view, $basePath, Argument $a, $tabUseParent = false, $abstract = true, $drawTabs = true, $customTabRoot = false) { global $sTemplate; $tabArg = $a; $tabArg2 = $tabArg; if ($tabUseParent) { $tabArg = $a->parent(); } if ($customTabRoot) { $tabArg = $customTabRoot; $tabArg2 = $customTabRoot; if ($tabUseParent) { $tabArg = $tabArg->parent(); } } $tabs = "\n<div class = 'tab" . ($view == VIEW_DISCUSSION ? " tab_active" : "") . "'>\n <a href = '" . $basePath . "'>" . $sTemplate->getString("QUESTION_TAB_DISCUSSION") . "</a>\n</div>\n<div class = 'tab" . ($view == VIEW_DETAILS ? " tab_active" : "") . "'>\n <a href = '" . $basePath . "details/'>" . $sTemplate->getString("QUESTION_TAB_DETAILS") . "</a>\n</div>\n<div class = 'tab " . ($tabArg->type() == ARGUMENT_PRO ? "tab_arg_pro" : "tab_arg_con") . "'>\n <a href = '" . $tabArg->url($basePath) . "'>" . $sTemplate->getString("QUESTION_TAB_ARGUMENT", array("[TITLE]"), array($tabArg->headline())) . "</a>\n</div>\n<div class = 'tab " . (!$tabUseParent && $view != VIEW_NEW_COUNTER_ARGUMENT ? " tab_active" : "") . " " . ($tabArg->type() != ARGUMENT_PRO ? "tab_arg_pro" : "tab_arg_con") . "'>\n <a href = '" . $tabArg->url($basePath) . "ca/'>" . $sTemplate->getString("QUESTION_TAB_COUNTER_ARGUMENT", array("[TITLE]"), array($tabArg->headline())) . "</a>\n</div>"; if ($tabUseParent) { $tabs .= "\n<div class = 'tab tab_active " . ($tabArg2->type() != ARGUMENT_PRO ? "tab_arg_pro" : "tab_arg_con") . "'>\n <a href = '" . $tabArg2->url($basePath) . "'>" . $sTemplate->getString("QUESTION_TAB_COUNTER_ARGUMENT", array("[TITLE]"), array($tabArg2->headline())) . "</a>\n</div>"; } if ($view == VIEW_NEW_COUNTER_ARGUMENT) { $tabs .= "\n<div class = 'tab tab_active'>\n " . $sTemplate->getString("QUESTION_TAB_NEW_COUNTER_ARGUMENT") . "\n</div>"; } if (!$drawTabs) { $tabs = ""; } echo drawArgumentBoxRaw($q, $tabs, $a, $basePath, $abstract); }