Yes, there is a way to conditionally load freichat based on the page.
When you install freichat in SMF, it adds its code to the file Sources/Load.php .
So open that file, and in the function loadTemplate() .
You can do something like this :
$pageList = array(PUT_YOUR_PAGES_HERE)
if(in_array(CURRENT_PAGE, $pageList)) {
$context['html_headers'] .= '<script type="text/javascript" language="javascipt"src="'.$boardurl.'/freichat/client/main.php?id='.$ses.'&xhash='.$xhash.'"></script>
<link rel="stylesheet" href="'.$boardurl.'/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css" />';
}
You need to modify above according to your needs..
Yes, there is a way to conditionally load freichat based on the page.
When you install freichat in SMF, it adds its code to the file `Sources/Load.php` .
So open that file, and in the function loadTemplate() .
You can do something like this :
```
$pageList = array(PUT_YOUR_PAGES_HERE)
if(in_array(CURRENT_PAGE, $pageList)) {
$context['html_headers'] .= '&lt;script type="text/javascript" language="javascipt"src="'.$boardurl.'/freichat/client/main.php?id='.$ses.'&xhash='.$xhash.'"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="'.$boardurl.'/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css" /&gt;';
}
```
You need to modify above according to your needs..
edited Oct 17 '14 at 3:15 pm