- Posts: 2
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- K2 category introtext view, iframe Youtube video not showing
K2 category introtext view, iframe Youtube video not showing
- Peter Lilkendey
-
Topic Author
- Offline
- New Member
Less
More
8 years 8 months ago #157036
by Peter Lilkendey
K2 category introtext view, iframe Youtube video not showing was created by Peter Lilkendey
Hi everyone,
I understand this was asked before in another topic I searched but did not help my situation. I updated to the latest JW 4.8.0 development to see if that would alleviate the issue or maybe there was a change or step I am unaware of.
I am running Joomla 3.6.2, JW allVideos 4.8.0 per the suggestion to use the latest dev version to see if it alleviates, and am having the problem in K2 category view introtext. I have the iframe code in the IntroText in K2 item editor as follows:
<iframe width="853" height="480" src="www.youtube.com/embed/M7W7rHxTsH0?rel=0" seamless="seamless" allowfullscreen="allowfullscreen">
This is the hacking democracy - full documentary category article at: worldwidecorruption.com/topics/politics
Im still trying out stuff as I type this but am stuck so thought I would ask the community for suggestions.
Thanks,
Pete
I understand this was asked before in another topic I searched but did not help my situation. I updated to the latest JW 4.8.0 development to see if that would alleviate the issue or maybe there was a change or step I am unaware of.
I am running Joomla 3.6.2, JW allVideos 4.8.0 per the suggestion to use the latest dev version to see if it alleviates, and am having the problem in K2 category view introtext. I have the iframe code in the IntroText in K2 item editor as follows:
<iframe width="853" height="480" src="www.youtube.com/embed/M7W7rHxTsH0?rel=0" seamless="seamless" allowfullscreen="allowfullscreen">
This is the hacking democracy - full documentary category article at: worldwidecorruption.com/topics/politics
Im still trying out stuff as I type this but am stuck so thought I would ask the community for suggestions.
Thanks,
Pete
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 8 months ago #157078
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 category introtext view, iframe Youtube video not showing
If you are using a word limit, then all HTML tags are being stripped.
I would suggest using the media tab and showing the item's video in the category view.
I would suggest using the media tab and showing the item's video in the category view.
Please Log in or Create an account to join the conversation.
- siamnaulak
-
- Offline
- Senior Member
Less
More
- Posts: 40
8 years 7 months ago #158015
by siamnaulak
Replied by siamnaulak on topic K2 category introtext view, iframe Youtube video not showing
Instead of opening new topic let me ask my problem here as it is somehow related.
Is it possible I use Intro text limit and still retain text formatting in category listing?
imgur.com/a/a3SC7
Is it possible I use Intro text limit and still retain text formatting in category listing?
imgur.com/a/a3SC7
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 7 months ago #158017
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 category introtext view, iframe Youtube video not showing
If you are using a word limit, then all HTML are stripped, so your issue is indeed related.
Please Log in or Create an account to join the conversation.
- siamnaulak
-
- Offline
- Senior Member
Less
More
- Posts: 40
8 years 7 months ago #158032
by siamnaulak
Replied by siamnaulak on topic K2 category introtext view, iframe Youtube video not showing
If there a way (or small hack) to use word limit and still maintained the HTML?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 7 months ago #158035
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 category introtext view, iframe Youtube video not showing
You can use a function like this
stackoverflow.com/questions/965235/how-can-i-truncate-a-string-to-the-first-20-words-in-php
alongside with strip_tags() php.net/manual/en/function.strip-tags.php in case the layout breaks.
This should be applied to the introtext of the overriden category_item.php file. You can find more on overrides here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
stackoverflow.com/questions/965235/how-can-i-truncate-a-string-to-the-first-20-words-in-php
alongside with strip_tags() php.net/manual/en/function.strip-tags.php in case the layout breaks.
This should be applied to the introtext of the overriden category_item.php file. You can find more on overrides here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Please Log in or Create an account to join the conversation.
- siamnaulak
-
- Offline
- Senior Member
Less
More
- Posts: 40
8 years 7 months ago #158039
by siamnaulak
Replied by siamnaulak on topic K2 category introtext view, iframe Youtube video not showing
Looks like not as simple as I guess.
Will it be too much for you if I ask which which code to paste where?
Will it be too much for you if I ask which which code to paste where?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 7 months ago #158062
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 category introtext view, iframe Youtube video not showing
The easiest way would be to use a separate editor for the introtext and one for the fulltext. This will provide the utmost control over your content.
Furthermore you can use K2's video tab in order to control the visibility of the video in category/ item views.
Furthermore you can use K2's video tab in order to control the visibility of the video in category/ item views.
Please Log in or Create an account to join the conversation.
- siamnaulak
-
- Offline
- Senior Member
Less
More
- Posts: 40
8 years 7 months ago #158110
by siamnaulak
Replied by siamnaulak on topic K2 category introtext view, iframe Youtube video not showing
Thank you so much Krikor for your help. Let me see what I can do.
My last option will be to show just the title like in default Joomla Category List.
My last option will be to show just the title like in default Joomla Category List.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 7 months ago #158121
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 category introtext view, iframe Youtube video not showing
You can move the iframe to video tab and use K2 video's block.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- K2 category introtext view, iframe Youtube video not showing