• DONATE to NULLED!
    Форуму и его команде можно помочь, мотивировать модераторов разделов.
    Помогите модератору этого раздела killoff лично.

Модуль Abort 1.0

Статус
В этой теме нельзя размещать новые ответы.

bobur.exe

Создатель
Регистрация
3 Май 2009
Сообщения
16
Реакции
9
1) Версии дле 6.х-8.х
2) Как нулл так и лицензия
3)Модуль Abort 1.0 позволяет вводить причину отклонения от публикации той или иной новости.
1245343588_news2.png
Что реализовано?
-можно ввести причину отклонения новости, после чего новость будет удалена,а автору будет отправлено сообщение на emal о том,что новость не прошла модерацию с указаной причиной
-отправка выше приведеного письма на email

Что будет реализовано в следущей версии?
-отклонения сразу нескольких новостей(к сожелению в этой версии не реализовано)
-возможность выбора отправки в пм или на email
-удобная возможность правки текста сообщения в админке

Установка:
Открыть engine/inc/editnews.php.Найти:

<option value="mass_delete">{$lang['edit_seldel']}</option>

Ниже добавить:

<option value="abort">Отклонить</option>



Открыть massactions.php.Найти:


if( ! defined( 'DATALIFEENGINE' ) ) {
die( "Hacking attempt!" );
}

Ниже добавить:

require_once ENGINE_DIR . '/data/config.php';




Найти:



/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Подтвреждение удаления
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
if( $action == "mass_delete" ) {

echoheader( "options", $lang['mass_head'] );

echo <<<HTML
<form action="{$PHP_SELF}" method="post">
<div style="padding-top:5px;padding-bottom:2px;">
<table width="100%">
<tr>
<td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
<td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
<td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
</tr>
<tr>
<td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
<td style="padding:5px;" bgcolor="#FFFFFF">
<table width="100%">
<tr>
<td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['mass_head']}</div></td>
</tr>
</table>
<div class="unterline"></div>
<table width="100%">
<tr>
<td style="padding:2px;" height="100" align="center">{$lang['mass_confirm']}
HTML;

echo "(<b>" . count( $selected_news ) . "</b>) $lang[mass_confirm_1]<br><br>
<input class=bbcodes type=submit value=\" $lang[mass_yes] \"> &nbsp; <input type=button class=bbcodes value=\" $lang[mass_no] \" onclick=\"javascript:document.location='$PHP_SELF?mod=editnews&action=list'\">
<input type=hidden name=action value=\"do_mass_delete\">
<input type=hidden name=user_hash value=\"{$dle_login_hash}\">
<input type=hidden name=mod value=\"massactions\">";
foreach ( $selected_news as $newsid ) {
$newsid = intval($newsid);
echo "<input type=hidden name=selected_news[] value=\"$newsid\">\n";
}

echo <<<HTML
</tr>
</table>
</td>
<td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
</tr>
<tr>
<td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
<td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
<td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
</tr>
</table>
</div></form>
HTML;

echofooter();
exit();

}

НИЖЕ добавить:


if( $action == "abort" ) {

echoheader( "options","Введите причину" );

$count = count( $selected_news );

echo <<<HTML
<form action="{$PHP_SELF}" method="post">
<div style="padding-top:5px;padding-bottom:2px;">
<table width="100%">
<tr>
<td width="4"><img src="engine/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
<td background="engine/skins/images/tl_oo.gif"><img src="engine/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
<td width="6"><img src="engine/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
</tr>
<tr>
<td background="engine/skins/images/tl_lb.gif"><img src="engine/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
<td style="padding:5px;" bgcolor="#FFFFFF">
<table width="100%">
<tr>
<td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$lang['catalog_url']}</div></td>
</tr>
</table>
<div class="unterline"></div>
<table width="100%">
<tr>
<td style="padding:2px;" height="100" align="center">Причина: <input type="text" name="reabort" size="15" class="edit" >
HTML;

foreach ( $selected_news as $newsid ) {
$newsid = intval($newsid);
echo "<input type=hidden name=selected_news[] value=\"$newsid\">";
}

echo <<<HTML
<input type=hidden name=user_hash value="{$dle_login_hash}"><input type="hidden" name="action" value="okabort"><input type="hidden" name="mod" value="massactions">&nbsp;<input type="submit" value="{$lang['b_start']}" class="edit"></td>
</tr>
</table>
</td>
<td background="engine/skins/images/tl_rb.gif"><img src="engine/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
</tr>
<tr>
<td><img src="engine/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
<td background="engine/skins/images/tl_ub.gif"><img src="engine/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
<td><img src="engine/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
</tr>
</table>
</div></form>
HTML;

echofooter();
exit();
}
if( $action == "okabort" ) {
$deleted_articles = 0;

foreach ( $selected_news as $id ) {
$id = intval( $id );
$row = $db->super_query( "SELECT * FROM " . PREFIX . "_post where id = '$id'" );
$reazon = strip_tags( $db->safesql( $_POST['reabort'] ) );
$user = $row['autor'];
if( $config['allow_alt_url'] == "yes" ) {

if( $row['flag'] and $config['seo_type'] ) {

if( $row['category'] and $config['seo_type'] == 2 ) {

$full_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";

} else {

$full_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";

}

} else {

$full_link = $config['http_home_url'] . date( 'Y/m/d/', $row['date'] ) . $row['alt_name'] . ".html";
}

} else {

$full_link = $config['http_home_url'] . "index.php?newsid=" . $row['id'];

}
$row2 = $db->super_query( "SELECT user_id,email FROM " . PREFIX . "_users where name = '$user'" );
$user_id = $row2['user_id'];
$title = $row['title'];
$link = "<a href=\"" . $full_link . "\">" . stripslashes( $title ) . "</a>";
$from = $member_id['name'];
$subject = "Ваша новость была отклонена";
$text = "Доброго времени суток $user .<br />Ваша новость $link отклонена от публикации.Причина: $reazon <br />";
$row3 = $db->query( "DELETE FROM " . PREFIX . "_post Where id='{$id}'" );
$email = $row2['email'];
include_once ( ENGINE_DIR . ('/classes/mail.class.php' ));
$mail = new dle_mail($config);
$mail -> send ( $email , $subject , $text);
}
echo "<meta http-equiv=\"Refresh\"content=\"0;url=".$PHP_SELF."?mod=editnews&action=list\">";
}
 
Возможна ли отправка в только в пм в этой версии (может маленький хак), для локального портала имейл неактуален, и выбор соответсвенно тоже, поэтому может что то в этой версии изменить ? Или же примерно сообщите, когда планируется следующая версия (месяц, два)? Автор, как я понимаю, вы?
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху