Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.1k views
in Q2A Core by
edited

Hi.

how to add this code in footer

<? global $sape; echo $sape->return_links(); ?>

and this code need to add in <body>

<?php

global $sape;
if (!defined('_SAPE_USER')){
define('_SAPE_USER', '***');
}
require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php');
$o['charset'] = 'UTF-8';
$sape = new SAPE_client($o);
unset($o);
?>

Q2A version: 1.5

2 Answers

0 votes
by
On the main menu, go to Admin->Layout

Enter your code as custom HTML.
+1 vote
by

Create in your theme folder: qa-theme.php, and add in this file:

<?php
class qa_html_theme extends qa_html_theme_base {
function footer() {
parent::footer();

if (!defined('_SAPE_USER')){
define('_SAPE_USER', '***');
}

require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php');
$o['charset'] = 'UTF-8';
$sape = new SAPE_client($o);
unset($o);

echo $sape->return_links();
}
}

...