Title: pgn4web's Replies | WordPress.org

---

# pgn4web

  [  ](https://wordpress.org/support/users/pgn4web/)

 *   [Profile](https://wordpress.org/support/users/pgn4web/)
 *   [Topics Started](https://wordpress.org/support/users/pgn4web/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pgn4web/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pgn4web/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pgn4web/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pgn4web/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pgn4web/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 103 total)

1 [2](https://wordpress.org/support/users/pgn4web/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/pgn4web/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/pgn4web/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/pgn4web/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/pgn4web/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/pgn4web/replies/page/2/?output_format=md)

 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [reverting wptexturize changes](https://wordpress.org/support/topic/reverting-wptexturize-changes/)
 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/reverting-wptexturize-changes/#post-15969856)
 * Did a bit more of research and it might be that there’s no possible workaround
   to be implemented in the plugin. It seems that the shortcode content is passed
   to the plugin before applying the texturize, so nothing for the plugin to revert.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] pgn4web embed-chessboard plugin](https://wordpress.org/support/topic/pgn4web-embed-chessboard-plugin/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/pgn4web-embed-chessboard-plugin/#post-15411617)
 * Unfortunately, from this perspective, I implemented all features I thought appropriate
   for such a plugin.
 * Some of the functionality you mention is supported informally within the “extended
   options” category as explained in the notes.
 * If you have anything else more specific, I’d be happy to hear.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] pgn4web embed-chessboard plugin](https://wordpress.org/support/topic/pgn4web-embed-chessboard-plugin/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/pgn4web-embed-chessboard-plugin/#post-15411357)
 * At the moment I have nothing planned in term of feature enhancements.
 * Could you please let me know which functionality do you think is missing?
    I’ll
   look at your suggestions and I might pick something up if interesting for general
   use. Before you do that however, I strongly recommend reading [this wiki page](https://sourceforge.net/p/pgn4web/wiki/User_Notes_wordpress/),
   including notes at the bottom that describe some undocumented features that you
   might find interesting.
 * Thanks for your feedback!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] bug in Twenty Twenty Two theme shipping with WordPress.org 5.9](https://wordpress.org/support/topic/bug-in-twenty-twenty-two-theme-shipping-with-wordpress-org-5-9/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/bug-in-twenty-twenty-two-theme-shipping-with-wordpress-org-5-9/#post-15276395)
 * Small correction, it’s not a bug in the Twenty Twenty Two theme itself but rather
   a bug in the Gutemberg plugin and its integration in WordPress.org core, related
   to the rendering of blocks. Twenty Twenty Two is affected because it’s the first
   of the themes included in a WordPress.org release that is using blocks; any other
   blocks based theme would likely be affected as well.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg] plugin creating a reusable block](https://wordpress.org/support/topic/plugin-creating-a-reusable-block/)
 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-creating-a-reusable-block/#post-13781577)
 * A bit more debugging and it really seems that an author user is NOT able to insert
   properly a reusable block created by the admin user when installing a plugin 
   containing the following code (despite seeing the reusable block in the list):
 *     ```
             wp_insert_post( array(
               'post_content'   => "<!-- wp:shortcode -->\n[pgn] { click on the block options menu and convert to regular block before editing the PGN data } [/pgn]\n<!-- /wp:shortcode -->",
               'post_title'     => $my_shortcode_name,
               'post_type'      => 'wp_block',
               'post_status'    => 'publish',
               'comment_status' => 'closed',
               'ping_status'    => 'closed',
               'guid'           => sprintf( '%s/wp_block/%s', site_url(), sanitize_title( $my_shortcode_name ) )
             )
       ```
   
 * Any suggestion how to make the reusable block created programmatically by the
   plugin fully accessible by all users?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg] plugin creating a reusable block](https://wordpress.org/support/topic/plugin-creating-a-reusable-block/)
 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/plugin-creating-a-reusable-block/#post-13781472)
 * Maybe just a wild guess… when the plugin is installed by the site administrator
   a reusable block is created since none is present.
 * Then when the author user accesses the system, it can see the reusable block 
   created by the administrator, but for some reason I can not understand, the author
   user can not load properly the reusable block created by the administrator user.
 * How do I get around this?
 * This is my full code to create the reusable block:
 *     ```
           $my_shortcode_name = 'my short code';
           if ( !get_posts( array( 'name' => sanitize_title( $my_shortcode_name ), 'post_type' => 'wp_block', 'posts_per_page' => 1 ) ) ) {
             wp_insert_post( array(
               'post_content'   => "<!-- wp:shortcode -->\n[pgn] { click on the block options menu and convert to regular block before editing the PGN data } [/pgn]\n<!-- /wp:shortcode -->",
               'post_title'     => $my_shortcode_name,
               'post_type'      => 'wp_block',
               'post_status'    => 'publish',
               'comment_status' => 'closed',
               'ping_status'    => 'closed',
               'guid'           => sprintf( '%s/wp_block/%s', site_url(), sanitize_title( $my_shortcode_name ) )
             ) );
           }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] Unexpected end of text: there is a pending game.](https://wordpress.org/support/topic/unexpected-end-of-text-there-is-a-pending-game/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/unexpected-end-of-text-there-is-a-pending-game/#post-12493801)
 * If you are trying different plugins that might use the same [pgn]…[/pgn] notation,
   you might find helpful to know that my embed-chessboard plugin based on pgn4web
   also accepts the [pgn4web]…[/pgn4web] notation that should hopefully be unique
   to my plugin.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] Unexpected end of text: there is a pending game.](https://wordpress.org/support/topic/unexpected-end-of-text-there-is-a-pending-game/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/unexpected-end-of-text-there-is-a-pending-game/#post-12493764)
 * I looked at your site; it seems you are NOT using the embed-chessboard plugin
   based on my pgn4web software; instead, the error message seems from a plugin 
   called rpbchessboard or something like that.
 * Please report the bug to the correct plugin author.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] Unexpected end of text: there is a pending game.](https://wordpress.org/support/topic/unexpected-end-of-text-there-is-a-pending-game/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/unexpected-end-of-text-there-is-a-pending-game/#post-12493420)
 * The PGN data you linked looks fine.
 * If you share a link to the page showing the problem I can have a look.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg] how to instruct a plugin to create a reusable block](https://wordpress.org/support/topic/how-to-instruct-a-plugin-to-create-a-reusable-block/)
 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [8 years ago](https://wordpress.org/support/topic/how-to-instruct-a-plugin-to-create-a-reusable-block/#post-10552954)
 * It all works!
 * Fantastic help. Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg] how to instruct a plugin to create a reusable block](https://wordpress.org/support/topic/how-to-instruct-a-plugin-to-create-a-reusable-block/)
 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [8 years ago](https://wordpress.org/support/topic/how-to-instruct-a-plugin-to-create-a-reusable-block/#post-10552481)
 * Thanks. That looks great!
 * Last question (I really know little about WP): how can I check for the existence
   of a reusable block created following your suggestion?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Gutenberg] how to instruct a plugin to create a reusable block](https://wordpress.org/support/topic/how-to-instruct-a-plugin-to-create-a-reusable-block/)
 *  Thread Starter [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [8 years ago](https://wordpress.org/support/topic/how-to-instruct-a-plugin-to-create-a-reusable-block/#post-10552219)
 * Thanks for your reply. I fully understand your point of view; if I had to write
   a plugin from scratch, that’s the way to doit (assuming enough sites adopt gutemberg).
 * However, I’m managing an old and stable plugin that does nothing else than to
   provide a very specific bbcode/shortcode. Plugin stats shows almost 1000 sites
   using the plugin, so for compatibility reasons I’ll have to keep supporting the
   bbcode/shortcode.
 * Adding automatically a reusable block with the right label would make it very
   apparent to all users how to use my plugin with gutembers while requiring only
   a very small code addition (hopefully). Adding a gutemberg block instead I’m 
   afraid would require substantially more code alongside the existing code (for
   compatibility with sites not using gutenberg).
 * Question remains, assuming as you say that it’s possible, how do I programmatically
   add a “reusable block” filled in as shortcode block with my own bbcode/shortcode?
 * Also, I’m not sure why would I need a “mechanism to the editor UI to trigger 
   this behaviour”; I was assuming that the plugin automatically wuold check if 
   the “reusable block” is there already, if not it would create one ensuring that
   the user would see that in the list of available reusable blocks (and yes, I 
   can control this with an option flag in my plugin settings so that pedantic users
   can delete the resuable block and not seeing it again anytime soon).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] Your help has been appreciated, next question](https://wordpress.org/support/topic/your-help-has-been-appreciated-next-question/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/your-help-has-been-appreciated-next-question/#post-10204257)
 * Since you asked my opinion….
 * Too much competition from countless websites offering chess material: a number
   of good ones for free, a number from much better qualified sources; the message“
   listen to me, I’m not a very good player myself but I know how to teach you to
   be better” does not work.
 * Too few people looking for this kind of product and even fewer keen to pay for
   it.
 * If you are using the words chess, blog and monetisation in the same sentence,
   please stop immediately, you are certainly doing something wrong.
 * It’s just my opinion and I do not have any interest arguing the topic any further…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] Your help has been appreciated, next question](https://wordpress.org/support/topic/your-help-has-been-appreciated-next-question/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/your-help-has-been-appreciated-next-question/#post-10193319)
 * As a suggestion, the alternative [rpb-chessboard plugin](https://wordpress.org/plugins/rpb-chessboard/)
   might be a better fit to your specific application; I have nothing to do with
   it and I never used it, but from its description it might be worth for you to
   have a look for yourself.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Embed Chessboard] Your help has been appreciated, next question](https://wordpress.org/support/topic/your-help-has-been-appreciated-next-question/)
 *  Plugin Author [pgn4web](https://wordpress.org/support/users/pgn4web/)
 * (@pgn4web)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/your-help-has-been-appreciated-next-question/#post-10192780)
 * I’m afraid these isn’t a straightforward way to achieve what you describe with
   a single bbcode entry.
 * With this plugin, each pgn bbcode results in one chessboard displaying the chess
   position of the associated text.
 * You might want to try the horizontal layout option that shows a scrolling text
   next to the chessboard and avoid moving around the page.
 * If you want to show multiple chessboards for the same game you have to enter 
   multiple pgn bbcodes and either split the pgn in fragments or play with the bbcode
   options; ultimately you’ll have to try and error until you find what you like.
 * Good luck… although I doubt the chances to monetise such a blog.

Viewing 15 replies - 1 through 15 (of 103 total)

1 [2](https://wordpress.org/support/users/pgn4web/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/pgn4web/replies/page/3/?output_format=md)…
[5](https://wordpress.org/support/users/pgn4web/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/pgn4web/replies/page/6/?output_format=md)
[7](https://wordpress.org/support/users/pgn4web/replies/page/7/?output_format=md)
[→](https://wordpress.org/support/users/pgn4web/replies/page/2/?output_format=md)