Warning: file_put_contents(sites/nerkn/cache/containers/queryList/select_s_from_pages_where_pageTypeproject1.file.php): failed to open stream: No such file or directory in /home/erkintek/nerkl/inc/classBasic.php on line 247

Warning: file_put_contents(sites/nerkn/cache/containers/queryList/select_s_from_pages_where_pageTypeproject1.file.php): failed to open stream: No such file or directory in /home/erkintek/nerkl/inc/classBasic.php on line 247

Warning: file_put_contents(sites/nerkn/cache/containers/queryList/select_s_from_pages_where_pageTypeknowlagebase1.file.php): failed to open stream: No such file or directory in /home/erkintek/nerkl/inc/classBasic.php on line 247

Warning: Cannot modify header information - headers already sent by (output started at /home/erkintek/nerkl/inc/classBasic.php:247) in /home/erkintek/nerkl/inc/layout.php on line 227
Php keyword replacer

Nerkn

Php developer, drupal, html, css, jquery, ajax, javascript
s:147:"

Php keyword replacer

<code>
function keyword_link_replace($content) {
  $result = db_query("SELECT * FROM {keyword_link} ORDER BY wid ASC");
  while ($keyword = db_fetch_object($result)) {
    $row = array();
    $row[] = $keyword->keyword;
    $link = $keyword->link;
    $keyword->attributes = unserialize($keyword->attributes);
    $cleankeyword = stripslashes($keyword->keyword);
    $url  = "<span class='keyword_link'>";
    $url .= '<a href="'. $link .'"';
    if ($keyword->attributes['nofollow'])
      $url .= ' rel="nofollow"';
    if ($keyword->attributes['newwindow'])
      $url .= ' target="_blank"';
    $url .= ">$cleankeyword</a>";
    $url .= "</span>";
    if ($keyword->attributes['first']) $limit = 1;
    else $limit=-1;
    if ($keyword->attributes['case']) $case = "i";
    else $case="";
    if (strpos( $cleankeyword  , '\'')>0)
      $regex = '\'(?!((<.*?)|(<a.*?)))('.  $cleankeyword . ')(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
    else
      $regex = '\'(?!((<.*?)|(<a.*?)))(\b'. $cleankeyword . '\b)(?!(([^<>]*?)>)|([^>]*?</a>))\'s' . $case;
    $content = preg_replace($regex, $url, $content, $limit);
  }
  return $content;
}
</code>";