Hello,
How can I make a thanks "system" like here in the support forum? Is this possible with phpBB2?
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
$(function () {
var x = $('.post .row2:nth(1)').get();
for (i = 0; i < x.length; i++) {
if (x[i].style.backgroundColor == "rgb(0, 149, 255)") {
x[i].style.backgroundColor = ' ' ;
x[i].parentNode.firstChild.style.backgroundColor = '';
x[i].parentNode.nextSibling.getElementsByTagName('td')[0].style.backgroundColor = '';
x[i].parentNode.nextSibling.getElementsByTagName('td')[1].style.backgroundColor = '';
var stars = document.createElement('div');
stars.setAttribute('style', 'text-align: center;');
stars.innerHTML = '<hr><div style="padding-top:2px;height:32px;line-height:36px;text-shadow:#FFFFFF 1px 1px 8px;font-variant:small-caps;color:#021678;font-size:16px;font-weight:bold;text-align:center"><img style="vertical-align:top" src="http://www.abload.de/img/iconnewi7c33.png"> Der Themenstarter dankt dir! <img style="vertical-align:top" src="http://www.abload.de/img/iconnotew2ei88.png"></div>';
x[i].appendChild(stars);
}
}
});
Mariofan13 wrote:Yes, I know. But the problem is, that the script doesn't work in my forum!
Here is the sript again:
- Code:
$(function () {
var x = $('.post .row2:nth(1)').get();
for (i = 0; i < x.length; i++) {
if (x[i].style.backgroundColor == "rgb(0, 149, 255)") {
x[i].style.backgroundColor = ' ' ;
x[i].parentNode.firstChild.style.backgroundColor = '';
x[i].parentNode.nextSibling.getElementsByTagName('td')[0].style.backgroundColor = '';
x[i].parentNode.nextSibling.getElementsByTagName('td')[1].style.backgroundColor = '';
var stars = document.createElement('div');
stars.setAttribute('style', 'text-align: center;');
stars.innerHTML = '<hr><div style="padding-top:2px;height:32px;line-height:36px;text-shadow:#FFFFFF 1px 1px 8px;font-variant:small-caps;color:#021678;font-size:16px;font-weight:bold;text-align:center"><img style="vertical-align:top" src="http://www.abload.de/img/iconnewi7c33.png"> Der Themenstarter dankt dir! <img style="vertical-align:top" src="http://www.abload.de/img/iconnotew2ei88.png"></div>';
x[i].appendChild(stars);
}
}
});
$(function () {
var x = $('.post .row2:nth(1)').get();
for (i = 0; i < x.length; i++) {
if (x[i].getAttribute('style') == "background-color:#0095ff;") {
x[i].style.backgroundColor = '';
x[i].parentNode.firstChild.style.backgroundColor = '';
x[i].parentNode.nextSibling.getElementsByTagName('td')[0].style.backgroundColor = '';
x[i].parentNode.nextSibling.getElementsByTagName('td')[1].style.backgroundColor = '';
var stars = document.createElement('div');
stars.setAttribute('style', 'text-align: center;');
stars.innerHTML = '<hr><div style="padding-top:2px; height:32px; line-height:36px; color:#740; font-size:16px; font-weight:bold; text-align:center;"><img style="vertical-align:top" src="http://www.abload.de/img/iconnewi7c33.png"> Der Themenstarter dankt dir! <img style="vertical-align:top" src="http://www.abload.de/img/iconnotew2ei88.png"></div>';
x[i].appendChild(stars);
}
}
});