вопрос
Здравствуйте. Появилась необходимость вывода новостей пользователя, которые находятся на модерации, по адресу с его новостями.
www.sait.ru/user/ЛОГИН/news/
Каким образом это можно реализовать?
www.sait.ru/user/ЛОГИН/news/
Каким образом это можно реализовать?
сделал такой плагин мне поогло. dle 14.1
<dleplugin>
<name>
отобразить все новости на модерации и опубликованные
</name>
<description/>
<icon/>
<version/>
<dleversion/>
<versioncompare>less</versioncompare>
<upgradeurl/>
<filedelete>0</filedelete>
<needplugin/>
<mnotice>0</mnotice>
<mysqlinstall></mysqlinstall>
<mysqlupgrade></mysqlupgrade>
<mysqlenable></mysqlenable>
<mysqldisable></mysqldisable>
<mysqldelete></mysqldelete>
<phpinstall></phpinstall>
<phpupgrade></phpupgrade>
<phpenable></phpenable>
<phpdisable></phpdisable>
<phpdelete></phpdelete>
<notice></notice>
<file name="engine/engine.php">
<operation action="replace">
<searchcode>
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post {$cat_join_count}WHERE {$stop_list}autor = '$user' AND approve=1" . $where_date;
</searchcode>
<replacecode>
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post {$cat_join_count}WHERE {$stop_list}autor = '$user' " . $where_date;
</replacecode>
</operation>
<operation action="replace">
<searchcode>
$sql_select = "SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM " . PREFIX . "_post p {$cat_join}LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}autor = '$user' AND approve=1" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number'];
</searchcode>
<replacecode>
$sql_select = "SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM " . PREFIX . "_post p {$cat_join}LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}autor = '$user' " . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number'];
</replacecode>
</operation>
</file>
</dleplugin>