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
What do you mean by that? I tried this code snippet, and it works allright.
<a href="<?php echo WB_URL; ?><?php echo $link ?><?php echo PAGE_EXTENSION; ?>"><?php echo $title; ?></a>
<a href="<?php echo WB_URL; ?>/pages/<?php echo $link ?><?php echo PAGE_EXTENSION; ?>"><?php echo $title; ?></a>
$group = 2; // 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, 5;";/*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 '<p><a href="'.WB_URL.$link.PAGE_EXTENSION.'">'.$title.'</a></p>';}
global $database;$query = "SELECT post_id,title,group_id,page_id,link,short FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id = $page_id ORDER BY post_id DESC LIMIT 0, 5;";/*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;}echo "Last 5 news posts:"."<br>";while($data = mysql_fetch_object($result)){$title = $data->title;$page = $data->page_id;$id = $data->post_id;$link = $data->link; $short = $data->short;echo '* <a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'">'.$title.'</a></br>';}
global $database;$query = "SELECT post_id,title,group_id,content_short, page_id,link FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id = $page_id ORDER BY post_id DESC LIMIT 0, 5;";$error = mysql_error();if (!$result = mysql_query($query)) {print "$error";exit;}echo "Last 5 news posts:"."<br>";echo "<ul>"; // start of the loopwhile($data = mysql_fetch_object($result)){$title = $data->title;$page = $data->page_id;$id = $data->post_id;$link = $data->link; $short = $data->short_content;echo '<li><a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'">'.$title.'</a>'.$short.'</li>'; // the loop}echo "</ul>"; // end of the loop
if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { $groups[$group_id]['image'] = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';} else { $groups[$group_id]['image'] = '';}
$group = 0; // Specify the Group(id) you want to read the news fromglobal $database;$query = "SELECT post_id,title,short,group_id,link FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id = $group ORDER BY position DESC LIMIT 0, 10;";/*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;$short= $data->short;$id = $data->post_id;$link = $data->link; $group_id = $data->group_id;if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { $picture = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';} else { $picture = '';}echo '<br />';echo '<table width=100%>';echo '<tr><td colspan=2 bgcolor=#e7e7e7><a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'">'.$title.'</a></td></tr>';echo '<tr><td>'.$picture.'</td><td>'.$short.'</td></tr>';echo '</table>';}
global $database;$query = "SELECT post_id,title,group_id,link FROM ".TABLE_PREFIX."mod_news_posts ORDER BY position DESC LIMIT 0, 5;";$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 '<p><a href="'.WB_URL.$link.PAGE_EXTENSION.'">'.$title.'</a></p>';}
global $database;$get_page = 1; // change to your page_id you need$query = "SELECT post_id, title,group_id,link FROM ".TABLE_PREFIX."mod_news_posts WHERE page_id=$get_page ORDER BY position DESC LIMIT 0, 5;";$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 '<p><a href="'.WB_URL.$link.PAGE_EXTENSION.'">'.$title.'</a></p>';}
<a href="http://www.kjolurin.com/pages//posts/rrrrrrrrrrrrrrrrrrrr146.php">rrrrrrrrrrrrrrrrrrrr</a></td></tr><tr><td></td><td><p><img height=\"73\" hspace=\"5\" src=\"/media/Image/bowla.jpg\" width=\"142\" align=\"left\" border=\"1\" /><img height=\"1\" src=\"/\"//\"/media/Image/bowla.jpg//\"/\"\" width=\"1\" border=\"0\" /><br /><img style=\"\"WIDTH: \" height=\"1\" src=\"/\"/media/Image/bowla.jpg/\"\" width=\"1\" border=\"0\" />
if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { $picture = WB_URL.MEDIA_DIRECTORY.'/.news/noimage.jpg';} else { $picture = '';}
if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) { $picture = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';} else { $picture = '';}