Support » Plugin: Visual Link Preview » need to help use it available in BBPress

  • Hi

    I used “visual link preview” very well on my blog, First Thanks

    I have other sites, this site is WordPress+BBPresss
    => Forum type community web site

    I want to use “visual link preview” in BBPress.

    possible the feature be improved?

    Thanks

    Best Regards,
    Hyunho

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi Hyunho,

    I’m afraid it’s not possible to use VLP inside BBPress at the moment. Would you want it to automatically replace any link or need to display the form there as well?

    Thread Starter purityboy83

    (@purityboy83)

    Hi

    my blog use the classic editor

    and I am using the “VLP” button in the classic editor.

    img link
    https://t1.daumcdn.net/cfile/tistory/99DCAB3A5FD2CB440B

    I am currently using TinyMCE in BBPress.
    I would like to have a “VLP” button here too.

    The link below is the bbpress + tinymce screen in use now.
    https://t1.daumcdn.net/cfile/tistory/99DF453D5FD2CB540A

    Best Regards,
    Hyunho

    Plugin Author Brecht

    (@brechtvds)

    The difference is that BBPress is the front-end, where our backend editor is not loaded. But I’ll look into it.

    neon67

    (@neon67)

    very interested in this work too

    bnisia

    (@bnisia)

    I actually modified this to work on the bbpress front-end… its not that hard actually.

    While this is OK for an end user it is still much more clumbsy that what is done in facebook and similar. So I do think it needs to be more elegant and have a listener that detects a url that is entered. which may be a tricker proposition.

    Thread Starter purityboy83

    (@purityboy83)

    Hi @bnisia

    Can you share how you modified or make the code?

    Thanks

    bnisia

    (@bnisia)

    Basically I went through the code and changed where it was loading on hooks that were specific to admin and changed them to load on the front end too.

    I just remembered One tricky bit to it was enabling the parsing of short codes, I think this is the code I used in my themes functions.php

    function pw_bbp_shortcodes( $content, $reply_id ) {
    	
    	$reply_author = bbp_get_reply_author_id( $reply_id );
    
    	if( user_can( $reply_author, pw_bbp_parse_capability() ) ) {
    		$content = shortcode_unautop( $content );
    		return do_shortcode( $content );
    	}
    
    	return $content;
    }
    add_filter('bbp_get_reply_content', 'pw_bbp_shortcodes', 10, 2);
    add_filter('bbp_get_topic_content', 'pw_bbp_shortcodes', 10, 2);
    
    function pw_bbp_parse_capability() {
    	return apply_filters( 'pw_bbp_parse_shortcodes_cap', 'publish_forums' );
    }
    
    add_filter (‘pw_bbp_parse_shortcodes_cap’ , ‘publish_topics’ ) ;
    Thread Starter purityboy83

    (@purityboy83)

    Hi @bnisia

    I installed VLP plugin and inserted your shortcode into functions.php
    However, there is no change in the form (frontend) of bbpress

    Can I check more?

    Thanks

    bnisia

    (@bnisia)

    Did you also do this part?

    “Basically I went through the code and changed where it was loading on hooks that were specific to admin and changed them to load on the front end too.”

    Thread Starter purityboy83

    (@purityboy83)

    Hi @bnisia

    Could you please explain how to do that?

    I just typed in the shortcode you gave me

    Could you tell me a little more?

    Thanks

    Thread Starter purityboy83

    (@purityboy83)

    Hi @bnisia

    Please give me a little more guide

    Thanks

    I recommend studying how hooks are used in wordpress so you get the skill to do it or you will be forever reliant on others to do the legwork. This is very basic coding in this environment.

    Thread Starter purityboy83

    (@purityboy83)

    @bnisia

    My purpose is to operate a blog or community site through wordpress. Also, I am aiming to write topic and write content, and to communicate between people
    so WordPress technical is not the purpose

    Better writing and content are more important to me.

    What you important about and what i important about is different

    If you don’t want to tell,Do not answer me
    I don’t want to get any more help from you either.
    I just won’t use it.

    Thanks for great questions @purityboy83

    I’ll take a look at @bnisia approach and see if I can make sense of that too.

    For the plugin developers, @brechtvds, are there any hopes to incorporate this into bbpress? A forum/bulletin board kind of site is a really great use case for such a tool, its kind of expected now that facebook twitter etc have made users used to that functionality. There’s also a lot of interest from other users of bbpress, eg on this thread that pointed me here https://bbpress.org/forums/topic/image-preview-from-url-pasted-within-bbpress-posts/

    Oh so another approach that kind of works,

    Instead of the bbpress editor which i suppose is the html editor,

    I enabled the visual editor to be used as the default bbpress editor.
    https://codex.bbpress.org/enable-visual-editor/

    Then, with VLP plugin enabled, the user just has to post a url on its own line.
    Unlike in the backend, it doesn’t automatically show the preview.
    But the newly created topic or reply shows the preview.

    So that kind of works if you can get your user to know to post a url on its own line.

    I don’t know where to start in terms of getting it to automatically replace the link with the preview, as it does on the backend, any ideas?

Viewing 15 replies - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.