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
global $wb;$wb->preprocess( $wb_page_data);$linkstart = WB_URL.PAGES_DIRECTORY;$linkend = PAGE_EXTENSION;$nwlinkstart = WB_URL;$nwlinkend = \'/\';preg_match_all(\'~\'.$linkstart.\'(.*?)\\\\\'.$linkend.\'~\', $wb_page_data, $links);foreach ($links[1] as $link) { $wb_page_data = str_replace($linkstart.$link.$linkend, $nwlinkstart.$link.$nwlinkend, $wb_page_data);}return true;
i work on it...
Droplet says invalid php code I'm using WB 2.8.3 latest version with this droplet code
<?php // for syntax highlighting only!$sSearchPattern = '/' . preg_quote(WB_URL . PAGES_DIRECTORY, '/') . '(.*?)' . preg_quote(PAGE_EXTENSION, '/') . '/';if(preg_match_all($sSearchPattern, $wb_page_data, $aMatches)){ foreach($aMatches[1] as $sLink) { $wb_page_data = str_replace(WB_URL . PAGES_DIRECTORY . $sLink . PAGE_EXTENSION, WB_URL . $sLink . '/', $wb_page_data ); }}return '';
How do I get it to work with a subdomain please?
Is it possible to translate URL's from other droplets to short url's?
return '[[shorturl]]';
//:create short url's//://Shorturl - remove pages/php from linksglobal $wb;$wb->preprocess($wb_page_data);$linkstart = WB_URL.PAGES_DIRECTORY;$linkend = PAGE_EXTENSION;$nwlinkstart = WB_URL;$nwlinkend = '/';preg_match_all('~'.$linkstart.'(.*?)\\'.$linkend.'~', $wb_page_data, $links);foreach ($links[1] as $link) { $wb_page_data = str_replace($linkstart.$link.$linkend, $nwlinkstart.$link.$nwlinkend, $wb_page_data);}return true;
in my own page i use the older version of the short-url-script and it works without problemin a new local wb 2.8.4 project i test the shorturl 3.0 and i have only 404-Errorsthe rewrite works in the links and in the adress line from the browser. Whats the problem here?