Факдитор к ckeditor4 - PullRequest
       10

Факдитор к ckeditor4

0 голосов
/ 16 ноября 2018

Проблема:

Начиная с моей проблемы, мой контент не отображается для редактирования.

  • Я вижу это на моем переднем конце, но не на заднем.
  • Вероятно, из-за старой программы fckedit.
  • Я пытаюсь выяснить следующий шаг, чтобы заменить старый FCKeditor на моей странице ckeditor4.
  • Мой сайт был создан с нуля (я не создавал его). У меня есть ckeditor4, загруженный в мою папку include, и я смог проверить его, используя мой URL.

Однако я не могу заставить его работать на странице или показывать свой контент, который недоступен на серверной части.

Вот моя кодировка страницы:

{include file='siteadmin/header.tpl'}

{include file='siteadmin/left.tpl'}
<h1>{if $action eq 'add'}Add{else}Edit{/if} Page</h1>
<form method="post" action="{$_conf_vars.ADMIN_URL}index.php?opt={$opt}&a={$action}{$qstr}" name="frm" id="frm" enctype="multipart/form-data">
  {if $show_msg ne ''}

  {$show_msg}

  {/if}
  <input type="hidden" name="page_id" id="page_id" value="{$page_id}" />
  <input type="hidden" name="alias_id" id="alias_id" value="{$alias_id}" />
  <input type="hidden" name="page_title" id="page_title" value="{$page_title|@StripSlash}" />
  <input type="hidden" name="adapters" id="adapters" value="1" />
  <input type="hidden" name="btn" value="{$action}" />
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="listdata">
    <tr>
      <td><div align="right">Page Title:<span class="star">*</span></div></td>
      <td><input type="text" id="page_title" name="page_title" value="{$page_title|@StripSlash}" maxlength="300" style="width:532px;"/></td>
    </tr>
    <tr>
      <td><div align="right">Page Alias:<span class="star">*</span></div></td>
      <td><input type="text" name="page_alias" maxlength="100" id="page_alias" value="{$page_alias|@StripSlash}" size="60" />
        <em>(a-z, 0-9, hyphen (-) only)</em></td>
    </tr>

    <tr>


      <td valign="top"><div align="right">Description:<span class="star">*</span></div></td>
   <td>
 {php}
        $sBasePath = $_conf_vars['ROOT_URL'].'include/fckeditor/';
        $oFCKeditor = new FCKeditor('page_body') ;
        $oFCKeditor->BasePath = $sBasePath ;
        $oFCKeditor->ToolbarSet ="Default";
        $oFCKeditor->Value = StripSlash($this->get_template_vars('page_body')) ;
        $oFCKeditor->Height = 500;
        $oFCKeditor->Width = 700;
        $oFCKeditor->Create() ;
       {/php}       

    </tr>
    <tr>

      <td width="31%"><div align="right">Meta Title:</div></td>
      <td width="69%"><textarea name="meta_title" id="meta_title"  rows="4" cols="100">{$meta_title|@StripSlash}</textarea></td>
    </tr>
    <tr>
      <td><div align="right">Meta Keywords:</div></td>
      <td><textarea name="meta_keywords" id="meta_keywords" rows="4" cols="100">{$meta_keywords|@StripSlash}</textarea>
      <br/><small> <small>Separated by commas</small></small></td>
    </tr>
    <tr>
      <td><div align="right">Meta Description:</div></td>
      <td><textarea name="meta_desc" id="meta_desc" rows="4" cols="100">{$meta_desc|@StripSlash}</textarea></td>
    </tr>

    <tr>
      <td width="270">&nbsp;</td>
      <td width="689" align="right"> {if $action eq "add" or $action eq "more"}
        <button type="submit" onclick="document.frm.btn.value = 'success';">Add and Go To Listing</button>
        <button type="submit" onclick="document.frm.btn.value = 'more';">Add More</button>
        {else}
        <button type="submit" onclick="document.frm.btn.value = 'update';">Update and Go To Listing</button>
        {/if}
        <button type="button" onclick="window.location.href='index.php?opt={$opt}{$qstr}'">Cancel</button></td>
    </tr>
  </table>
</form>
{include file='siteadmin/footer.tpl'}

Спасибо, лев

...