[phpNuke] به دادم برسید کمک

saeedrahmat

New Member
دوستان عزیز میدونم که این موضوع چندین بار توسط چندین کاربر مطرح شده
خواهش می کنم کمکم کنید
دوستان من از نیوک 3.7 استفاده می کنم(ایران نیوک) و به دلیل اینکه ادیتورش کدهای اچ تی ام ال رو پاک می کرد ادیتور fck 2.3.2 رو نصب کردم
و تمام مراحل رو به درستی طی کردم در حال حاظر ادیتور کد ها را پاک نمی کند و حتی وقتی پیغامی به اول سایت می فرستم کد های اچ تی ام ال را
اجر امی کند . ولی وقتی خبری می فرستم اینگونه نیست و در صفحه اول سایت کد های اچ تی ام ال را نشان نمی دهد دلیل چیست ؟
من فایل module/news/admin/index.php جدید را هم قرار داده ام . ولی باز هم مثل گذشته است .
کمک کنید ( بلوک ها هم کد html را نشان نمی دهند)
 

S4DEGH

Well-Known Member
يعني توي خبر پيغام ميفرستي درست نشون ميده و كد html جواب ميده ولي روي مثلا پيغام و .. جواب نميده !؟
خب فايل هاي پيغام جدا از خير هست و در اين مسيره :
admin\modules\messages.php

در اين فايلم بايد تغييرات مربوط به اديتور اصولا اجرا بشه .. :)
 

saeedrahmat

New Member
سلام صادق جان ببخش که همیشه مزاحمتونم
داداش والا من منظورم بر عکس بوده یعنی در پیغامها کد html نشون داده میشه مثلاً میتونم تبلیغ 1000 تومن رو قرار بدم ولی در قسمت خبر ها نشون داده نمیشه
البته اینم بگم در منوی مدیریت وقتی مطلب رو میفرستم نشون میده تایید که میکنم در صفحه اصلی کدهای htm رو نشون نمیده
صادق جان تو رو خدا کمکم کن
اگر برات امکان داره این آی دی رو اد کن [email protected]
یا اینکه در همین تاپیک بهم کمک کن
گرفتارم کرده این ادیتور نیوک
 

webalfa

Member
سلام

100% مشکل از نصب ادیتور هست .

شما فایل های ادیتور FCK رو از چه سایتی گرفتید .

کد:
Open config.php, find and replace the entire $AllowableHTML variable assignment with:
# To completely disable the WYSIWYG editor, set $advanced_editor = 0;
# You may also override the config.php setting by setting $advanced_editor in the module index.php
$advanced_editor = 1;
$AllowableHTML = array(
	'a' => array('href' => 1, 'target' => 1, 'title' => array('minlen' => 4, 'maxlen' => 120)),
	'b' => array(),
	'blockquote' => array(),
	'br' => array(),
	'center' => array(),
	'div' => array('align' => 1),
	'em' => array(),
	'font' => array('face' => 1, 'style' => 1, 'color' => 1, 'size' => array('minval' => 1, 'maxval' => 7)),
	'h1'=>array(),
	'h2'=>array(),
	'h3'=>array(),
	'h4'=>array(),
	'h5'=>array(),
	'h6'=>array(),
	'hr' => array(),
	'i' => array(),
	'img' => array('alt' => 1, 'src' => 1, 'hspace' => 1, 'vspace' => 1, 'width' => 1, 'height' => 1, 'border' => 1, 'align' => 1),
	'li' => array(),
	'ol' => array(),
	'p' => array('align' => 1),
	'pre' => array('align' => 1),
	'span' =>array('class' => 1, 'style' => array('font-family' => 1, 'color' => 1)),
	'strong' => array(),
	'strike'=>array(),
	'sub'=>array(),
	'sup'=>array(),
	'table' => array('align' => 1, 'border' => 1, 'cell' => 1, 'width' => 1, 'cellspacing' => 1, 'cellpadding' => 1),
	'td' => array('align' => 1, 'width' => 1, 'valign' => 1, 'height' => 1, 'rowspan' => 1, 'colspan' => 1 ),
	'tr' => array('align' => 1),
	'tt'=>array(),
	'u' => array(),
	'ul' => array(),
);

کد:
Open mainfile.php, find and replace the entire function check_html with:

function check_html ($string, $allowed_html = "", $allowed_protocols = array('http', 'https', 'ftp', 'news', 'nntp', 'gopher', 'mailto'))
{ 
	$stop = FALSE;
	if(!function_exists(kses_no_null))
	{
		@include_once(INCLUDE_PATH."includes/kses/kses.php");
	}
	if (get_magic_quotes_gpc() == 1 )
	{ 
		$string = stripslashes($string ); 
	} 
	$hotHtml = "nohtml"; 
	$Zstrip = stripos_clone($allowed_html, $hotHtml); 
	if ($Zstrip === false)
	{ 
		global $AllowableHTML;
		$allowed_html = $AllowableHTML; 
	} else { 
		$allowed_html = array('<null>'); 
	}
	$string = kses_no_null($string); 
	$string = kses_js_entities($string); 
	$string = kses_normalize_entities($string); 
	$string = kses_hook($string); 
	$allowed_html_fixed = kses_array_lc($allowed_html);
	return kses_split($string, $allowed_html_fixed, $allowed_protocols); 
} 

function wysiwyg_textarea($name, $value, $config = "NukeUser", $cols = 50, $rows = 10)
{
   global $advanced_editor;
   # Don't waste bandwidth by loading WYSIWYG editor for crawlers
   if ($advanced_editor == 0 or !isset($_COOKIE))
   {
       echo "<textarea name=\"$name\" cols=\"$cols\" rows=\"$rows\">$value</textarea>";
   } else {
	@include_once(INCLUDE_PATH."includes/FCKeditor/fckeditor.php");
	$oFCKeditor = new FCKeditor($name) ;
	$oFCKheight = $rows * 20;
	$oFCKeditor->Height = "$oFCKheight";
	$oFCKeditor->ToolbarSet   = "$config" ;
	$oFCKeditor->InstanceName = "$name" ;
	$oFCKeditor->Value = "$value" ;
	$oFCKeditor->Create() ;   
   }
}

function wysiwyg_textarea_html($name, $value, $config = "NukeUser", $cols = 50, $rows = 10)
{
   global $advanced_editor;
   # Don't waste bandwidth by loading WYSIWYG editor for crawlers
   if ($advanced_editor == 0 or !isset($_COOKIE))
   {
       echo "<textarea name=\"$name\" cols=\"$cols\" rows=\"$rows\">$value</textarea>";
   } else {
	@include_once(INCLUDE_PATH."includes/FCKeditor/fckeditor.php");
	$oFCKeditor = new FCKeditor($name) ;
	$oFCKheight = $rows * 20;
	$oFCKeditor->Height = "$oFCKheight";
	$oFCKeditor->ToolbarSet	= "$config" ;
	$oFCKeditor->InstanceName = "$name" ;
	$oFCKeditor->Value = "$value" ;
	$wysiwygHTML = $oFCKeditor->CreateHtml() ;
	return $wysiwygHTML;
   }
}
 

S4DEGH

Well-Known Member
داداش والا من منظورم بر عکس بوده یعنی در پیغامها کد html نشون داده میشه مثلاً میتونم تبلیغ 1000 تومن رو قرار بدم ولی در قسمت خبر ها نشون داده نمیشه
البته اینم بگم در منوی مدیریت وقتی مطلب رو میفرستم نشون میده تایید که میکنم در صفحه اصلی کدهای htm رو نشون نمیده
پيشنهاد ميكنم كد هايي كه webalfa گذاشتن رو امتحان كنيد ببينيم چه ميشود :)
 

saeedrahmat

New Member
webalfa عزیز
کد هایی که لطف کردید دادید رو جایگزین کد های فعلی نمودم
هیچ تفاوتی احساس نمی کنم
وقتی مثلاً یک خبر به همراه iframe ارسال می کنم کد ها پاک نمی شوند و ادیتور کدها را می پذیرد ولی در صفحه اصلی چیزی نمایش نمی یابد
بلوک های سایت هم همین وضعیت را دارند.
فقط پیغام درست کار می کند و می توانم مثلا ً iframe را در آن مشاهده نمایم اگر موافق باشید user va pass براتون درست کنم
تا ملاحظه نمایید
 

saeedrahmat

New Member
با سلام یک پست در سایت می دهم تا ببینید.
در قسمت پیغامها کد html را قبول کرده ولی خبر ...
 

جدیدترین ارسال ها

بالا