Fix Smilies in Phpbb2
(Version 2.0+)AWC doesn't support phpbb2 for several reasons; because of this the smiles do not work on phpbb2 with a default AWC installation.
Here is a plug-in which will fix your smilies if you use phpbb2 so you can have a smlies box like any other forum version.
1. Install this Javascript as a plug-in
- Code:
[panda=js]
function awc_phpbb2_smilies() {
var elem = document.getElementById('achat_smilies');
if(elem.innerHTML.length < 1) {
elem.innerHTML = '<img src="' + avacweb_chat.config.loading_image + '">';
$(elem).load('/post?mode=smilies a', function() {
elem.innerHTML = elem.innerHTML.replace(/href=.javascript:insert_chatboxsmilie/gi, 'onclick="return avacweb_chat.insert_text');
});
}
avacweb_chat.showhide('achat_smilies');
};
avacweb_chat_config.add_event('onload', function () {
var x = document.getElementById('achat_smilies');
if(x) {
$(x.previousSibling).replaceWith('<div class="achat_button" onclick="awc_phpbb2_smilies()">Smileys</div>');
}
});
2. Then add this small bit of CSS to your forum
- Code:
[panda=css]#achat_smilies a.genmed {
display: none;
}
#achat_smilies img {
cursor: pointer;
margin: 4px;
}