Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Gugio klausimai

Parašė Gugiss· 2008 Rugp. 31 19:08:25
#50

Noriu padaryti seo url bet kazkas nezigauna...
Error:
Notice: Use of undefined constant page_title - assumed 'page_title' in /xxx/xxx/xxx/includes/theme_functions_include.php on line 89

Notice: Undefined variable: row in /xxx/xxx/xxx/includes/theme_functions_include.php on line 89

Čia dėl to str_replace... O čia ta xujova vieta:
   $sres = dbquery(
      "SELECT link_window, link_visibility, link_url, link_name FROM ".DB_SITE_LINKS."
      WHERE ".groupaccess('link_visibility')." AND link_position>='2' AND link_url!='---' ORDER BY link_order ASC"
   );
   if(dbrows($sres)) {
      $i = 0;
            $title_start = preg_replace('/[^a-zA-Z0-9 *]/', '', $row[page_title]);
      $title_seo = str_replace(' ', '-', $title_start);

      $res = "<ul>\n";
      while ($sdata = dbarray($sres)) {
         $link_target = $sdata['link_window'] == "1" ? " target='_blank'" : "";
         $li_class = ($i == 0 ? " class='first-link".($class ? " $class" : "")."'" : ($class ? " class='$class'" : ""));
         if (strstr($sdata['link_url'], "http://") || strstr($sdata['link_url'], "https://")) {
            $res .= "<li".$li_class.">".$sep."<a href='".$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
         } else {
            $res .= "<li".$li_class.">".$sep."<a href='".BASEDIR.$sdata['link_url']."'$link_target><span>".$sdata['link_name']."</span></a></li>\n";
         }
         $i++;
      }
      $res .= "</ul>\n";
      return $res;
   }
}



Redagavo Gugiss· 2008 Rugp. 31 19:08:41