Kunena Menu
Modifier lecteur audio
8 years 10 months ago #46734
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Modifier lecteur audio
un peu de lecture :
www.joomlack.fr/blog/187-page-builder-ov...ent-in-your-template
mais je suis sur que tu l'as déjà vu
www.joomlack.fr/blog/187-page-builder-ov...ent-in-your-template
mais je suis sur que tu l'as déjà vu
Joomlack Webmaster and Developer
The following user(s) said Thank You: Laurentfrom47
Please Log in or Create an account to join the conversation.
- Laurentfrom47
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 91
- Thank you received: 2
8 years 10 months ago #46738
by Laurentfrom47
Replied by Laurentfrom47 on topic Modifier lecteur audio
Et oui, parfait, merci, je regarde ça aujourd'hui
Please Log in or Create an account to join the conversation.
- Laurentfrom47
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 91
- Thank you received: 2
8 years 10 months ago - 8 years 10 months ago #46744
by Laurentfrom47
Replied by Laurentfrom47 on topic Modifier lecteur audio
Re, voila mon override mais ça marche pas
Merci.
Code:
<?php
defined('_JEXEC') or die;
$attrs = $item->find('.tab_audio');
$params = PagebuilderckFrontHelper::createParamsFromElement($attrs);
$audiosrc = PagebuilderckFrontHelper::getSource($params->get('audiourl'));
$html ='<audio style="width:100%;box-sizing:border-box;max-width:100%;" controls controlsList="nodownload" src="' . $audiosrc . '" ' . ($params->get('autoplayyes') == 'checked' ? 'autoplay' : '') . '>'
. 'Your browser does not support the audio element.'
. '</audio>';
$html2 = preg_replace('#<div class="audiock">(.*?)<\/div>#is', $html, $item->innertext);
return $html2;
?>
Merci.
Last edit: 8 years 10 months ago by Laurentfrom47.
Please Log in or Create an account to join the conversation.
8 years 10 months ago #46745
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Modifier lecteur audio
tu n'as pas lu la petite note ?
ton fichier doit être comme ceci
Note that you must put the html code in the $html variable to make it work.
ton fichier doit être comme ceci
Code:
<?php
defined('_JEXEC') or die;
$attrs = $item->find('.tab_audio');
$params = PagebuilderckFrontHelper::createParamsFromElement($attrs);
$audiosrc = PagebuilderckFrontHelper::getSource($params->get('audiourl'));
$html ='<audio style="width:100%;box-sizing:border-box;max-width:100%;" controls controlsList="nodownload" src="' . $audiosrc . '" ' . ($params->get('autoplayyes') == 'checked' ? 'autoplay' : '') . '>'
. 'Your browser does not support the audio element.'
. '</audio>';
$html = preg_replace('#<div class="audiock">(.*?)<\/div>#is', $html, $item->innertext);
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
8 years 10 months ago #46746
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Modifier lecteur audio
je vais réfléchir à mon systeme d'override, je pense qu'il peut etre amélioré.
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
- Laurentfrom47
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 91
- Thank you received: 2
8 years 10 months ago #46747
by Laurentfrom47
Replied by Laurentfrom47 on topic Modifier lecteur audio
Ah oui merdoum désolé, par contre ça marche pas là, j'ai bien vérifié, dans le dossier html de mon template
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds




