We had a problem where no user styles could be given in News module by FCKeditor like you can when editing pages if styles are given in FCKeditor "styles" tab. This requires that you create template called "News" and attach stylesheets needed to it. We've tried this in CMSMS 1.0.4 News module (What ever version it is).
On News.module.php at very end before last "}"
add new function
Code: Select all
/************ BO edit ***************/
function getStyleSheet()
{
global $gCms;
$templateops = & $gCms->GetTemplateOperations();
$alltemplates = $templateops->LoadTemplates();
if (count($alltemplates) > 0)
{
foreach ($alltemplates as $onetemplate)
{
if ($onetemplate->name == 'News')
$templateid = $onetemplate->id;
}
}
$stylesheet = '../stylesheet.php?templateid='.$templateid;
return $stylesheet;
}
/********************EO edit************************************/
on very beginning of file you find
Code: Select all
<?php
if (!isset($gCms)) exit;
Code: Select all
<?php
if (!isset($gCms)) exit;
/************ BO edit ***************/
$stylesheet = $this->getStyleSheet();
/****************EO edit ****************************/
Code: Select all
$this->smarty->assign('inputcontent', $this->CreateTextArea(true, $id, $content, 'content'));
$this->smarty->assign('inputsummary', $this->CreateTextArea(true, $id, $summary, 'summary', '', '', '', '', '80', '3'));
Code: Select all
$this->smarty->assign('inputcontent', $this->CreateTextArea(true, $id, $content, 'content','','','',$stylesheet));
$this->smarty->assign('inputsummary', $this->CreateTextArea(true, $id, $summary, 'summary', '', '', '', $stylesheet, '80', '3'));
Code: Select all
<?php
if (!isset($gCms)) exit;
Code: Select all
<?php
if (!isset($gCms)) exit;
/************ BO edit ***************/
$stylesheet = $this->getStyleSheet();
/**************EO edit*********************/
Code: Select all
$this->smarty->assign('inputcontent', $this->CreateTextArea(true, $id, $content, 'content'));
$this->smarty->assign('inputsummary', $this->CreateTextArea(true, $id, $summary, 'summary', '', '', '', '', '80', '3'));
Code: Select all
$this->smarty->assign('inputcontent', $this->CreateTextArea(true, $id, $content, 'content','','','',$stylesheet));
$this->smarty->assign('inputsummary', $this->CreateTextArea(true, $id, $summary, 'summary', '', '', '', $stylesheet, '80', '3'));
Have fun,
Keijo