Home Forums Plugin Support WP User Frontend Pro Posts Preview

This topic is: not resolved

Tagged: ,

This topic contains 5 replies, has 5 voices, and was last updated by  Mahi 5 years, 11 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1878

    strangerrj
    Participant
    Post count: 82

    Hi, could you also adjust Posts also a button next to the preview pack publishing? Ie so that the user can see a preview once before setting the post.

     

    Thank you Best regards

    #1890

    Tareq Hasan
    Keymaster
    Post count: 2831

    I am planning the preview feature on a later version.

    #1898

    strangerrj
    Participant
    Post count: 82

    yes, that's great. This function is always important. Good luck.

    cheers

    #4826

    jeremy.debost
    Participant
    Post count: 17

    Dear Tareq,

    Despite it is probably difficult to allow preview on a new post that has no ID (backend uses autosave functions if I remember well), I allowed preview in the dashboard, after the new post has been created, by replacing lines 128 to 138 in frontend-dashboard.php by:

    <td>
                                    <?php if ( in_array( $post->post_status, array("draft", "future") ) ) { ?>
    
                                        <?php the_title(); ?>
    
                                    <?php } elseif ( in_array( $post->post_status, array("pending") ) ) { ?>
                                    
                                        <a href="<?php bloginfo( "url" ) ?>?post_type=[YOUR CUSTOM POST HERE]&p=<?php echo $post->ID; ?>&preview=true" title="Preview for: <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a> (PREVIEW)
                                                                        
                                    <?php } else  { ?>
    
                                        <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( "Permalink to %s", "wpuf" ), the_title_attribute( "echo=0" ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
    
                                    <?php } ?>
                                </td>

    I added a redirection to the dashboard when a new post is submitted, this way the users can preview their pending posts and change them before the admins have a look on them.

    Hope it can help.

    #4832

    paperweight
    Participant
    Post count: 122

    jeremy: that is a great function and I have wanted this Preview feature for a looong time ๐Ÿ˜‰

    I was looking also at the http://wordpress.org/plugins/public-post-preview/ Public Post Preview plugin and seeing if I could integrate that into WPUF, but your code maybe works better, I hope we have a built-in feature soon~

    #4849

    Mahi
    Member
    Post count: 1555

    Many thanks to Jeremy & paperweight . We mark it down for next major updates ๐Ÿ™‚

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Posts Preview’ is closed to new replies.