Add the button solved message header
2 posters
Page 1 of 1
Add the button solved message header
Hi to you all,
I greet in passing Ange Tuteur .
sorry for my English, I'm French and I wanted to know if we could put this script found on the forum for Portuguese version Punbb end Phpbb3 in order to have "Solved" button at the message header, and when clicking it get alone resolved.
I wish I had this script for phpbb2 Version please.
http://ajuda.forumeiros.com/t74425-tutorial-adicionar-botao-resolvido-phpbb3-e-punbb
Thank you in advance
a++
I greet in passing Ange Tuteur .
sorry for my English, I'm French and I wanted to know if we could put this script found on the forum for Portuguese version Punbb end Phpbb3 in order to have "Solved" button at the message header, and when clicking it get alone resolved.
I wish I had this script for phpbb2 Version please.
http://ajuda.forumeiros.com/t74425-tutorial-adicionar-botao-resolvido-phpbb3-e-punbb
- Code:
jQuery(document).ready(function(){if(jQuery('.post:eq(0) .i_icon_edit').length){jQuery('#main-content h1.page-title:eq(0)').before('<div style="background:#2C5787;border:1px solid green;padding:5px;color:#C8E2B7;text-align:center;font-family:Verdana;font-size:11px"><img src=http://i.imgur.com/EFz6C.gif height=48 style=vertical-align:middle> Help organize the forum if your question has been resolved click solved</div>')}});
jQuery(document).ready(function(){var r='.post:eq(0) .i_icon_edit';if(jQuery(r).length){jQuery('.buttons').append('   <a href="'+jQuery(r).parent().attr('href')+'&solved=true"><img src=http://i.imgur.com/h6ZWU.png></a>')};if(location.href.match(/&solved=true/)){jQuery('form[name="post"]').append('<input type=hidden name=post_icon value=2>');p=document.getElementById('post_icon_2');if(p){p.checked=true};jQuery('.submit-buttons input[name="post"]').click()}});
Thank you in advance
a++
Last edited by Milouze14 on September 10th 2015, 8:13 pm; edited 1 time in total
Re: Add the button solved message header
Hi @Milouze14,
Good to see you.
I updated the script to work with phpbb2, and so it's easier to edit. Here you are :
Placement : In all the pages
Here are the three fields you can edit :
icon_id : This should be the id of your solved icon. You can see the id via the DOM inspector :
post_icon_2 ^^
notice_msg : The message displayed at the top of the page
button_icon : The solved button. You can use the html <img> tag to make it an image. I just put text because the original image was broken.
If you need to edit anything else, it can be found below the start up variables where it's more technical.
See you
Good to see you.
I updated the script to work with phpbb2, and so it's easier to edit. Here you are :
Placement : In all the pages
- Code:
$(function() {
var icon_id = 2,
notice_msg = '<img src=http://i.imgur.com/EFz6C.gif height=48 style=vertical-align:middle> Help organize the forum if your question has been resolved click solved',
button_icon = 'Mark Solved',
postbody = $('.postbody')[0],
edit, icon;
if (postbody) {
edit = $(postbody).closest('.post').find('.i_icon_edit')[0];
if (edit) {
$('#page-body').prepend('<div style="background:#2C5787;border:1px solid green;padding:5px;color:#C8E2B7;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();
}
}
});
Here are the three fields you can edit :
icon_id : This should be the id of your solved icon. You can see the id via the DOM inspector :
post_icon_2 ^^
notice_msg : The message displayed at the top of the page
button_icon : The solved button. You can use the html <img> tag to make it an image. I just put text because the original image was broken.
If you need to edit anything else, it can be found below the start up variables where it's more technical.
See you
Last edited by Ange Tuteur on September 10th 2015, 8:32 pm; edited 1 time in total
Re: Add the button solved message header
Hi Ange Tuteur ,
I wonder how to tell you this too easy to find, a huge thank you my friend.
Good night.
a++
I wonder how to tell you this too easy to find, a huge thank you my friend.
Good night.
a++
Re: Add the button solved message header
Oups,
I'm sorry but Ange Tuteur I do not see the background and the image Ange Tuteur
a++
Edict, you had to testify here
I'm sorry but Ange Tuteur I do not see the background and the image Ange Tuteur
a++
Edict, you had to testify here
- Code:
$('#content-container')
- Code:
$('#page-body')
Re: Add the button solved message header
Oh yes, I forgot page-body is better to use on phpbb2. Thanks, and you're welcome. ^^
Topic archived
Have a good day.
Topic archived
Have a good day.
Similar topics
» Do not show me button Display button [solved] the topics.
» Help Removing Author and MESsage in Header
» Message/New Message Button Change
» homepage in my forum's header (solved)
» [Solved]Header Text change
» Help Removing Author and MESsage in Header
» Message/New Message Button Change
» homepage in my forum's header (solved)
» [Solved]Header Text change
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum