Plugin Directory

Changeset 186846


Ignore:
Timestamp:
12/24/2009 12:37:17 PM (16 years ago)
Author:
conis
Message:
 
Location:
wp-markkeyword
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-markkeyword/tags/0.6/index.php

    r185566 r186846  
    44Plugin URI: http://conis.cn/1365/
    55Description: This plugin can high light keyword after someone searchecd it, which supports the search engines like google, baidu, ask,  yahoo&bing.wp-markKeyword可以高亮显示来自搜索引擎的关键字,支持多个搜索引擎,更多请访问我的博客
    6 Version: 0.5
     6Version: 0.6
    77Author: Conis
    88Author URI: http://conis.cn/
     
    1010
    1111$mmkKeyword;
     12$mmkIsShowMsg;
    1213
    1314function momoMarkKeywordMsg()
     
    2122            $mmkMsg = $mmkMsg.'<a href="'.get_bloginfo('url').'/?s='.$item.'">'.$item.'</a>&nbsp;';
    2223        }
    23         $mmkMsg = '<div class="wmkFrame">Your keyword is:&nbsp;<span class="wmkHighLight">'.$mmkMsg.'</span>';
    24         $mmkMsg = $mmkMsg . '<span class="wmkPowerBy"><a href="http://conis.cn/?s=wp_markkeyword" target="_blank">wp_markKeyword</a>, Power by: <a href ="http://conis.cn" target="_blank">conis.cn</a></span></div>';
    25         echo $mmkMsg;
     24        $mmkMsg = '<fieldset class="wmkFrame" id="wmkFrame">Your keyword is:&nbsp;<span class="wmkHighLight">'.$mmkMsg.'</span>';
     25        $mmkMsg = $mmkMsg . '<span class="wmkPowerBy">Power by: <a href ="http://conis.cn" target="_blank">conis.cn</a></span></fieldset>';
     26        return $mmkMsg;
    2627    }   
     28    return '';
    2729}
    2830
     
    3032{       
    3133    global $mmkKeyword;
     34    global $mmkIsShowMsg;
     35    if($mmkIsShowMsg) return $content;
    3236    if(isset($mmkKeyword))
    3337    {
     
    3842        }
    3943    }
    40     return $content;
     44    $mmkIsShowMsg = true;
     45    return momoMarkKeywordMsg().$content;
    4146}
    4247
     
    6772    .wmkFrame
    6873    {
    69         margin: 0px;
     74        margin: 5px 0px 5px 0px;
    7075        background-color:#FCF4D3;
    7176        padding: 5px 0px 5px 0px;
    72         border-bottom: 1px solid #CCC;
    73         position: absolute;
    74         top: 0px;
    75         left: 0px;
    76         width: 100%;
    77         text-indent: 10px;
    78         filter:alpha(opacity=50);
    79         opacity:0.5;   
     77        border: 1px solid #CCC;
     78        text-indent: 10px; 
    8079        text-align: left;
     80        -moz-border-radius: 6px;
    8181    }
    8282    .wmkPowerBy
     
    8686        color: #000;
    8787        font-size: 11px;
     88        margin-right: 5px;
    8889    }
    8990    .wmkPowerBy a
     
    9798function mmkInit()
    9899{
    99     echo is_single();
    100100    global $mmkKeyword;
    101101    $mmkReferer = $_SERVER['HTTP_REFERER'];         //get referfer url
     
    105105        $mmkReferer = $url;
    106106    }
     107
    107108    if(!isset($mmkReferer)) return;
    108109    if(strpos($mmkReferer, 'baidu.com') != false)
     
    110111        $mmkReferer = urldecode($mmkReferer);
    111112        $mmkReferer = iconv('gb2312', 'utf-8', $mmkReferer);
    112         if(preg_match("/(word|wd)=(.+)&/im", $mmkReferer, $arr))
     113        if(preg_match("/(word|wd)=(.+)&*/im", $mmkReferer, $arr))
    113114       {
    114115            $mmkKeyword = $arr[2];
     
    117118    else
    118119    {
    119         //$mmkReferer = iconv('gb2312', 'utf-8', $mmkReferer);
    120120        $mmkReferer = urldecode($mmkReferer);
    121121        if(preg_match("/[&\?]([qps]|query)=(.+?)&/im", $mmkReferer, $arr))
     
    125125        if(!isset($mmkKeyword))
    126126       {
    127            //echo $mmkReferer;
    128127           if(preg_match("/[&\?]([qps]|query)=(.+)/im", $mmkReferer, $arr))
    129128           {
     
    140139    add_filter('the_content', 'momoMarkKeyword', 0);
    141140    add_filter('the_excerpt', 'momoMarkKeywordExcerpt', 0);
    142     add_filter('wp_footer', 'momoMarkKeywordMsg', 0);
    143141}
    144142?>
  • wp-markkeyword/tags/0.6/readme.txt

    r185566 r186846  
    3030
    3131== Screenshots ==
    32 <img src="/tags/screenshot-1.JPG" />
    33 1. search
    34 2. the highlight words are from the link of the search engine
    35 3. high light keyword in the site
     32empty
    3633
    3734== Changelog ==
     
    4037basic version
    4138= 0.6 =
    42 repair a fwe bugs.
    43 basic version
     39empty
    4440== Upgrade Notice ==
    4541
  • wp-markkeyword/trunk/index.php

    r185657 r186846  
    1010
    1111$mmkKeyword;
     12$mmkIsShowMsg;
    1213
    1314function momoMarkKeywordMsg()
     
    2122            $mmkMsg = $mmkMsg.'<a href="'.get_bloginfo('url').'/?s='.$item.'">'.$item.'</a>&nbsp;';
    2223        }
    23         $mmkMsg = '<div class="wmkFrame">Your keyword is:&nbsp;<span class="wmkHighLight">'.$mmkMsg.'</span>';
    24         $mmkMsg = $mmkMsg . '<span class="wmkPowerBy"><a href="http://conis.cn/?s=wp_markkeyword" target="_blank">wp_markKeyword</a>, Power by: <a href ="http://conis.cn" target="_blank">conis.cn</a></span></div>';
    25         echo $mmkMsg;
     24        $mmkMsg = '<fieldset class="wmkFrame" id="wmkFrame">Your keyword is:&nbsp;<span class="wmkHighLight">'.$mmkMsg.'</span>';
     25        $mmkMsg = $mmkMsg . '<span class="wmkPowerBy">Power by: <a href ="http://conis.cn" target="_blank">conis.cn</a></span></fieldset>';
     26        return $mmkMsg;
    2627    }   
     28    return '';
    2729}
    2830
     
    3032{       
    3133    global $mmkKeyword;
     34    global $mmkIsShowMsg;
     35    if($mmkIsShowMsg) return $content;
    3236    if(isset($mmkKeyword))
    3337    {
     
    3842        }
    3943    }
    40     return $content;
     44    $mmkIsShowMsg = true;
     45    return momoMarkKeywordMsg().$content;
    4146}
    4247
     
    6772    .wmkFrame
    6873    {
    69         margin: 0px;
     74        margin: 5px 0px 5px 0px;
    7075        background-color:#FCF4D3;
    7176        padding: 5px 0px 5px 0px;
    72         border-bottom: 1px solid #CCC;
    73         position: absolute;
    74         top: 0px;
    75         left: 0px;
    76         width: 100%;
    77         text-indent: 10px;
    78         filter:alpha(opacity=50);
    79         opacity:0.5;   
     77        border: 1px solid #CCC;
     78        text-indent: 10px; 
    8079        text-align: left;
     80        -moz-border-radius: 6px;
    8181    }
    8282    .wmkPowerBy
     
    8686        color: #000;
    8787        font-size: 11px;
     88        margin-right: 5px;
    8889    }
    8990    .wmkPowerBy a
     
    9798function mmkInit()
    9899{
    99     echo is_single();
    100100    global $mmkKeyword;
    101101    $mmkReferer = $_SERVER['HTTP_REFERER'];         //get referfer url
     
    105105        $mmkReferer = $url;
    106106    }
     107
    107108    if(!isset($mmkReferer)) return;
    108109    if(strpos($mmkReferer, 'baidu.com') != false)
     
    110111        $mmkReferer = urldecode($mmkReferer);
    111112        $mmkReferer = iconv('gb2312', 'utf-8', $mmkReferer);
    112         if(preg_match("/(word|wd)=(.+)&/im", $mmkReferer, $arr))
     113        if(preg_match("/(word|wd)=(.+)&*/im", $mmkReferer, $arr))
    113114       {
    114115            $mmkKeyword = $arr[2];
     
    117118    else
    118119    {
    119         //$mmkReferer = iconv('gb2312', 'utf-8', $mmkReferer);
    120120        $mmkReferer = urldecode($mmkReferer);
    121121        if(preg_match("/[&\?]([qps]|query)=(.+?)&/im", $mmkReferer, $arr))
     
    125125        if(!isset($mmkKeyword))
    126126       {
    127            //echo $mmkReferer;
    128127           if(preg_match("/[&\?]([qps]|query)=(.+)/im", $mmkReferer, $arr))
    129128           {
     
    140139    add_filter('the_content', 'momoMarkKeyword', 0);
    141140    add_filter('the_excerpt', 'momoMarkKeywordExcerpt', 0);
    142     add_filter('wp_footer', 'momoMarkKeywordMsg', 0);
    143141}
    144142?>
  • wp-markkeyword/trunk/readme.txt

    r185657 r186846  
    44Tags: high light, search engine, keyword, seo, keyword
    55Requires at least: 2.0.2
    6 Tested up to: 0.6
     6Tested up to: 2.6
    77Stable tag: trunk
    88
     
    3030
    3131== Screenshots ==
    32 <img src="/tags/screenshot-1.JPG" />
    33 1. search
    34 2. the highlight words are from the link of the search engine
    35 3. high light keyword in the site
     32empty
    3633
    3734== Changelog ==
     
    4037basic version
    4138= 0.6 =
    42 repair a fwe bugs.
    43 basic version
     39empty
    4440== Upgrade Notice ==
    4541
Note: See TracChangeset for help on using the changeset viewer.