Search

bbPress Showcase » plugin Plugins by _ck_

Update instructions for bb-Smilies 0.0.2?

RSS

  1. Amazone
    Amazone

    member
    Joined: Aug '08
    Posts: 11

    offline

    Hi _ck_!
    Any update instructions for the new version 0.0.2? Or do I just have to overwrite everything?

    Regards,
    Amazone

    Posted 3 months ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    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.

    This is a demo of the bbPress Signatures plugin!
    If you use my plugins, please considering donating to help continue their development.
    Posted 3 months ago #
  3. Amazone
    Amazone

    member
    Joined: Aug '08
    Posts: 11

    offline

    Thx 4 ur fast reply! I will update now.
    Nice day!

    Regards,
    Amazone

    Posted 3 months ago #
  4. Null
    Null

    member
    Joined: May '08
    Posts: 10

    offline

    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...

    Posted 3 months ago #
  5. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 330

    online

    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?

    Posted 3 months ago #
  6. Null
    Null

    member
    Joined: May '08
    Posts: 10

    offline

    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...

    Posted 3 months ago #
  7. Null
    Null

    member
    Joined: May '08
    Posts: 10

    offline

    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.

    Posted 3 months ago #
  8. densa
    User has not uploaded an avatar

    new member
    Joined: Aug '08
    Posts: 4

    offline

    Adding a message when I do not see smiles

    sample http://www.kupit-krohe.ru/forum/topic/vse-o-rodah

    Posted 3 months ago #

RSS feed for this topic

Post a reply to “Update instructions for bb-Smilies 0.0.2?”

You must log in to post.

keep _ck_ coding >> donate $1 <<     Theme Switcher:
16 users online from  US  TH  IN  CN in the past 30 minutes. 10 bots 5 guests 1 members: _ck_
200 views today 2798 yesterday 3411 ever. Most at once 18 today 24 yesterday 18 ever. Visited today: _ck_
724 posts in 106 topics over 19 months by 146 of 676 members. Latest: nicoosuna, Wish, insightdesigns