WordPress.org

Ready to get started?Download WordPress

Forums

Problem with Moody plug-in (2 posts)

  1. neonheart
    Member
    Posted 8 years ago #

    I would have posted this on the developer's site, but other people had already posted the same problem and didn't receive a response. I have Moody up and running almost perfectly on my site (neon-heart.org). It looks fine on the index page and I'm happy with that, but if I click on the comments link on a post that has a mood icon, then I find that the mood icon actually shows up twice. I'm guessing it has something to do with the filter in the moody file that is as follows:

    add_filter('the_time', 'moody');

    but I have no idea what to change. Any ideas?

  2. midori
    Member
    Posted 8 years ago #

    I solved that by modifying the plugin itself.

    function dispmoody($afficher = 0, $avant = '', $apres = '', $textemood = 'Mood: ') {
    $mood_icon_dir = $curpath . "/wp-content/plugins/moods/";
    $mood_icon_ext = '.gif';
    $values = get_post_custom_values('mood');
    $mood = $values[0];
    if(!empty($mood)) {
    $prepamood = '  ';
    $prepamood .= $avant.'('.$textemood.': ';
    $prepamood .= '<img src="' . get_settings('siteurl') . $mood_icon_dir . $mood . $mood_icon_ext . '" alt="' . $mood . '" title="' . $mood . '" />)'.$apres;
    }
    if ($afficher == 0) { return $prepamood; } else { echo $prepamood; }
    }
    (to set between <?php and ?> and the plugin header).

    And in your index / single / page / ... add:
    <?php polyglot_other_langs(1, 'before', 'after', 'texte'); ?>
    (first, 1, being for display, if not, 0 for return; mood texte, for example set to 'Mood: ' would be displayed before the icon).

    Midori :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.