Forum Replies Created

Viewing 15 replies - 1 through 15 (of 103 total)
  • Thread Starter pgn4web

    (@pgn4web)

    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.

    Plugin Author pgn4web

    (@pgn4web)

    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.

    Plugin Author pgn4web

    (@pgn4web)

    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, including notes at the bottom that describe some undocumented features that you might find interesting.

    Thanks for your feedback!

    Plugin Author pgn4web

    (@pgn4web)

    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 www.ads-software.com core, related to the rendering of blocks. Twenty Twenty Two is affected because it’s the first of the themes included in a www.ads-software.com release that is using blocks; any other blocks based theme would likely be affected as well.

    Thread Starter pgn4web

    (@pgn4web)

    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?

    Thread Starter pgn4web

    (@pgn4web)

    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 ) )
          ) );
        }
    Plugin Author pgn4web

    (@pgn4web)

    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.

    Plugin Author pgn4web

    (@pgn4web)

    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.

    Plugin Author pgn4web

    (@pgn4web)

    The PGN data you linked looks fine.

    If you share a link to the page showing the problem I can have a look.

    Thread Starter pgn4web

    (@pgn4web)

    It all works!

    Fantastic help. Thanks!

    Thread Starter pgn4web

    (@pgn4web)

    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?

    Thread Starter pgn4web

    (@pgn4web)

    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).

    Plugin Author pgn4web

    (@pgn4web)

    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…

    Plugin Author pgn4web

    (@pgn4web)

    As a suggestion, the alternative rpb-chessboard plugin 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.

    Plugin Author pgn4web

    (@pgn4web)

    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)