Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z panelem
beyond13
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 26.05.2015

Ostrzeżenie: (0%)
-----


Potrzebuję pomocy, gdy chce wejść na panel administratora mojej strony to wyświetla mi się pusta strona. Najprawdopodobniej problem znajduje się w tym kodzie w linijce 55, co zrobić?

Oto kod:
  1. <?php
  2. require_once DIR_PLUGINS.'ckeditor/ckeditor.php';
  3. /**
  4. * Function returns editor
  5. * @return string
  6. * @param string $sName
  7. * @param int $iH
  8. * @param int $iW
  9. * @param string $sContent
  10. */
  11. function htmlEditor( $sName = 'sDescriptionFull', $iH = '300', $iW = '100%', $sContent = '', $aOption = null ){
  12. $sEdit = '';
  13. if( !strstr( $iH, '%' ) )
  14. $iH .= 'px';
  15. if( !strstr( $iW, '%' ) )
  16. $iW .= 'px';
  17.  
  18. if( WYSIWYG === true ){
  19. if( defined( 'TinyMceFullActive' ) && TinyMceFullActive === true ){
  20. if( defined( 'CKEditorActive' ) && CKEditorActive === true ){
  21. $oCKEditor = new CKEditor() ;
  22. $oCKEditor->returnOutput = true;
  23. $oCKEditor->basePath = DIR_PLUGINS.'ckeditor/';
  24. $oCKEditor->config['width'] = $iW;
  25. $oCKEditor->config['height'] = $iH;
  26. $oCKEditor->config['language'] = $GLOBALS['config']['admin_lang'];
  27. return $oCKEditor->editor($sName, $sContent);
  28. }
  29. else{
  30. if( !defined( 'WYSIWYG_START' ) ){
  31. $sEdit .= '<script language="javascript" type="text/javascript" src="'.DIR_PLUGINS.'tinymce-full/jscripts/tiny_mce/tiny_mce.js"></script>
  32.  
  33. <script language="javascript" type="text/javascript">
  34. <!--
  35. tinyMCE.init({
  36. theme : "advanced",
  37. plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emot
    ions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contex
    tmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxt
    ras,template,wordcount,advlist,autosave,visualblocks",
  38. mode : "exact",
  39. entity_encoding : "raw",
  40. elements : "sDescriptionShort,sDescriptionFull,sContent",
  41. theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justif
    ycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizesele
    ct",
  42. theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,out
    dent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|
    ,insertdate,inserttime,preview,|,forecolor,backcolor",
  43. theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iesp
    ell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
  44. theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acro
    nym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,vis
    ualblocks",
  45. theme_advanced_toolbar_location : "top",
  46. theme_advanced_toolbar_align : "left",
  47. theme_advanced_resizing : true,
  48. theme_advanced_resize_horizontal : false,
  49. debug : false
  50. });
  51. //-->
  52. </script>';
  53. }
  54. }
  55. else{
  56. if( defined( 'CKEditorActive' ) && CKEditorActive === true ){
  57. $oCKEditor = new CKEditor() ;
  58. $oCKEditor->returnOutput = true;
  59. $oCKEditor->basePath = DIR_PLUGINS.'ckeditor/';
  60. $oCKEditor->config['width'] = $iW;
  61. $oCKEditor->config['height'] = $iH;
  62. $oCKEditor->config['language'] = $GLOBALS['config']['admin_lang'];
  63. return $oCKEditor->editor($sName, $sContent);
  64. }
  65. else{
  66. if( !defined( 'WYSIWYG_START' ) ){
  67. define( 'WYSIWYG_START', true );
  68. $sEdit .= '<script language="javascript" type="text/javascript" src="'.$GLOBALS['config']['dir_plugins'].'tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
  69. <script language="javascript" type="text/javascript">
  70. <!--
  71. var theme_advanced_buttons1 = "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyrigh
    t,justifyfull,|,bullist,numlist,|,undo,redo";
  72. var theme_advanced_buttons2 = "";
  73. var additional_buttons = ",link,unlink,cleanup,removeformat,|,help,code";
  74. if( parseInt( window.screen.availWidth ) < 1130 )
  75. theme_advanced_buttons2 = additional_buttons;
  76. else
  77. theme_advanced_buttons1 += ",|"+additional_buttons;
  78. tinyMCE.init({
  79. theme : "advanced",
  80. mode : "exact",
  81. entity_encoding : "raw",
  82. elements : "sDescriptionShort,sDescriptionFull,sContent",
  83. theme_advanced_buttons1 : theme_advanced_buttons1,
  84. theme_advanced_buttons2 : theme_advanced_buttons2,
  85. theme_advanced_toolbar_location : "top",
  86. theme_advanced_toolbar_align : "left",
  87. theme_advanced_resizing : true,
  88. theme_advanced_resize_horizontal : false,
  89. debug : false
  90. });
  91. //-->
  92. </script>';
  93. }
  94. }
  95. }
  96. }
  97. $sEdit .= '<textarea name="'.$sName.'" id="'.$sName.'" rows="20" cols="60" style="width:'.$iW.';height:'.$iH.';" tabindex="1">'.$sContent.'</textarea>';
  98.  
  99. return $sEdit;
  100. } // end function htmlEditor
  101. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 15:18