the link for the newsitem is stored in the database
it is constructed by save_post.php
the link is without the /pages/ part
thus, to recreate a working link
the link is pasted to wburl + pagespart + linkpart
$post_link = '/posts/'.page_filename($title).PAGE_SPACER.$post_id;
here the link is created, the /posts/ can be changed to suit your needs
$linkstart = WB_URL.PAGES_DIRECTORY;
here the beginning part is created (from wich the link from the database is pasted)
if you change this to:
$linkstart = WB_URL;
the /pages/ bit will be lost
hope this explains more?
to get you started, here is the changed part of save_post.php wich you're after
// Include WB functions file
require(WB_PATH.'/framework/functions.php');
// Work-out what the link should be
$post_link = '/news/'.page_filename($title).PAGE_SPACER.$post_id;
// Make sure the post link is set and exists
// Make news post access files dir
make_dir(WB_PATH.'/news/'); // removed .PAGES_DIRECTORY changed /posts/ to /news/
$file_create_time = '';
if(!is_writable(WB_PATH.'/news/')) // same as above
{
$admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCESS_FILE']);
}
elseif(($old_link != $post_link) OR !file_exists(WB_PATH.$post_link.PAGE_EXTENSION)) // removed PAGES_DIRECTORY.
{
// We need to create a new file
// First, delete old file if it exists
if(file_exists(WB_PATH.$old_link.PAGE_EXTENSION)) // same as above
{
$file_create_time = filemtime($old_link.PAGE_EXTENSION);
unlink(WB_PATH.$old_link.PAGE_EXTENSION); // same as above
}
// Specify the filename
$filename = WB_PATH.'/'.$post_link.PAGE_EXTENSION; // same as above
create_file($filename, $file_create_time);
}
this changes all the links to
/pages/posts/ to /news/
and checks to see if /news/ exists
have fun,
John