Position : Administrator
Concerned browser(s) : Google Chrome
Who the problem concerns : all
Forum link : http://gamemunity.team-talk.net/
i have a button called "Mark solved" how i can do it to make auto solved when pressed like this forum ?
- Code:
$(function() {
var icon_id = 2,
notice_msg = '<img src=http://oi65.tinypic.com/1051e8w.jpg height=20 style=vertical-align:middle> Help organize the forum if your question has been resolved click solved',
button_icon = '<img src=http://oi65.tinypic.com/1051e8w.jpg>',
postbody = $('.postbody')[0],
edit, icon;
if (postbody) {
edit = $(postbody).closest('.post').find('.i_icon_edit')[0];
if (edit) {
$('#page-body').prepend('<div style="background:#000000;border:1px color:#545252;padding:5px;color:#FFFFFF;text-align:center;font-family:Verdana;font-size:11px">' + notice_msg + '</div>');
$('.nav:has(> a[href*="mode=reply"])').append('   <a href="' + edit.parentNode.href + '&solved=true">' + button_icon + '</a>');
}
}
if (location.href.match(/&solved=true/)) {
icon = document.getElementById('post_icon_' + icon_id);
if (icon) {
icon.checked = true;
document.post && document.post.post.click();
}
}
});
Last edited by Luis Ferreira on November 23rd 2015, 3:09 pm; edited 1 time in total