Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

embed iframe youtube video not working in Jomsocial 4.2.3 Group discussions

7 years 9 months ago
Licenses:
JomSocial Active

ISSUE SUMMARY:
screencast.com/t/K1QGgrbIm

STEPS TO REPLICATE:
1 create group discussion
2 title, text, html editor
3 embed iframe code of youtube video
4 toggle to text view, video appears
5 save, video and iframe script disappears
6 tinyMCE plugin set to allow iframe
RESULT
EXPECTED RESULT to embed Youtube videos in group discussions
BROWSER chrome

7 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Stephen,

By default we disabled the embed code on any our text editor..

to enable it you need hack the code, this is the pointer look file components/com_community/libraries/core.php this function getInputFilter() and components/com_community/controllers/group.php this code :

$inputFilter = CFactory::getInputFilter(true, array('b','u','i','li','ul','ol', 'br', 'div', 'p', 'img', 'a', 'strong', 'em'));

thank you!

7 years 9 months ago
Licenses:

Hi, Stephen.

Thank you for contacting us.
I'm sorry but iframes are not allowed in group discussions post.
Editor that is used on JomSocial pages is not TinyMCE but our own editor. And as iframes are potentially dangerous (they may load pages with malicious scripts) are not allowed. Rather add just link to a YT video (using chain icon from editor toolbar).


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 9 months ago
Licenses:
JomSocial Active

Thanks for pointing me in the right direction Dimas. I am in the cor.php file, only not sure exactly where to paste the additional code:

I have attached a screen capture image of the core.php asking where I should paste the code.


Thanks,

Steve

Attachments:
7 years 9 months ago
Licenses:
JomSocial Active

Hey Dimas, is there a hack which would allow Super Users ONLY to post iframe content?

7 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Stephen,

#1 you can add iframe paramater on array variable $safeTags
#2 if you want to allow super user to use iframe, you can give the super admin condition on controller file groups.php like this :

if(COwnerHelper::isCommunityAdmin()){
$inputFilter = CFactory::getInputFilter(true, array('b','u','i','li','ul','ol', 'br', 'div', 'p', 'img', 'a', 'strong', 'em','iframe'));
}
else{
$inputFilter = CFactory::getInputFilter(true, array('b','u','i','li','ul','ol', 'br', 'div', 'p', 'img', 'a', 'strong', 'em'));
}

thank you!

7 years 9 months ago
Licenses:
JomSocial Active

Hi Dimas, I tried inserting the text you mentioned as seen in the attached screen capture, but it still doesn't work.


Please help

Attachments:
7 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

ehm, for quick solution find this code :

$discussion->message = $inputFilter->clean($discussion->message);
change to :
if(!COwnerHelper::isCommunityAdmin()){
$discussion->message = $inputFilter->clean($discussion->message);
}

tested on my end and it works for discussion

7 years 9 months ago
Licenses:
JomSocial Active

1. I tried doing exactly as you said in groups.php,
2. please take a look at the screen shot. screencast.com/t/R6fWGPWfKLn
3. Another problem we are have is that we can't delete the test discussions we are creating. Only through our database.

7 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

what is FTP access? I will help with it :)

regarding deleting issue, please you create new topic :)

7 years 9 months ago
Licenses:
JomSocial Active

OK, I'll create a new topic. Thanks. :)

FTP Info in private section. Thanks! :)

7 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Is there any group which I can test? because I use login "Support" I cant access any group on your site, seems this is caused by 3rd party configuration, right ?

thank you!

7 years 9 months ago
Licenses:
JomSocial Active

Sorry about that. Please try again. Thanks. :)

7 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

ehm weird, my code is not working on your server, anwyay would you mind provide me phpmyadmin as well, please?

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW