سلام.. توسط این هک شما میتونید قسمت انتخاب موضوعات در ارسال مطلب رو الزامی کنید یعنی تا کسی موضوعی رو انتخاب نکنه مطلب منتشر نشه
برای نصب این هک مراحل ذیل رو طی کنید:
1- فایل / modules / addnews.php رو باز کنید و کد زیر را بیابید:
if ($ config [ 'allow_site_wysiwyg'] == "yes") $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit = \" document.getElementById ( 'short_story' ). tinyMCE.get value = ( 'short_story'). getContent (), document.getElementById ( 'full_story'). tinyMCE.get value = ( 'full_story'). getContent (); if (document.entryform.title.value ==''| | document.entryform.short_story.value =='') (alert ( '$ lang [add_err_7]') return false) \ "action = \" \ ">";
else $script .= "<form method=post name=\"entryform\" id=\"entryform\" onsubmit=\" if (document.entryform.title.value == '' || document.entryform.short_story.value == ''){alert(' $lang [add_err_7]'); return false }\" action=\"\">" else $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit =" if (document.entryform.title.value ==''| | document.entryform.short_story. value =='') (alert ( '$ lang [add_err_7]') return false) \ "action = \" \ ">"
else $script .= "<form method=post name=\"entryform\" id=\"entryform\" onsubmit=\" if (document.entryform.title.value == '' || document.entryform.short_story.value == ''){alert(' $lang [add_err_7]'); return false }\" action=\"\">" else $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit =" if (document.entryform.title.value ==''| | document.entryform.short_story. value =='') (alert ( '$ lang [add_err_7]') return false) \ "action = \" \ ">"
و این کد را جایگزین کد بالا کنید:
$ spe_category = "if (document.entryform.category.value =='') (alert ( 'Please select at least one category');) return false;
if ( $config ['allow_site_wysiwyg'] == "yes" ) $script .= "<form method=post name=\"entryform\" id=\"entryform\" onsubmit=\"document.getElementById('short_story').value = tinyMCE.get('short_story').getContent(); document.getElementById('full_story').value = tinyMCE.get('full_story').getContent(); if (document.entryform.title.value == '' || document.entryform.short_story.value == ''){alert(' $lang [add_err_7]'); return false } $spe_category \" action=\"\">"; if ($ config [ 'allow_site_wysiwyg'] == "yes") $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit = \" document.getElementById ( 'short_story' ). tinyMCE.get value = ( 'short_story'). getContent (), document.getElementById ( 'full_story'). tinyMCE.get value = ( 'full_story'). getContent (); if (document.entryform.title.value ==''| | document.entryform.short_story.value =='') (alert ( '$ lang [add_err_7]') return false) $ spe_category \ "action = \" \ ">";
else $script .= "<form method=post name=\"entryform\" id=\"entryform\" onsubmit=\" if (document.entryform.title.value == '' || document.entryform.short_story.value == ''){alert(' $lang [add_err_7]'); return false } $spe_category \" action=\"\">"; else $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit =" if (document.entryform.title.value ==''| | document.entryform.short_story. value =='') (alert ( '$ lang [add_err_7]') return false) $ spe_category \ "action = \" \ ">"
if ( $config ['allow_site_wysiwyg'] == "yes" ) $script .= "<form method=post name=\"entryform\" id=\"entryform\" onsubmit=\"document.getElementById('short_story').value = tinyMCE.get('short_story').getContent(); document.getElementById('full_story').value = tinyMCE.get('full_story').getContent(); if (document.entryform.title.value == '' || document.entryform.short_story.value == ''){alert(' $lang [add_err_7]'); return false } $spe_category \" action=\"\">"; if ($ config [ 'allow_site_wysiwyg'] == "yes") $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit = \" document.getElementById ( 'short_story' ). tinyMCE.get value = ( 'short_story'). getContent (), document.getElementById ( 'full_story'). tinyMCE.get value = ( 'full_story'). getContent (); if (document.entryform.title.value ==''| | document.entryform.short_story.value =='') (alert ( '$ lang [add_err_7]') return false) $ spe_category \ "action = \" \ ">";
else $script .= "<form method=post name=\"entryform\" id=\"entryform\" onsubmit=\" if (document.entryform.title.value == '' || document.entryform.short_story.value == ''){alert(' $lang [add_err_7]'); return false } $spe_category \" action=\"\">"; else $ script .= "<form method = post name = \" entryform \ "id = \" entryform \ "onsubmit =" if (document.entryform.title.value ==''| | document.entryform.short_story. value =='') (alert ( '$ lang [add_err_7]') return false) $ spe_category \ "action = \" \ ">"
و برای نصب این هک در بخش ارسال مطلب از پنل مدیریت مراحل ذیل را طی کنید:
فایل engine / inc / addnews.php را باز کنید و دنبال این کد بگردید:
if ($ config [ 'allow_admin_wysiwyg'] == "yes") echo "<form method = post name = \" addnews \ "id = \" addnews \ "onsubmit = \" document.getElementById ( 'short_story'.) Value tinyMCE.get = ( 'short_story'). getContent (), document.getElementById ( 'full_story'). tinyMCE.get value = ( 'full_story'). getContent (); if (document.addnews.title.value == ' '| | document.addnews.short_story.value =='') (alert (' $ lang [addnews_alert] ') return false) \ "action = \" $ PHP_SELF \ ">";
else echo "<form method=post name=\"addnews\" id=\"addnews\" onsubmit=\" if (document.addnews.title.value == '' || document.addnews.short_story.value == ''){alert(' $lang [addnews_alert]'); return false }\" action=\" $PHP_SELF \">" else echo "<form method = post name = \" addnews \ "id = \" addnews \ "onsubmit =" if (document.addnews.title.value ==''| | == document.addnews.short_story.value '') (alert ( '$ lang [addnews_alert]') return false) \ "action = \" $ PHP_SELF \ ">"
و این کد را جایگزین کد بالا کنید:
$ spe_category = "if (document.addnews.category.value =='') (alert ( 'Please select at least one category');) return false;
if ( $config ['allow_admin_wysiwyg'] == "yes" ) echo "<form method=post name=\"addnews\" id=\"addnews\" onsubmit=\"document.getElementById('short_story').value = tinyMCE.get('short_story').getContent(); document.getElementById('full_story').value = tinyMCE.get('full_story').getContent(); if (document.addnews.title.value == '' || document.addnews.short_story.value == ''){alert(' $lang [addnews_alert]'); return false } $spe_category \" action=\" $PHP_SELF \">"; if ($ config [ 'allow_admin_wysiwyg'] == "yes") echo "<form method = post name = \" addnews \ "id = \" addnews \ "onsubmit = \" document.getElementById ( 'short_story'.) Value tinyMCE.get = ( 'short_story'). getContent (), document.getElementById ( 'full_story'). tinyMCE.get value = ( 'full_story'). getContent (); if (document.addnews.title.value == ' '| | document.addnews.short_story.value =='') (alert (' $ lang [addnews_alert] ') return false) $ spe_category \ "action = \" $ PHP_SELF \ ">";
else echo "<form method=post name=\"addnews\" id=\"addnews\" onsubmit=\" if (document.addnews.title.value == '' || document.addnews.short_story.value == ''){alert(' $lang [addnews_alert]'); return false } $spe_category \" action=\" $PHP_SELF \">"; else echo "<form method = post name = \" addnews \ "id = \" addnews \ "onsubmit =" if (document.addnews.title.value ==''| | == document.addnews.short_story.value '') (alert ( '$ lang [addnews_alert]') return false) $ spe_category \ "action = \" $ PHP_SELF \ ">";
if ( $config ['allow_admin_wysiwyg'] == "yes" ) echo "<form method=post name=\"addnews\" id=\"addnews\" onsubmit=\"document.getElementById('short_story').value = tinyMCE.get('short_story').getContent(); document.getElementById('full_story').value = tinyMCE.get('full_story').getContent(); if (document.addnews.title.value == '' || document.addnews.short_story.value == ''){alert(' $lang [addnews_alert]'); return false } $spe_category \" action=\" $PHP_SELF \">"; if ($ config [ 'allow_admin_wysiwyg'] == "yes") echo "<form method = post name = \" addnews \ "id = \" addnews \ "onsubmit = \" document.getElementById ( 'short_story'.) Value tinyMCE.get = ( 'short_story'). getContent (), document.getElementById ( 'full_story'). tinyMCE.get value = ( 'full_story'). getContent (); if (document.addnews.title.value == ' '| | document.addnews.short_story.value =='') (alert (' $ lang [addnews_alert] ') return false) $ spe_category \ "action = \" $ PHP_SELF \ ">";
else echo "<form method=post name=\"addnews\" id=\"addnews\" onsubmit=\" if (document.addnews.title.value == '' || document.addnews.short_story.value == ''){alert(' $lang [addnews_alert]'); return false } $spe_category \" action=\" $PHP_SELF \">"; else echo "<form method = post name = \" addnews \ "id = \" addnews \ "onsubmit =" if (document.addnews.title.value ==''| | == document.addnews.short_story.value '') (alert ( '$ lang [addnews_alert]') return false) $ spe_category \ "action = \" $ PHP_SELF \ ">";
تشکر و نظر یادتون نره، موفق باشید