MyBB Cross-Postalicious
[resolved] The default content of cross posts (have post feature image/thumbnail included) (4 posts)

  1. a_ahmed
    Posted 1 year ago #

    How would I do this?

    I have


    Discuss the above published news/article bellow:

    However I'd like to also add before the begin link the post feature image/thumbnail.

    Could you help out?


  2. a_ahmed
    Posted 1 year ago #

    Well I couldn't wait for slow support on here.

    I just implemented this myself

    // parse postlink and title
    		$cross_post_title = preg_replace('/!TITLE!/', $post->post_title, $cross_post_title);
    		$cross_post_content = preg_replace('/!IMAGE!/', '[img]' . wp_get_attachment_url(get_post_thumbnail_id($post->ID)) . '[/img]', $cross_post_content);
    		$cross_post_content = preg_replace('/!BEGINLINK!(.*)!ENDLINK!/', '[url=' . $post->guid . ']$1[/url]', $cross_post_content);
    		$cross_post_content = preg_replace('/!TITLE!/', $post->post_title, $cross_post_content);

    Notice my addition. !IMAGE! is now replaced with the post thumbnail

    You just have to fiddle with the settings

    So in my case when I post I now have:


    Discuss the above published news/article bellow:


  3. Markus Echterhoff
    Plugin Author

    Posted 1 year ago #

    This is how you do it.

  4. kokoko420
    Posted 1 year ago #

    where you paste above coding let me know please

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • MyBB Cross-Postalicious
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic