Conversation
supportThis is a most excellent plugin and works around the godless avarity of IFramely. You deserve 30,000 5 stars rating on Wp.org! This plugin works for me when I write a post in the classic editor. But how can I get it to work for comments / status posts in WP or BuddyPress?
Thank you for using it. The comment section doesn’t work because the shortcode is invalid. I didn’t make it for BuddyPress. I’m not familiar with BuddyPress. What does “status posts” mean in Japanese? I’ll study. This word is translated by Google. I’m sorry if it’s a rude word.
Really. Did you want to implement it in the comment box? It seems that it can be done by specifying a filter. Can you fix it if I tell you how to change the part of the program? If it’s a formal feature, I’d like a little time for me to think about it.
Thank you for waiting. I tried a little and it was possible. However, shortcodes other than PZ-Link Card have also been converted. I wanted to enable shortcodes only for registered users, but that didn’t work. I thought that there would be no problem even if the URL conversion was enabled for non-registered users. I can give you advice on where to change the program to make it happen, but what do you do?
Dear. I asked “What should I do?”, But I’ll write the answer. This is about line 270. The lines from “[DEBUG] [BEGIN]” to “[DEBUG] [END]” are added. add_filter ('mce_buttons', array($this, 'add_mce_button' ) ); // ビジュアルエディタ用ボタン add_filter ('mce_external_plugins', array($this, 'add_mce_plugin' ) ); // ビジュアルエディタ用ボタン add_filter ('plugin_action_links_'.$this->plugin_basename, array($this, 'action_links' ) ); // プラグイン画面 } else { //[DEBUG] [BEGIN] 2021/04/20 Convert the URL of the comment box add_filter ('comment_text', array($this, 'filter_comment' ) ); //[DEBUG] [END] 2021/04/20 Convert the URL of the comment box add_action ('wp_enqueue_scripts', array($this, 'enqueue' ) ); // スタイルシート呼び出し if ($this->options['auto-atag'] || $this->options['auto-url'] ) { // 自動置き換え add_filter ('the_content', array($this, 'auto_replace' ) ); add_shortcode ('pz-linkcard-auto-replace', array($this, 'shortcode' ) ); } And next is about the 310th line. In the same way, add lines from “[DEBUG] [BEGIN]” to “[DEBUG] [END]”. if (!wp_next_scheduled('pz_linkcard_alive' ) ) { wp_schedule_event(time() + 1800 , 'daily', 'pz_linkcard_alive' ); } } } //[DEBUG] [BEGIN] 2021/04/20 Convert the URL of the comment box public function filter_comment($content ) { if ($this->options['auto-atag'] || $this->options['auto-url'] ) { $content = $this->auto_replace($content ); } //$content = do_shortcode($content ); return $content; } //[DEBUG] [END] 2021/04/20 Convert the URL of the comment box // テキストリンクの行とURLのみの行をリンクカードへ置き換える処理(直接HTMLタグにするのでは無くショートコードに変換する。) public function auto_replace($content ) { if (!$this->options['auto-external'] ) { // 内部リンクも外部リンクも変換する if ($this->options['auto-atag'] ) { $content = preg_replace('/(^|<br ?\/?>)(<p.*>)?<a\s.*href\s*=\s*[\'"]?((https?|file|ftp|data|ogg):\/\/[^ \'"<]+)[\'"]?[^<]*<\/a>(<\/p>)?$/im', '[pz-linkcard-auto-replace url="$3"]', $content ); } If you delete “//” from the part where “// $ content = do_shortcode ($ content);” and change it to “$ content = do_shortcode ($ content);”, you can use the shortcode. I may be able to help you, so please call me again. Let’s enjoy together. * This sentence uses translation. I’m sorry if there is a rude wording. This reply was modified 5 years, 1 month ago by ぽぽろん@ぽぽづれ。 . This reply was modified 5 years, 1 month ago by ぽぽろん@ぽぽづれ。 .
I’m sorry many times. I’ve noticed that changing the URL doesn’t work properly without a shortcode. I think it’s a security issue to deploy anyone’s comments or any shortcode. I found it difficult to achieve this feature.
Hi, Dear. I made a function to enable Pz-Link Card in the comment box. It will be available in the next version, that is, Ver.2.4.5. We look forward to.
Thank you for using it. The comment section doesn’t work because the shortcode is invalid. I didn’t make it for BuddyPress. I’m not familiar with BuddyPress. What does “status posts” mean in Japanese? I’ll study. This word is translated by Google. I’m sorry if it’s a rude word.
Really. Did you want to implement it in the comment box? It seems that it can be done by specifying a filter. Can you fix it if I tell you how to change the part of the program? If it’s a formal feature, I’d like a little time for me to think about it.
Thank you for waiting. I tried a little and it was possible. However, shortcodes other than PZ-Link Card have also been converted. I wanted to enable shortcodes only for registered users, but that didn’t work. I thought that there would be no problem even if the URL conversion was enabled for non-registered users. I can give you advice on where to change the program to make it happen, but what do you do?
Dear. I asked “What should I do?”, But I’ll write the answer. This is about line 270. The lines from “[DEBUG] [BEGIN]” to “[DEBUG] [END]” are added. add_filter ('mce_buttons', array($this, 'add_mce_button' ) ); // ビジュアルエディタ用ボタン add_filter ('mce_external_plugins', array($this, 'add_mce_plugin' ) ); // ビジュアルエディタ用ボタン add_filter ('plugin_action_links_'.$this->plugin_basename, array($this, 'action_links' ) ); // プラグイン画面 } else { //[DEBUG] [BEGIN] 2021/04/20 Convert the URL of the comment box add_filter ('comment_text', array($this, 'filter_comment' ) ); //[DEBUG] [END] 2021/04/20 Convert the URL of the comment box add_action ('wp_enqueue_scripts', array($this, 'enqueue' ) ); // スタイルシート呼び出し if ($this->options['auto-atag'] || $this->options['auto-url'] ) { // 自動置き換え add_filter ('the_content', array($this, 'auto_replace' ) ); add_shortcode ('pz-linkcard-auto-replace', array($this, 'shortcode' ) ); } And next is about the 310th line. In the same way, add lines from “[DEBUG] [BEGIN]” to “[DEBUG] [END]”. if (!wp_next_scheduled('pz_linkcard_alive' ) ) { wp_schedule_event(time() + 1800 , 'daily', 'pz_linkcard_alive' ); } } } //[DEBUG] [BEGIN] 2021/04/20 Convert the URL of the comment box public function filter_comment($content ) { if ($this->options['auto-atag'] || $this->options['auto-url'] ) { $content = $this->auto_replace($content ); } //$content = do_shortcode($content ); return $content; } //[DEBUG] [END] 2021/04/20 Convert the URL of the comment box // テキストリンクの行とURLのみの行をリンクカードへ置き換える処理(直接HTMLタグにするのでは無くショートコードに変換する。) public function auto_replace($content ) { if (!$this->options['auto-external'] ) { // 内部リンクも外部リンクも変換する if ($this->options['auto-atag'] ) { $content = preg_replace('/(^|<br ?\/?>)(<p.*>)?<a\s.*href\s*=\s*[\'"]?((https?|file|ftp|data|ogg):\/\/[^ \'"<]+)[\'"]?[^<]*<\/a>(<\/p>)?$/im', '[pz-linkcard-auto-replace url="$3"]', $content ); } If you delete “//” from the part where “// $ content = do_shortcode ($ content);” and change it to “$ content = do_shortcode ($ content);”, you can use the shortcode. I may be able to help you, so please call me again. Let’s enjoy together. * This sentence uses translation. I’m sorry if there is a rude wording. This reply was modified 5 years, 1 month ago by ぽぽろん@ぽぽづれ。 . This reply was modified 5 years, 1 month ago by ぽぽろん@ぽぽづれ。 .
I’m sorry many times. I’ve noticed that changing the URL doesn’t work properly without a shortcode. I think it’s a security issue to deploy anyone’s comments or any shortcode. I found it difficult to achieve this feature.
Hi, Dear. I made a function to enable Pz-Link Card in the comment box. It will be available in the next version, that is, Ver.2.4.5. We look forward to.