Champs "embeded video"

More
11 years 6 months ago #28872 by vanessathi
Actuellement, pour mes champs vidéos j'ai créer un champ texte. Dedans, j'y met le lien "embed" que me donne Youtube ou Viméo.

Exemple youtube :
<iframe width="560" height="315" src="
" frameborder="0" allowfullscreen>

Exemple Vimeo :
<iframe src=" player.vimeo.com/video/48495106?title=0&...ine=0&portrait=0 " width="800" height="450" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>

je les entoure de <p> et </p>

Comme j'utilise ces champs dans plusieurs templates, j'aimerais pouvoir changer les tailles des vidéos selon les templates que j'utilise, ou pour garder le même système que les images, creer 2-3 "résolutions" différentes, selon si c'est vu en catégorie view, en Item view, ...

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

More
11 years 6 months ago #28876 by ggppdk
Replied by ggppdk on topic Champs "embeded video"
You could do this if you use a joomla video plugin that has such options (i don't know of any, check various joomla video plugins to see if they have such options)

... i guess it will be possible in future video plugin that we plan to create

another option would be to do some manipulation inside your template with a simple replacement like:
e.g. if the name of your text field is videofieldname

just AT THE BEGINNING of the for OR foreach loop that prints the items in category_items.php of you FLEXIcontent template (duplicate an existing one)
Code:
<?php if (JRequest::getVar('view') == category) { $vidhtml = $items[$i]->fields['videofieldname']->display; $vidhtml = str_replace('width="800" height="450"', 'width="300" height="200"', $vidhtml); $items[$i]->fields['videofieldname']->display = $vidhtml; ?>

NOTE you may have to correct the code above


-- 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
11 years 6 months ago #28891 by vanessathi
Replied by vanessathi on topic Champs "embeded video"
Hi, thank you for reply,

Great :) the tip to replace string in each template, exactly what I need :)

I need these videos to be a flexicontent field because I put videos in several item, with descriptions, pictures, and a lot of other informations, and I have a menu item "videos" where I display, in blog mode, all videos of the website.

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

More
11 years 6 months ago #28896 by vanessathi
Replied by vanessathi on topic Champs "embeded video"
Ca marche bien le remplacement de chaîne.

J'ai eu une notification sur l'utilisation de la constante "category", et je suis déjà dans le template "category_items.php", donc je ne pense pas avoir besoin de specifier la vue "category".
Je n'ai pas tout compris aux 3 autres lignes (je me suis mise au php récement), alors j'ai procédé comme suit :
Code:
<?php foreach ($items[$i]->positions['under-description-line1'] as $field) : ?> <?php $contenttodisplay = $field->display; ?> <?php if ($field->name = "videofieldname") : ?> <?php $contenttodisplay = str_replace('width="800" height="450"', 'width="400" height="225"', $contenttodisplay); ?> <?php endif; ?> <span class="value field_<?php echo $field->name; ?>"><?php echo $contenttodisplay; ?></span> <?php endforeach; ?>
Ca marche aussi :)

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

More
11 years 6 months ago #28898 by micker
Replied by micker on topic Champs "embeded video"
cool que tu ais trouve une solution a ton probleme
Merci pour le partage

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.290 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