video thumbnail in category layout blog view

More
10 years 9 months ago #44665 by kogos
Hello... I have a little problem displaying video thumbnail in category view. Let me explain:

I have a menu item assigned to a flex category so i can see a nice blog view of articles in a single category. I set the category to strip the first image of every article and display the thumbnail on the right side of the blog layout.
I am also using a nice little plugin to convert youtube urls (full ulrs) to video iframe and a div with the video screenshot inside (something like this: extensions.joomla.org/extensions/social-...video-channels/26247 , but a bit more advanced to produce the video screenshot as well. So, i only copy/paste the video url in the article, and the plugin converts it to youtube iframe and video screenshot when the article is shown in joomla frontend. It works great when viewing the item/article. But when i go to blog view to see all articles in the category, the screenshot is not displayed.

My guess is that the plugin i use (and no plugin whatsoever) is not triggered when on blog view, so there is no actual image to strip, because youtube url is not converted to image through the plugin.

I know that there is a "dirty" workaround for this, create a custom field and set it to show above/below description, float the field's div so it gets into place and display:none the video frame, so that only video screenshot is shown, but i was looking forward for a cleaner solution.

To add to that, the above "dirty" solution is not actually practical, since when having an article with both youtube video and normal pictures, category layout will show both first stripped image and video.

Thanks in advance for you time and any replies i might get on this.

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

More
10 years 9 months ago #44668 by ggppdk
Hello

1. where is the plugin code added ?
- inside the description text (description field) of the item ?
2. it is a content plugin and not a system plugin, right ?


then please go to description field
- select to trigger content plugins
- select to trigger content plugins in category view
- select NONE plugin in CONTENT plugin list = trigger ALL
- save and test


-- 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 #44674 by kogos
unfortunately that didn't work... to give more info:

- the plugin code is added in the description field.
- it is indeed a content plugin and not a system plugin.

What the plugin does is this: It searches the html code of the description and if it finds a valid youtube url, it replaces any reference of "
" with
Code:
<img src="http://i.ytimg.com/vi/my_video/0.jpg">
and
Code:
<iframe class="my_video" style="float:left; margin: 10px; " width="450" height="250" src="//www.youtube.com/embed/my_video" frameborder="0" allowfullscreen></iframe>

So, when i insert a youtube url anywhere inside an article, i get a screenshot and a video iframe. I thought that the screenshot could be used for the blog category layout, but it's not working...

Tests i've made so far:
- i did the steps you suggested. Actually i have already checked those, but i double checked just in case. I also tried to select all plugins, and the specific plugin. trigger content plugin and trigger content plugin in category view is selected at all times.
- I also tried to create a new field, load the video in that field (so i have a screenshot and an iframe in the custom field area) and then modified category_item.php to look for the image in the custom field (i got the info on how to do it from another post you've written in the past: www.flexicontent.org/forum/index.php?f=21&t=7414&rb_v=viewtopic ). Again, no luck...

I should also note i'm on the latest joomla and flexicontent stable versions. I also tried the latest flexi nightly build, with no success.
As a sidenote, when trying to download the latest flexicontent stable version, the filename ends with _beta.zip, which is a bit misleading (com_flexicontent_v2.1.2_r1806_J25_J32_beta.zip).

Thanks again for your time.

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

More
10 years 9 months ago #44675 by kenmcd
I am looking at the code in the Youtube Simple Embed plug-in and nothing in there is going to produce a link to a YouTube preview image.
The only thing it does in insert an iframe, and then YouTube puts a player in that iframe based on the client.
The player then displays a preview image.
So what you are trying to do is insert multiple players on the blog page.
YouTube does have a minimum embed size for the player, so that may be an issue.

You could make a field which would insert a YouTube preview image based on just the video ID.
Code:
120px × 90px http://i.ytimg.com/vi/VIDEO_ID/default.jpg 480px × 360px http://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg 640px × 480px http://i.ytimg.com/vi/VIDEO_ID/sddefault.jpg

The [c:250b0xgq] i.ytimg.com/vi/VIDEO_ID/0.jpg [/c:250b0xgq] link is the same as the 480px × 360px link.

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

More
10 years 9 months ago #44677 by kogos
The Youtube Simple Embed plug-in isn't able to produce the youtube preview image on its own... that's why i changed it to:
Code:
'<img src="http://i.ytimg.com/vi/$2/0.jpg"><iframe class="youtubesimpleembed" style="float: ' . $floating . '; margin: ' . $margin . 'px; " width="'.$width.'" height="'.$height.'" src="//www.youtube.com/embed/$2" frameborder="0" allowfullscreen></iframe>'
...so that i get the preview first, then the youtube iframe... This is why on the initial post i wrote that it is "something" like the youtube simple embed plug-in... the plugin's code was altered all along.

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

More
10 years 9 months ago #44679 by ggppdk

kogos wrote: unfortunately that didn't work... to give more info:

- the plugin code is added in the description field.
- it is indeed a content plugin and not a system plugin.

What the plugin does is this: It searches the html code of the description and if it finds a valid youtube url, it replaces any reference of "

" with ...


it is because we extract the image from the item description field, before any content plugins are trigger on the text !

will examine this, but no changes planned for next version


-- 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.362 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