Display iframe in activity stream

3 years 6 months ago #320880 by a.muntean
Display iframe in activity stream was created by a.muntean
Hello,
How can I allow showing an iframe in theactivity stream?

Please Log in to join the conversation.

3 years 6 months ago #320887 by krileon
Replied by krileon on topic Display iframe in activity stream
Users are not allowed to add HTML to their posts. This includes iframes. There is no functionality to allow for this and there is no plans to allow for this. iframes are considered a vulnerability. Typically you'd just use the links feature if you need to link to something external.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 6 months ago #320900 by a.muntean
Replied by a.muntean on topic Display iframe in activity stream
The iframe is my connection to my VoD partner. It's not about allowing users to add it, it's about the admin posts.
Is there any workaround for this?

Please Log in to join the conversation.

3 years 6 months ago #320910 by krileon
Replied by krileon on topic Display iframe in activity stream
Only way HTML is allowed is if the post is a system post (click the anonymous person icon to the left of Post button), but iframes will still get filtered out unless you whitelist them for all of CB within CB > Configuration > User Profile using "Exclude Tags from Filtering" parameter. Don't do this if you're using editor fields as then users can also add iframes in those fields. There is no functionality in CB Activity at this time to add whatever unfiltered HTML you like. It maybe allowed in a future release for system posts only.

Safest way to add support for your iframe is to extend the parsing API with a new shortcode. This can be done using the below in CB Auto Actions.

Global
Triggers: activity_onParse
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
$variables['var1'] = str_replace( 'SHORTCODE_HERE', 'IFRAME_HERE', $variables['var1'] );
Parameters
Reference Variables: Variable 1

So with the above SHORTCODE_HERE for example could be [vod_partner] which will get replaced by whatever you add in place of IFRAME_HERE when you add [vod_partner] to your post. This will allow you to safely insert custom HTML. Note you'll need latest build released today for this to work as there was a bug in that trigger.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

3 years 6 months ago #320913 by a.muntean
Replied by a.muntean on topic Display iframe in activity stream
Thank you!
I'll try it!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.199 seconds

Facebook Twitter LinkedIn