Support » Plugin: WP Wiki Tooltip » Wiki unknown term

  • Resolved Sueneé

    (@suenee)


    I use your plugin for my own wiki.suenee.cz on my web http://www.suenee.cz. It is really good idea. I like it.

    I found a small bug:
    ===
    Lorem Ipsum [wiki]unknown wiki term[/wiki] apis samet at dolor…
    ===
    When I publish it, I get wiki link with bubble where I see error message about that the term “unknown wiki term” was not found. It is not user friendly. I made small hard code update of your code:

    
    // class.wp-wiki-tooltip.php :: do_wiki_shortcode
     if ($trans_wiki_data[ 'wiki-url' ] == '')
        {
          $output = $content;
        }
        else
        {
          $output  = '<script>$wwtj( document ).ready( function() { add_wiki_box( ' . $cnt . ', "';
          $output .= $trans_wiki_data[ 'wiki-id' ] . '", "' . $trans_wiki_data[ 'wiki-title' ] . '", "';
          $output .= $trans_wiki_data[ 'wiki-base-url' ] . '", "' . $params[ 'thumbnail' ] . '" ); } );</script>';
          $output .= '<a id="wiki-tooltip-' . $cnt . '" class="wiki-tooltip" href="' . $trans_wiki_data[ 'wiki-url' ] . '" target="' . $this->options[ 'a-target' ] . '">';
          $output .= $content;
          $output .= '</a>';
        }
    

    I added just IF-condition. When WIKI API return empty URL do not do WIKI link in a post. When I add a term to wiki later it will work nicely.

    • This topic was modified 2 years, 6 months ago by Sueneé.
    • This topic was modified 2 years, 6 months ago by Sueneé.
    • This topic was modified 2 years, 6 months ago by Sueneé.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nico Danneberg

    (@nida78)

    Hey Sueneé,

    Thank you very much for your support! Your work brings up the idea to add a new option, so the blog owner can decide what happens in case of an error – showing a message or remove the link. I will publish a new version a.s.a.p 🙂

    Regards
    nida

    You are wellcome. It would be nice and good with the option! I am looking forward for update…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wiki unknown term’ is closed to new replies.