|
Выкладываете файлы ? Часто добавляете ссылки вида "Скачать", "Зеркало"... а ещё если есть пароль...
Данный мод представляет собой 3 кнопки на странице addnews.html. <!-- code1 --> <!-- ecode2 --> Автор: Foxa Из-за изменений в файле engine\ajax\bbcodes.js в новых версиях DLE JS придётся вставлять в шаблон addnews.tpl. 1. Итак, открываем templates\ваш_шаблон\addnews.tpl и вставляем в самое начало: <!-- code1 -->
<!--
ecode1
-->
<!--
ecode2
-->
function tag_url_download() { var FoundErrors = ''; var thesel =''; if ( (ua_vers >= 4) && is_ie && is_win) { thesel = document.selection.createRange().text; } else thesel ='Скачать | Download'; if (!thesel) { thesel ='Скачать | Download'; } var enterURL = prompt(text_enter_url, "http://"); var enterTITLE = prompt(text_enter_url_name, thesel); if (!enterURL) { FoundErrors += " " + error_no_url; } if (!enterTITLE) { FoundErrors += " " + error_no_title; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert(""+enterTITLE+"", "", false); } function tag_url_mirror() { var FoundErrors = ''; var thesel =''; if ( (ua_vers >= 4) && is_ie && is_win) { thesel = document.selection.createRange().text; } else thesel ='Зеркало | Mirror'; if (!thesel) { thesel ='Зеркало | Mirror'; } var enterURL = prompt(text_enter_url, "http://"); var enterTITLE = prompt(text_enter_url_name, thesel); if (!enterURL) { FoundErrors += " " + error_no_url; } if (!enterTITLE) { FoundErrors += " " + error_no_title; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert(""+enterTITLE+"", "", false); } function tag_password() { var FoundErrors = ''; var enterURL = prompt(text_enter_url, ""); if (!enterURL) { FoundErrors += " " + error_no_url; } if (FoundErrors) { alert("Error!"+FoundErrors); return; } doInsert("Пароль | Password: "+enterURL+"", "", false); } <!-- code2 --> 2. Открываем файл enginemodulesbbcode.php и после строк: <!-- code1 -->
<!--
ecode1
-->
<!--
ecode2
-->
class="editor_button" onclick="pagelink()"> class="editor_button">
<!--
code2
-->
добавляем новые <!-- code1 -->
<!--
ecode1
-->
<!--
ecode2
-->
class="editor_button" onclick="tag_url_download()"> class="editor_button" onclick="tag_url_mirror()"> class="editor_button" onclick="tag_password()"> class="editor_button">
<!--
code2
-->
3. В папку templatesваш_шаблонbbcodes заливаем 3 картинки 4. Смотрим http://ваш_сайт/addnews.html
|
Партнеры Опрос
Как вам новый дизайн?
|