Hi _ck_!
Any update instructions for the new version 0.0.2? Or do I just have to overwrite everything?
Regards,
Amazone
Hi _ck_!
Any update instructions for the new version 0.0.2? Or do I just have to overwrite everything?
Regards,
Amazone
As with most plugins, you can just replace the plugin file.
Because there is no admin menu, if you changed the default icon set you'll have to edit the plugin file at the top again.
There is no need to upload the graphics again.
Hi,
I wanted to extend the plugin a bit so that if a smilies folder exists in a template folder (root/bb-templates/your-template/images/smilies), it uses the template's smilies else use the default ones (planted in root/bb-images/smilies).
I've got this added:
function bb_check_smilies_folder(smilies) {
if(!is_dir(bb_stylesheet_uri().'/images/smilies')) {
$bb_smilies['icon_set']=bb_get_option('uri').'/bb-images/smilies';
} else {
$bb_smilies['icon_set']=bb_stylesheet_uri().'/images/smilies';
}
}
and changed:
$bb_smilies['icon_path']=rtrim(dirname(__FILE__),' /\\').'/'.$bb_smilies['icon_set'].'/';
$bb_smilies['icon_url']=bb_get_option('uri').trim(str_replace(array(trim(BBPATH,"/\\"),"\\"),array("","/"),dirname(__FILE__)),' /\\').'/'.$bb_smilies['icon_set'].'/';
to this:
$bb_smilies['icon_path']=$bb_smilies['icon_set'].'/';
$bb_smilies['icon_url']=$bb_smilies['icon_set'].'/';
But the plugin wont fire now, due to a fatal error. Kinda stuck here...
It's possible to make your concept work but don't do it that way.
"icon_set" is the formal name for the set, not a path or url
Those two complex strings at the bottom are calculated that way to deal with IIS vs Linux environment.
You should set "icon_set" to "smilies"
Then after the icon_path is calculate, check if it exists.
If it doesn't exist, you can fallback to the current theme folder. That's much harder to calculate due to the change in bbPress 0.9 - I'd have to look at my stylesheet switcher code to find the technique.
Really though, smilies should be independent to the theme. What if you switch themes?
Really though, smilies should be independent to the theme. What if you switch themes?
They are only dependable when you have custom smilies that maches your theme and put them in you template folder. That's why I used bb_stylesheet_uri() I thought it would give me the url to where your current activated template is. Cause when you switch templates, the css changes too. So switching a theme shouldn't be much of a problem then. And if you don't have a smilies folder there, the default should be launched...
This is all theoraticly ofcourse, but should work...
On sec thought, I don't think placing the default icons in my suggested folder root/bb-images is such a good idea since in bbPress 1.0 this folder will be deleted.
So lets keep the default in the plugins folder (Though I think putting the default folder in the plugins directory isn't a good idea either). I also want to suggest to rename default to smilies (seems a more logical name).
Then we only have to add a check to see if there is a smilies folder in the active template and use that one instead. And if not, use the default one. Going to play a bit more to see if I can get this done.
Adding a message when I do not see smiles
sample http://www.kupit-krohe.ru/forum/topic/vse-o-rodah
RSS feed for this topic
You must log in to post.