I'm attempting to affect the default "preview publish" button when posting using blogging platforms as they have a compromised wordpress install and also the posts previews aren't where they should be.

I discovered the hook preview_publish_link now i'm just trying to puzzle out steps to make just a little wordpress plugin which will repair the problem.

What I'm not sure how you can do and why I'm posting here's, while using add_filter to alter the hyperlink

add_filter( 'preview_post_link', 'the_preview_fix' );

function the_preview_fix() {

    return;
}

all I want it to complete is rather than likely to its current link visit www.website.com/blog/p/the-slug as despite the fact that the draft publish does not show up on the live site the hyperlink will still take me to some produced page :)

Thanks ahead of time for every help received

EDIT FIXED IT!

add_filter( 'preview_post_link', 'the_preview_fix' );

function the_preview_fix() {
    $slug = basename(get_permalink());
    return "http://www.mywebsite.com/blog/p/$slug";
}
add_filter( 'preview_post_link', 'the_preview_fix' );

function the_preview_fix() {
    $slug = basename(get_permalink());
    return "http://www.mywebsite.com/blog/p/$slug";
}