WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
<link rel="prev(or next)" href="?p=n">
<?php // this line is only for color reasons, don't copy this// adds <link rel="prev|next" href="?p=nn"> at the end of the <head>// only if news has pagination// for SEO reasons (dynamic parameters) preg_match("#class=\"news-next-page\" href=\"([^\"]*)\"#",$wb_page_data,$matches);$page = !empty($matches[1]) ? '<link rel="next" href="'.$matches[1].'">' : '';preg_match("#class=\"news-prev-page\" href=\"([^\"]*)\"#",$wb_page_data,$matches);$page .= !empty($matches[1]) ? '<link rel="prev" href="'.$matches[1].'">' : '';$wb_page_data = str_replace('</head>',"\n\t".$page.'</head>',$wb_page_data);return true;
<?php // this line is only for color reasons, don't copy thisif (preg_match('#class=\"news-next-page\"[^>]+?href=\"([^\"]*)\"#', $wb_page_data, $matches)) { $page = '<link rel="next" href="'.$matches[1].'">';}if (preg_match('#class=\"news-prev-page\"[^>]+?href=\"([^\"]*)\"#', $wb_page_data, $matches)) { $page .= '<link rel="prev" href="'.$matches[1].'">';}$wb_page_data = str_replace('</head>',"\n\t".$page.'</head>',$wb_page_data);return true;
<?php // this line is only for color reasons, don't copy this $sPage = ''; $sPattern = '/class=\"news-(?P<rel>next|prev)-page\"[^>]+?href=\"(?P<url>[^\"]*)\"/siu'; if (false !== preg_match_all($sPattern, $wb_page_data, $aMatches, PREG_SET_ORDER)) { foreach ($aMatches as $aMatch) { $sPage .= '<link rel="'.$aMatch['rel'].'" href="'.$aMatch['url'].'">'.PHP_EOL; } $wb_page_data = str_replace('</head>', "\n\t".$sPage.'</head>', $wb_page_data); } return true;