Modifier lecteur audio

Replied by ced1870 on topic Modifier lecteur audio

Posted 6 years 2 months ago #46746
je vais réfléchir à mon systeme d'override, je pense qu'il peut etre amélioré.

Joomlack Webmaster and Developer

by ced1870

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

Replied by Laurentfrom47 on topic Modifier lecteur audio

Posted 6 years 2 months ago #46747
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.

Replied by Laurentfrom47 on topic Modifier lecteur audio

Posted 6 years 2 months ago #46748
ah faut peut être re créer et placer l'élément ?

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

Replied by ced1870 on topic Modifier lecteur audio

Posted 6 years 2 months ago #46749

Laurentfrom47 wrote: Ah oui merdoum désolé, par contre ça marche pas là, j'ai bien vérifié, dans le dossier html de mon template

tu as bien créé le dossier "pagebuilderck" ?

html/pagebuilderck/audio.php

Joomlack Webmaster and Developer

by ced1870

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

Replied by Laurentfrom47 on topic Modifier lecteur audio

Posted 6 years 2 months ago #46750
Oui oui bien sur, je vérifie un truc parce que j'utilise article anywhere donc c'est peut être en cause...

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

Replied by Laurentfrom47 on topic Modifier lecteur audio

Posted 6 years 2 months ago #46751
Non idem, dans le plugin il y a la variable $html2
Code:
public function onPagebuilderckRenderItemAudio($item) { $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 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; }

Mon override :
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:50%;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);

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

Time to create page: 0.700 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1165 guests and one member online