No bug warning before uploading a video to youtube

More
1 year 6 months ago #2234 by Hervé
Hello Ruud
I hope you are well?

1/ location of the text that warns about loading cookies
Is it possible to translate, or even supercharge "Click to load the embedded media..."?

2/ see the video on the blog page
clibre.eu/infos-sur-le-libre >> "Si c'est gratuit, vous êtes le produit"

What should I add in the safe overload I made of blog_item.php to see the video?
<?php echo JHTML::_('string.truncate', strip_tags($this->item->introtext, ), 450, true, true); ?>
regards

Please Log in to join the conversation.

More
1 year 6 months ago #2243 by Ruud van Lent
Replied by Ruud van Lent on topic warning before uploading a video to youtube

Hello Ruud
I hope you are well?

Hi Hervé, all is well here considering the situation in the world today :S

1/ location of the text that warns about loading cookies
Is it possible to translate, or even supercharge "Click to load the embedded media..."?

2/ see the video on the blog page
clibre.eu/infos-sur-le-libre >> "Si c'est gratuit, vous êtes le produit"

Yes, that is possible: it is a language string that you can change via a language override: PLG_CONTENT_OCHFITFIDS_MESSAGE_CLICKTOLOADVIDEO

What should I add in the safe overload I made of blog_item.php to see the video?
<?php echo JHTML::_('string.truncate', strip_tags($this->item->introtext, ), 450, true, true); ?>
regards
 

with the code above you are stripping the iframe, so you should remove that from the array, possibly others as well. I would start without the strip_tags and see if it displays and then add until it doesn't :)

Please Log in to join the conversation.

More
1 year 6 months ago #2246 by Hervé
HI
1/ perfect
2/
I see that my command line has been deleted!
I added tags: br', 'img', 'iframe', 'b', 'strong' to see the content in the strip_tags

JHTML::_('string.truncate',  strip_tags($this->item->introtext, ), 450, true, true) ;

Can you tell me more precisely which tag has been added?

Please Log in to join the conversation.

More
1 year 6 months ago #2247 by Hervé
Ah I'm writing to you by mail because it's deleted

Please Log in to join the conversation.

More
1 year 6 months ago #2249 by Hervé
Hi again
I put it back for the memory
If I put back
<echo $this->item->introtext; ?>
=> video with the plugin setting is displayed
If I put :
<?php echo JHTML::_('string.truncate', 300, true, true); ?>
nothing is displayed

but can you take into account that all this setting with all these tags are important to me, as they should work for other types of content with a nice layout.
Is there any way to get around this with a class? or something else while keeping my string. truncate?

Please Log in to join the conversation.

More
1 year 6 months ago #2250 by Ruud van Lent
Replied by Ruud van Lent on topic warning before uploading a video to youtube
Truncate will also (likely) truncate the iframe code as that is over the max length.
This gets very complicated, something like first remove the iframe, truncate and then add the iframe back.

Please Log in to join the conversation.

More
1 year 6 months ago #2251 by Hervé
Re
ok as I'm motivated, I have an idea to make a test on the existence of the plugin

If (plugin ochFitVids !?) then
   <echo $this->item->introtext; ?>
otherwise
  <?php echo JHTML::_('string.truncate', ... (full display with truncate)

If you have the condition, maybe it would be a good idea?

Please Log in to join the conversation.

More
1 year 6 months ago - 1 year 6 months ago #2257 by Ruud van Lent
Replied by Ruud van Lent on topic warning before uploading a video to youtube
Code:
if (stripos($this->item->introtext, '<iframe>' !== false) { // we have iframe } else { // truncate as there is no iframe }
Last edit: 1 year 6 months ago by Ruud van Lent.
The following user(s) said Thank You: Hervé

Please Log in to join the conversation.

More
1 year 6 months ago #2264 by Hervé
Bingo with
if (stripos($this->item->introtext, 'iframe') !== false)
Thanks

Please Log in to join the conversation.

More
1 year 6 months ago #2265 by Ruud van Lent
Replied by Ruud van Lent on topic warning before uploading a video to youtube
Top!

Please Log in to join the conversation.