• Lan

    (@lan)


    Is it possible to make it so that a different set of smilies goes with a different theme. So that if i had a blue layout, i could get blue smilies to go with it. but if a visitor wanted to change to a green theme, the smilies i chose for the green theme would work.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Neat idea …
    Smilies are controlled in vars.php though, so the only way I can think you could do that would be to create a different vars.php per theme and upload each as wanted.
    Or maybe a plugin author would know different ?

    I am also looking for a way to change the smilies with each theme… I played with the vars file, but obviously no luck. Here’s what i attempted.

    $wp_smiliesreplace[] = " <img src='" . bloginfo('styleheet_directory') . "/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";

    Anyone find a way to do this or see something that’s wrong with my code?

    I’ve been wondering the same thing. I’ve tried putting a vars.php in to no avail, and I used the bloginfo(‘stylesheet_directory’) include in vars.php and it still didn’t like it. Anyone else got ideas?

    If you can’t find a way to easily do it by editing vars.php, it shouldn’t be hard to throw together a plugin that loads up a different smilies var depending on the theme being used.

    if ($theme == 'foo') $smilies = [...];
    elseif ($theme == 'bar') $smilies = [...];

    I’m willing to do it if no one else wants to. 🙂

    Is there actually a way you can call the name of the current theme that’s in use?
    It would be great if you could, Viper007Bond -grin- I certainly don’t have the knowledge to do something like this.

    Is there actually a way you can call the name of the current theme that’s in use?

    Well, it’s not hard to get what the default theme is. You just use get_option('template') to grab the folder name of the current theme.

    However, if you’re using the theme switcher, it has to be pulled from the user’s cookie as it varies from user to user.

    I’ll get to work on it. 🙂

    Here ‘ya go: http://www.viper007bond.com/wordpress-plugins/smilies-switcher/

    Lemme know if you encounter any problems with it. 🙂

    You are a SAINT.
    It seems to be working fine =D Thank-you! Plus, if you don’t have a smilies.php in your theme folder, it defaults to the ones specified in vars.php! xD
    You will be definately getting a plug next time I blog 😀

    Haha, glad to help. 🙂

    However, your realize your smilies are 404 on your spring kitten theme, right?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Changing smilies with themes.’ is closed to new replies.