AI Assistant
Notifications
Clear all

[Solved] Open link in new tab + embed Youtube

7 Posts
2 Users
1 Reactions
2,680 Views
Posts: 179
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@danniee)
Member
Joined: 7 years ago
[#5276]

Hi!

Just bought the media addon. If I add a plain youtube link, it doesn't actually embed the clip like I was hoping it would. The commenter must use the embed code from Youtube? If so, this won't be obvious to the commenters.

Also, is there a way to make links open in a new browser tab? As it is now, it redirects the visitor to a new website.


6 Replies
Astghik
Posts: 6645
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@astgh)
Illustrious Member
Joined: 8 years ago

Hi @danniee,

The commenter must use the embed code from Youtube? If so, this won't be obvious to the commenters.

No the users just need to copy the URL and paste it in the comment content. You can check it here: http://wpdiscuz.com/addons/wpdiscuz-media-uploader/#comments

Please navigate to Dashboard > Comments > Settings > Addons > Uploader admin page, make sure the "Allow media embedding function" is enabled. 

Also, is there a way to make links open in a new browser tab? As it is now, it redirects the visitor to a new website.

Please put the following js code in your active theme js file:

jQuery('#wpcomm .wc-comment-text a').attr('target', '_blank');

Here is an instruction you can use: https://www.ostraining.com/blog/wordpress/custom-js/


Posts: 179
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@danniee)
Member
Joined: 7 years ago

Hi,

That's the thing. I already have "Allow media embedding function" enabled, but it didn't work when I posted a regular Youtube link. Only when I used Youtube's own embedding link.


Posts: 179
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@danniee)
Member
Joined: 7 years ago

Nevermind, it seems to work as intended now. Thanks for the help.


1 Reply
Astghik
Admin
(@astgh)
Joined: 8 years ago

Illustrious Member
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@danniee,

Please let us know do both issues solved? 

 


Posts: 179
Customer
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@danniee)
Member
Joined: 7 years ago

Yes, both issues solved. However, why can't it be a default thing that links open in new tab or at least allow this option in the backend?


1 Reply
Astghik
Admin
(@astgh)
Joined: 8 years ago

Illustrious Member
Posts: 6645
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@danniee,

The target="_self" to the <a> tag is set by WordPress side not wpDiscuz.

why can't it be a default thing that links open in new tab or at least allow this option in the backend?

We'll take this into consideration for future updates. If the solution works just keep it in the file, you'll get it resolved. 

 


Share:
Scroll to top