views:

50

answers:

1

wordpress , plugins : hi , I want to create website by wordpress but I want to make speacial plugins .. and I made it but there are problem .. _

I have a website and I using it with wiki for contries in the world ..

I want from the plugins 'when the visitor open the page for example 'United State' , I want from the plugins to search about all of world in this page like cities ' New York , .... ' and replace it by like for city's page for example = New York ..

I don't know how make it ..

I tried few times but I fail >_< ..

 <?php 
/*
Plugin Name: ReplaceMent

*/
$wiki_contry = array ("Japan"=>"<a href='?japan.php'> Japan <a/>","United State"=>"<a href='?usa.php'> United State <a/>");
function replace($text){
    foreach ($wiki_contry as $ky => $vl){
    $text = str_replace(ِ"$ky","$vl", $text);
    return $text;
    }
}
add_filter('the_content','replace');

?>

other world , I want my site like wikipidia but using wordpress and plugins ^_^..

thank you very much

+3  A: 

I hate to be frank but your English is terrible. I can't clearly understand what you're doing or why you're trying to do it.

Why would you want your site to be like Wikipedia utilizing Wordpress and its plugins when you can just use MediaWiki for free?

esqew
seanny94 , I know my English is terrible but what I can do? this is my ability .. ok .. I do not want to be like my wikipidia exactly .. I just want to make plugins to search in article if there word same another article ; for examle ; I wrote article about: Asia , okey in this article words like ' Japan , Korea , India , Saudi Arabia ' also , there are article about 'Japan , ... etc' , I want from this plugin to like the words to these articles .. I know my langauge very bad .. I wish you understood *_^
AboSami
give the man a break!... instead of focusing on the quality of his English, why not try and help him reword it so that we can understand it. i think he's trying to do a plugin that searches a page content for keywords and transforms those keywords into links.
PatrickS
yeah it is ..thanks Patricks ..
AboSami