Хак Новая ссылка на профиль user/name -> @name
Плагин для DLE, который меняет по всему сайту ссылку на профиль и новости юзера с user/name -> @name
Установить плагин
Для .htaccess найти
RewriteRule ^user/([^/]*)/rss.xml$ index.php?mod=rss&subaction=allnews&user=$1 [L]
RewriteRule ^user/([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 [L]
RewriteRule ^user/([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 [L]
RewriteRule ^user/([^/]*)/news(/?)+$ index.php?subaction=allnews&user=$1 [L]
RewriteRule ^user/([^/]*)/news/page/([0-9]+)(/?)+$ index.php?subaction=allnews&user=$1&cstart=$2 [L]
RewriteRule ^user/([^/]*)/news/rss.xml(/?)+$ index.php?mod=rss&subaction=allnews&user=$1 [L]
заменить на
RewriteRule ^@([^/]*)/rss.xml$ index.php?mod=rss&subaction=allnews&user=$1 [L]
RewriteRule ^@([^/]*)(/?)+$ index.php?subaction=userinfo&user=$1 [L]
RewriteRule ^@([^/]*)/page/([0-9]+)(/?)+$ index.php?subaction=userinfo&user=$1&cstart=$2 [L]
RewriteRule ^@([^/]*)/news(/?)+$ index.php?subaction=allnews&user=$1 [L]
RewriteRule ^@([^/]*)/news/page/([0-9]+)(/?)+$ index.php?subaction=allnews&user=$1&cstart=$2 [L]
RewriteRule ^@([^/]*)/news/rss.xml(/?)+$ index.php?mod=rss&subaction=allnews&user=$1 [L]
Для nginx:
Найти:
rewrite ^/user/([^/]*)/rss.xml$ /engine/rss.php?subaction=allnews&user=$1 last;
rewrite ^/user/([^/]*)(/?)+$ /index.php?subaction=userinfo&user=$1 last;
rewrite ^/user/([^/]*)/page/([0-9]+)(/?)+$ /index.php?subaction=userinfo&user=$1&cstart=$2 last;
rewrite ^/user/([^/]*)/news(/?)+$ /index.php?subaction=allnews&user=$1 last;
rewrite ^/user/([^/]*)/news/page/([0-9]+)(/?)+$ /index.php?subaction=allnews&user=$1&cstart=$2 last;
rewrite ^/user/([^/]*)/news/rss.xml(/?)+$ /engine/rss.php?subaction=allnews&user=$1 last;
Заменить на:
rewrite ^/@([^/]*)/rss.xml$ /engine/rss.php?subaction=allnews&user=$1 last;
rewrite ^/@([^/]*)(/?)+$ /index.php?subaction=userinfo&user=$1 last;
rewrite ^/@([^/]*)/page/([0-9]+)(/?)+$ /index.php?subaction=userinfo&user=$1&cstart=$2 last;
rewrite ^/@([^/]*)/news(/?)+$ /index.php?subaction=allnews&user=$1 last;
rewrite ^/@([^/]*)/news/page/([0-9]+)(/?)+$ /index.php?subaction=allnews&user=$1&cstart=$2 last;
rewrite ^/@([^/]*)/news/rss.xml(/?)+$ /engine/rss.php?subaction=allnews&user=$1 last;
Для DLE ниже 14 плагин может писать о найдены ошибках. Не обращаем внимания, с обновление движка ошибка уйдет.
Автор: dj-avtosh
Версия DLE: 13 - 14.1
Контакты: telegram: @blob42
user-custom-link-v0011_xml.zip
[901 b] (cкачиваний: 201)