Support » Fixing WordPress » how to get wiki-summary based on tags?

  • I am trying WP_Wikibox Plugin but doesn’t like to have another idea. Is it possible to add code in single.php to get a summary – let’s say 250 words – automatically based on the post’s tags? It should display “boxes” between every box should be a br-tag or p-tag. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • This is the code – i guess – that need the plugin WP-Wikibox to get summary from wikipedia.

    How to change it to my needs?
    -Only get 100, 200 or 250 words of the article.
    -get tags from my post, get wiki articles’ summary
    -do linebreak (br or p) and then add the next summary from a tag if there’s one.
    -should be displayed in boxes.

    Any ideas?

    $query = $_SERVER['QUERY_STRING'];
    $search = $_GET['search'];
    <h1><?php if (isset($search)) echo $search; ?></h1>
    function callback( $puffer ) { 
    $puffer = substr( $puffer, strpos( $puffer, '<!-- start content -->' ) );
    $puffer = substr( $puffer, 0, strpos( $puffer, '<div class="printfooter">' ) );
    $puffer = str_replace( "/w/index.php", "/wikipedia/wikistatic.php", $puffer );
    $puffer = str_replace( "/wiki/", "/wikipedia/wikistatic.php?title=Spezial:Search&search=", $puffer );
    $puffer = '<style>.editsection {display:none;}</style>'.$puffer;
    return $puffer;
    if(eregi("Spezial:Search",$query) or eregi("Spezial%3aSearch",$query) or eregi("Special:Search",$query)) {
    $search = str_replace( " ", "+", $search );
    include ''.$query;
    print( '<small><p>
    Text und Bilder dieses Beitrags stammen aus dem Artikel
    <a href="'.$begriff.'" title="'.$begriff.'" target="_blank">'.$search.'</a>
    der freien Enzyklop&auml;die <a href="" title="" target="_blank">Wikipedia</a>
    und stehen unter der <a href="" target="_blank">GNU Free Documentation License</a>.
    Die Liste der Autoren ist in der Wikipedia unter
    <a href="'.$search.'&action=history" target="_blank" title="'.$search.'&action=history">dieser Seite</a> verf&uuml;gbar, der Original-Artikel l&auml;sst sich
    <a href="'.$search.'&action=edit" target="_blank" title="hier'.$search.'&action=edit">hier</a>

    This is code I found. Now I’d like to know how to modify it to get the results I want. Summary of 100-150 words, based on tags – all of this automatically.

    Any ideas?

    Is it possible to get tags one after another and process one after another with file() to readout the article(s) like get 100-150 words from, etc.
    and display it one after another




Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to get wiki-summary based on tags?’ is closed to new replies.