WPIntell

Source evidence

How to implement this in the WP Comment boxes?

Pz-LinkCard · support · 2021-04-09T13:41:00+00:00

complaintsentiment
highseverity
1.0relevance
6replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 13 rows with source links

23.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

10 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
fraughtithrouble unresolved
This 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.

Comments

6 shown
ぽぽろん@ぽぽづれ。 2021-04-20T11:29:00+00:00

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.

ぽぽろん@ぽぽづれ。 2021-04-20T11:34:00+00:00

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.

ぽぽろん@ぽぽづれ。 2021-04-20T12:29:00+00:00

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?

ぽぽろん@ぽぽづれ。 2021-04-20T12:41:00+00:00

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 ぽぽろん@ぽぽづれ。 .

ぽぽろん@ぽぽづれ。 2021-04-20T21:37:00+00:00

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.

ぽぽろん@ぽぽづれ。 2021-04-24T01:43:00+00:00

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.