средство умеренности из списка тем
Участников: 3
Бесплатный форум: форум поддержки :: Взаимопомощь и Поддержка :: Проблемы со скриптами (кодами) :: Архив раздела Проблемы со скриптами
Страница 1 из 1
средство умеренности из списка тем
добрый день,
Этот режиссерский сценарий функционирует хорошо с форумом там utf-8 но мой форум в Windows 1252.
PremiВre должность (изменять название темы) заложи несколько забот на уровне кодирования.
Имел бы вас идея чтобы решить эту проблему?
Этот режиссерский сценарий функционирует хорошо с форумом там utf-8 но мой форум в Windows 1252.
PremiВre должность (изменять название темы) заложи несколько забот на уровне кодирования.
Имел бы вас идея чтобы решить эту проблему?
- Код:
var move_img = "http://i55.servimg.com/u/f55/11/93/85/24/daplac10.gif";
var edit_img = "http://i55.servimg.com/u/f55/11/93/85/24/edit10.gif";
var lock_img = "http://i55.servimg.com/u/f55/11/93/85/24/locked10.gif";
var unlock_img = "http://i55.servimg.com/u/f55/11/93/85/24/delock10.gif";
var trash_img = "http://i55.servimg.com/u/f55/11/93/85/24/corbei10.gif";
var delete_img = "http://i55.servimg.com/u/f55/11/93/85/24/delete10.gif";
var cookie = my_getcookie('fa_' + location.hostname.replace(/\./g, '_') + '_sid');
$(function () {
if ($('#is_allowed:contains("modérer")').length > 0) {
$('.mod_tools').each(function () {
if ($(this).children('img').attr('alt').slice(13, 19) == "verrou") {
$(this).append('<img src="' + edit_img + '" class="mod_edit"><img src="' + move_img + '" class="mod_move"><img src="' + unlock_img + '" class="mod_unlock"/><img src="' + trash_img + '" class="mod_trash"/><img src="' + delete_img + '" class="mod_delete"/>')
} else {
$(this).append('<img src="' + edit_img + '" class="mod_edit"><img src="' + move_img + '" class="mod_move"><img src="' + lock_img + '" class="mod_lock"/><img src="' + trash_img + '" class="mod_trash"/><img src="' + delete_img + '" class="mod_delete"/>')
}
})
}
$('.mod_unlock').click(function () {
if (confirm("Êtes-vous sûr ?")) {
$.get('/modcp.forum?t=' + $(this).closest('tr').find('a.topictitle').attr('href').replace(/^\/t([1-9][0-9]*)[p-].*$/, '$1') + '&mode=unlock&sid=' + cookie);
$(this).addClass('mod_lock').removeClass('mod_unlock');
$(this).attr('src', lock_img)
}
});
$('.mod_lock').click(function () {
if (confirm("Êtes-vous sûr ?")) {
$.get('/modcp.forum?t=' + $(this).closest('tr').find('a.topictitle').attr('href').replace(/^\/t([1-9][0-9]*)[p-].*$/, '$1') + '&mode=lock&sid=' + cookie);
$(this).addClass('mod_unlock').removeClass('mod_lock');
$(this).attr('src', unlock_img)
}
});
$('.mod_move').click(function () {
$(this).closest('tr').find('a.topictitle').after('<input type="submit" class="move_topic"/>');
$(this).closest('tr').find('a.topictitle').after($('select[name="selected_id"]').clone().removeAttr("onchange"))
});
$('.move_topic').live('click', function () {
var tempData = $(this);
$.post("/modcp?tid=" + $("input[name=tid]:first").val(), {
tid: $("input[name=tid]:first").val(),
new_forum: tempData.closest('tr').find('select[name="selected_id"] option:selected').val(),
mode: "move",
t: tempData.closest('tr').find('a.topictitle').attr('href').replace(/^\/t([1-9][0-9]*)[p-].*$/, '$1'),
confirm: "Oui"
},
function (data) {
if (data.indexOf('Le(s) sujet(s) sélectionné(s) a/ont été déplacé(s).') != -1) {
tempData.closest('tr').remove()
} else if (data.indexOf('Votre session a expiré.') != -1) {
alert("Votre session a expiré.")
} else if (data.indexOf('Aucun sujet n\'a été déplacé.') != -1) {
alert("Aucun sujet n'a été déplacé.")
} else if (data.indexOf('Le forum que vous avez sélectionné n\'existe pas.') != -1) {
alert("Le forum que vous avez sélectionné n'existe pas.")
} else {
alert("erreur inconnue")
}
})
});
$('.mod_trash').click(function () {
if (confirm("Êtes-vous sûr ?")) {
$.get('/modcp.forum?t=' + $(this).closest('tr').find('a.topictitle').attr('href').replace(/^\/t([1-9][0-9]*)[p-].*$/, '$1') + '&mode=trash&sid=' + cookie);
$(this).closest('tr').remove()
}
});
$('.mod_delete').click(function () {
if (confirm("Êtes-vous sûr ?")) {
var tid = $("input[name=tid]:first").val() || ($("a[href*='&tid=']:first").attr("href") || "").replace(/^.*&tid=([a-f0-9]*)?.*$/, "$1");
var fid = location.href.replace(/^.*\/f([0-9]+)[p-].*$/, '$1');
var topic_id = $(this).closest('tr').find('a.topictitle').attr('href').replace(/^\/t([1-9][0-9]*)[p-].*$/, '$1');
$.post("/modcp?tid=" + tid, {
f: fid,
t: topic_id,
tid: tid,
mode: "delete",
confirm: "1"
});
$(this).closest('tr').remove()
}
});
$('.mod_edit').click(function () {
$(this).closest('tr').find('a.topictitle').hide().after('<input type="text" style="width: 400px" id="new_title" value="' + $(this).closest('tr').find('a.topictitle').text() + '"/><input type="submit" class="edit_title"/>')
});
$('.edit_title').live('click', function () {
var temp = $(this);
$.get($(this).closest('tr').find('a.topictitle').attr('href'), function (c) {
var first_post_id = $(".post a[name]", c).first().attr("name");
if (!first_post_id) {
return
}
$.get("/post?p=" + first_post_id + "&mode=editpost", function (c) {
$.post("/post", $('form[name="post"]', c).serialize().replace(/(^|&)subject=[^&]+(&|$)/, "$1subject=" + encodeURIComponent($('#new_title').val()) + "$2") + "&post=1", function (c) {
if (c.indexOf('Message enregistré avec succès') != -1) {
temp.closest('tr').find('a.topictitle').show().text($('#new_title').val());
temp.parent().find('#new_title').hide();
temp.parent().find('.edit_title').hide()
}
})
})
})
})
});
$("meta[http-equiv='refresh'][content]:first").each(function () {
window.location.href = $(this).attr("content").replace(/^.*;url=/, "")
});
$(function () {
$('a:contains("Déconnexion")').attr('href', $('a[href^="/login?logout="]').attr('href'))
});
$(function () {
$(function () {
$(".sceditor-button-link-fascroll").parent().remove()
})
});
$(function () {
$(function () {
$.sceditor.command.get('color')._dropDown = function (editor, caller, callback) {
var content = $("<div />"),
cmd = $.sceditor.command.get('color');
if (!cmd._htmlCache) {
var pre = '<strong style="background-color:#',
suf = ';" unselectable="on"><span></span></strong>';
var htmlGen = [pre, 'ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646'.split(',').join(suf + pre), suf].join('');
var htmlList = [pre, 'f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,d8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806'.split(',').join(suf + pre), suf].join('');
var htmlStandard = [pre, 'c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0'.split(',').join(suf + pre), suf].join('');
var htmlGeneralPanel = ['<div class="editor_color_panel" style="z-index:12;" unselectable="on"><div class="color_general" unselectable="on">', htmlGen, '</div><div class="color_list" unselectable="on">', htmlList, '</div><div class="color_standard" unselectable="on">', htmlStandard, '</div></div>'].join('');
cmd._htmlCache = htmlGeneralPanel
}
content.append(cmd._htmlCache).find('strong').click(function (e) {
callback($(this).attr('style').substr(17, 7));
editor.closeDropDown(true);
e.preventDefault()
});
editor.createDropDown(caller, "color-picker", content)
}
})
});
$(function () {
$('img#i_icon_mini_new_message').parent().css('color', '#FF0000').prepend('/!\ ')
});
$(function () {
$('a.mainmenu[href^="/login?logout=1&tid="]').text('Déconnexion')
});
$(function () {
_userdata["activate_toolbar"] = 0
});
$(function () {
$(function () {
$("#text_editor_textarea").length && ($(".sceditor-button-more").parent().remove(), $.sceditor.ShowHideToolbarElements())
})
});
$(function () {
$('img[src="http://illiweb.com/fa/subsilver/folder_new_big.gif"]').closest('tr').addClass('newpost')
});
Последний раз редактировалось: fascicularia (Ср 27 Ноя - 20:19), всего редактировалось 1 раз(а)
Re: средство умеренности из списка тем
Здравствуйте, fascicularia.
К сожалению я не понял что вы имели в виду.
Hello, fascicularia.
Unfortunately I do not understand what you meant.
К сожалению я не понял что вы имели в виду.
Hello, fascicularia.
Unfortunately I do not understand what you meant.
Re: средство умеренности из списка тем
fascicularia, к сожалению, проблему с кодировкой windows-1252 решить нельзя.
Re: средство умеренности из списка тем
Спасибо Dana Domirani, чтобы сделать попытки .
Я буду допускать, что вы пробовали изменять зашифровывание, но неудачно.
Жаль, но код может представлять использование другим
Смех sorry for the translation which must be pathetic (I use Reverso).
Thank you Dana Domirani to have made the tries.
I shall admit you to have tried to change the encoding but unsuccessfully.
It's a pity but the code can be of use to others.
Я буду допускать, что вы пробовали изменять зашифровывание, но неудачно.
Жаль, но код может представлять использование другим
Смех sorry for the translation which must be pathetic (I use Reverso).
Thank you Dana Domirani to have made the tries.
I shall admit you to have tried to change the encoding but unsuccessfully.
It's a pity but the code can be of use to others.
Бесплатный форум: форум поддержки :: Взаимопомощь и Поддержка :: Проблемы со скриптами (кодами) :: Архив раздела Проблемы со скриптами
Страница 1 из 1
Права доступа к этому форуму:
Вы не можете отвечать на сообщения
|
|