|
|
كود زر تم الحل للنسخة الثالثة
الأربعاء يونيو 14, 2017 2:32 pm
- الكود:
$(function() {
if (_userdata.page_desktop) return;
window.$fa_solved = {
forums : /1|/,
icon : {
id : 2,
image : 'https://a.top4top.net/p_5002luoc1.png'
},
lang : {
mark : '<i class="fa"></i> إذا تم حل المشكلة اضغط على هذا الزر',
mark_title : 'بنقرك على زر "تم حل المشكل" ستجعل فريق أحلى منتدى يعلم أن مشكلتك أنتهت',
mark_title_mod : 'بنقرك على زر "تم حل المشكل" ستجعل فريق أحلى منتدى يعلم أن مشكلتك أنتهت',
marking : '<i class="fa fa-spin"></i> جاري تغيير حالة الموضوع...',
marked : '<i class="fa"></i> تم حل المشكلة !'
},
post_id : $('.post')[0].id.slice(1),
encode : function(string) {
return encodeURIComponent(escape(string).replace(/%u[A-F0-9]{4}/g, function(match) {
return '' + parseInt(match.substr(2), 16) + ';';
})).replace(/%25/g, '%');
}
};
var main = document.getElementById('main-content'), post = $('.post', main)[0], fid = $('.topic-actions:first .pathname-box a:last', main).attr('href'), author = $('.postprofile dt', post).text(), icon = $('.topic-title img', main), mod = $('.i_icon_ip', post)[0], button = document.createElement('A');
if (icon[0].src != $fa_solved.icon.image && $fa_solved.forums.test(fid)) {
if (!mod && author != _userdata.username) return;
} else return;
button.innerHTML = $fa_solved.lang.mark;
button.title = mod ? $fa_solved.lang.mark_title_mod : $fa_solved.lang.mark_title;
button.className = 'button1 markSolved';
button.href = '#';
button.onclick = function() {
var t = this, icon = $('.topic-title img', document.getElementById('main-content')), solved = document.getElementById('post_icon_9');
t.innerHTML = $fa_solved.lang.marking;
t.removeAttribute('title');
t.onclick = function() { return false };
$.get('/post?p=' + $fa_solved.post_id + '&mode=editpost', function(d) {
var auth = $('input[name="auth[]"]', d);
$.post('/post', 'subject=' + $fa_solved.encode($('input[name="subject"]', d)[0].value) + '&message=' + $fa_solved.encode($('#text_editor_textarea', d)[0].value) + '&p=' + $fa_solved.post_id + '&post_icon=' + $fa_solved.icon.id + '&mode=editpost&auth[]=' + auth[0].value + '&auth[]=' + auth[1].value + '&post=1', function() {
t.innerHTML = $fa_solved.lang.marked;
t.className += ' marked';
icon.attr('src', $fa_solved.icon.image);
if (solved) solved.checked = true;
});
});
return false;
};
main.insertBefore(button, post);
});
رد: كود زر تم الحل للنسخة الثالثة
الأربعاء يونيو 14, 2017 2:55 pm
وهههههههه
شو هاد
هاذا الكود يوضع في لوحة التحكم مو هون
شو هاد
هاذا الكود يوضع في لوحة التحكم مو هون
رد: كود زر تم الحل للنسخة الثالثة
الأربعاء يونيو 14, 2017 2:58 pm
أنا أعرف هذا الكود لإفادةة الأعضاء و الزوار
رد: كود زر تم الحل للنسخة الثالثة
الأربعاء يونيو 14, 2017 3:06 pm
ذلك لأني أعمل بالجهاز اللوي و لا يمكنني لصقه
رد: كود زر تم الحل للنسخة الثالثة
الخميس يونيو 15, 2017 6:20 pm
عشان كدا انا حاولتا انسخو مية مرة وابى يلصق
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى