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
require(WB_PATH.'/forum/SSI.php');echo "\n<P>".ssi_login()."</P>\n";
<?php require("/path/forum/SSI.php"); ssi_recentTopics();?>
require(WB_PATH.'/forum/SSI.php');echo "\n<P>".ssi_login()."</P>\n";echo "\n<div class=\"red_box\">\n<h3>Five most recent forum posts</h3>\n";$posts = ssi_recentPosts(5, array(), 'array');$i = 10;foreach ($posts as $post) { $item = "item$i"; $i++; $subject = $post['subject']; $body = $post['body']; $href = $post['href']; $timestamp= "Posted ".date("F j, Y", $post['timestamp']);if (strlen($body) > 160) {$body = snippet($body, 160) . " <a href=\"$href\">(...Continued: read full posting here)</a>";} else {$body = $body . " <a href=\"$href\">(Read full posting here)</a>";}echo <<<EOT<div id="$item" class="news_expand"><a href="javascript:showHideItems('$item');">$subject</a><p>$timestamp</p><p>$body</p></div>EOT;}echo "</div>\n";
@VCRulezYou need to use the full path...the easiest way to do that is with WB_PATH constant.
Have you looked at the documentation for SMF functions? If so, you'll see that ssi_recentTopics() returns an array. Assuming that your required path is correct then your code worked fine...you just didn't do anything with the array.
Allways after creating an external database connection re-open the WB database connection otherwise WB doesn't know where to look for it's data, simple as thatIndeed the best way to do so is :$database = new database();use that at the end of your code!This has nothing to do with chCounter,wb starts building the page, it opens the database connection, code is executed, when in code another connection is made wb looses his.
require("/users/soo/www/forum/SSI.php");ssi_recentTopics();$database = new database();