public static function addSearches($str)
    {

        ### make google searches ###
        preg_match_all( "/\[google\](.*?)\[\/google\]/s", $str, $matches );
        $match = $matches[0];
        $data = $matches[1];
        $count = count($match);

        for($x=0;$x<$count;$x++){
            $query = str_replace(" ", "+", $data[$x]);
            $query = str_replace('"', "%22", $query);
            $str = str_replace($match[$x], '<a class="blank" href="http://www.google.com/search?hl=en&amp;ie=UTF-8&amp;q='.$query.'" title="click to search google for '.$data[$x].'" >(GOOGLE - '.$data[$x].')</a>', $str);

        }

        ### make wikipedia searches ###
        $str = preg_replace( "~\[wikipedia\](.*?)\[\/wikipedia\]~s", '<a class="blank"  href="http://en.wikipedia.org/wiki/Special:Search?search='.str_replace(" ", "_", "\\1").'&amp;go=Go"  title="click to search wikipedia for \\1" >(WIKIPEDIA - \\1)</a>', $str );

        ### make wiktionary searches ###
        $str = preg_replace( "~\[wiktionary\](.*?)\[\/wiktionary\]~s", '<a class="blank"  href="http://en.wiktionary.org/wiki/Special:Search?search='.str_replace(" ", "_", "\\1").'&amp;go=Go"  title="click to search wiktionary for \\1">(WIKTIONARY - \\1)</a>', $str );

        return $str;
    }