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
<?php if(function_exists('displayNewsItems')) { displayNewsItems( 0, 5, 50, 1, "", "mehr lesen", "aktuell gibt es keine news...", false);} else { echo 'Requires code snippet anynews (WB addons repository) to display news here.';}?>
strip_tags... true:=remove tags from short and long text (default:=true); false:=don´t strip tagsallowed_tags... tags not striped off (default:='<p><a><img>')
if (function_exists('displayNewsItems')) { displayNewsItems(2, 2, 200, 5, 'DE', false,'<p><a><img>', 1, 0);}
<?phpif (function_exists('displayNewsItems')) { displayNewsItems($group_id = 2, $max_news_items = 2, $max_news_length = 200, $display_mode = 5, $lang_id = 'DE', $strip_tags = false, $allowed_tags = '<p><a><img>', $custom_placeholder = false, $sort_by = 4, $sort_order = 1, $not_older_than = 0 );}?>
Could it have something to do with the installed php-version?
displayNewsItems(array(10,11, 12, 13, 14), 5, 0, 0, false);
$group = 9; // Specify the Group(id) you want to read the news fromglobal $database;$query = "SELECT post_id,title,group_id,link FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id = $group ORDER BY position DESC LIMIT 0, 3;";/*This limits the results to max 5, so if you want it to be 10, make it LIMIT 0, 10. The first number defines the starting point, and the second the max/end of the results */$error = mysql_error();if (!$result = mysql_query($query)) { print "$error"; exit;}while($data = mysql_fetch_object($result)){ $title = $data->title; $id = $data->post_id; $link = $data->link; echo '<li><a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'">'.$title.'</a>'.$short.'</li>'; // the loop}echo "</ul>"; // end of the loop
Yes, I´ve made no changes in the html-code on news-section. It´s a fresh wb-installation. The php-version is 4.3.9.I know, that php5 is required for wb 2.8., but exept of anynews it works without any problems.
<?php $restore = array ( '<' => "<", '>' => ">", '"e;' => "\"");$temp[0] = str_replace(array_keys($restore), array_values($restore), $temp[0]);?>