strip text but not iframe

More
10 years 9 months ago #44276 by modernmagic
I would like to strip all content except the iframe that is used to embed the video.[attachment=0:1za05mi6]<!-- ia0 -->strip-text-only.png<!-- ia0 -->[/attachment:1za05mi6]

Joomla website builder at modernmagic.com

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44295 by ggppdk
Replied by ggppdk on topic strip text but not iframe
Hello

duplicate the 'news' template of universal module and create 'mynews' then edit template file to make your customization.

see our FAQ:
How to create a custom Template for FLEXIcontent module


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44324 by modernmagic
Ok.

Please confirm that you know that if I do what you are telling me, that I can indeed have the module strip the text but keep the embedded iframe.

Joomla website builder at modernmagic.com
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44329 by ggppdk
Replied by ggppdk on topic strip text but not iframe
Hello

what you ask: is custom manipulation of some HTML

i say custom because there is no functionality to get <iframe> only


-- so create custom template and use a regular expression coded in PHP to match the
<iframe ...>...</iframe> and then print it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44348 by modernmagic
Ok.

I will research on "regular expression coded in PHP".

Thanks.

Joomla website builder at modernmagic.com

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #44351 by ggppdk
Replied by ggppdk on topic strip text but not iframe
Hello

the variable: $item->text inside the template file e.g.:
mod_flexicontent/tmpl/news.php

contains the items's description (it is inside 2 loops once for featured items and once for standard items)

Try something like (correct it !! if needed)
Code:
$tag = 'iframe'; $found = preg_match( '/<'.$tag.'[^>]*>(.*?)</'.$tag.'>/iu', $item->text, $matches ); if ($found) echo $matches[0]; else echo "not found";

Here are a collection of useful regular expressions:
www.catswhocode.com/blog/15-php- ... developers


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.337 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline