Comment récupérer le nom réel du fichier stocké

More
11 years 3 days ago #36486 by webscom
Bonsoir,

Je continue ici un post que j'ai commencé pour un projet
(voir -> www.flexicontent.org/forum/index.php?f=15&t=6262&rb_v=viewtopic )

J'aimerai savoir comment on récupére dans un override de template le nom réel d'un fichier (voir capture)


Je récupérais le nom du fichier (pas réel donc) ainsi
Code:
<?php foreach ($this->item->positions['subtitle3'] as $field) : ?> <?php $fichier = $field->display; echo $fichier; preg_match('`href="([^"]+)"`i',$fichier,$chemin); preg_match_all("/(<([\w]+)[^>]*>)(.*?)(<\/\\2>)/", $fichier, $matches, PREG_SET_ORDER); foreach ($matches as $val) { $nom_du_fichier = $val[3]; } $chemin = $chemin[1].'/'.$nom_du_fichier;

mais avec ceci je ne récupère que le nom (variable -> $nom_du_fichier)

Merci d'avance pour votre aide
Attachments:

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

More
11 years 2 days ago #36495 by webscom
Bonjour à tous,

Je me réponds, pour avoir trouvé comment faire ce matin.

J'ai étudié le plugin 'file' et modifier le fichier '\plugins\flexicontent_fields\file\file.php'

Ligne 390:
Code:
$name_html = $file_data->altname; // no download button, force display of filename

est devenue:
Code:
//$name_html = $file_data->altname; // no download button, force display of filename $name_html= $file_data->filename; // no download button, force display of filename

Evidemment je ne sais pas si c'était la meilleur solution mais en tout cas c'était pour moi la plus rapide.

En tout cas j'avance dans mon projet, je m'attaque maintenant à l'affichage dans un module de news (genre news GK4), je vais voir ce qui est le plus simple...

Merci au développeur de Flexicontent, l'air de rien c'est un CCK très facile d'utilisation.

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

More
11 years 2 days ago #36501 by micker
merci pour le retour
pour le module la meilleure marche à suivre
va dans la faq ta un article sur les remplacés pour le modules universel
tu créer un dossier dans le tmpl du module flexicontent
Après regarde comment news.php est fait
clean et ajoute tes css et javascript
fait nous tes retours
à plus

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.

More
11 years 2 days ago #36531 by ggppdk

webscom wrote: Bonjour à tous,

Je me réponds, pour avoir trouvé comment faire ce matin.

J'ai étudié le plugin 'file' et modifier le fichier '\plugins\flexicontent_fields\file\file.php'

Ligne 390:

Code:
$name_html = $file_data->altname; // no download button, force display of filename

est devenue:
Code:
//$name_html = $file_data->altname; // no download button, force display of filename $name_html= $file_data->filename; // no download button, force display of filename

Evidemment je ne sais pas si c'était la meilleur solution mais en tout cas c'était pour moi la plus rapide.

En tout cas j'avance dans mon projet, je m'attaque maintenant à l'affichage dans un module de news (genre news GK4), je vais voir ce qui est le plus simple...

Merci au développeur de Flexicontent, l'air de rien c'est un CCK très facile d'utilisation.


Hello,
File field has a parameter to display filename


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