1. Forum
    1. Themen Übersicht
  2. Hilfe
  3. Forenregeln
  4. Mitglieder
    1. Team
    2. Mitgliedersuche
  5. Webseite
  6. Archiv
  • Anmelden
  • Registrieren
  • Suche

Neuigkeiten

Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche

Neuigkeiten

Letzte Beiträge
  1. JoomGallery 3.x JUX für Joomla! 3
  2. Alle Beiträge zur JoomGallery 3.x JUX
  3. Frontend - JG 3.x

Suggestion: Do not generate EXIF data as HTML outside of template

  • whistler
  • 11. August 2020 02:22
  • Erledigt
1. offizieller Beitrag
  • whistler
    Benutzer
    Reaktionen
    4
    • 11. August 2020 02:22
    • #1

    I am working on my gallerys detail view and wanted to add the EXIF data. To my surprise they are generated in the model already as HTML.

    Trying to retrieve the exif data to place them into my customized data by calling $this->exifdata returns a HTML structure like this:

    Code
    <div class="jg_row1">
        <div class="jg_exif_left">
              Camera Make (Manufacturer)        
        </div>
        <div class="jg_exif_right">
              SONY&nbsp;        
        </div>     
    </div> 

    The issue is - if you have a custom template override, this will not work. It would be much better if this would be simply output as data under $this->exifdata and the template should handle the html of this and not the model.

    I will look into fixing this in the function in the model for detail view and report on this, but it would be great if it would be incorporated as a principle that model files should not output HTML and leave that to the template.

    • Zitieren
  • Elfangor93
    Moderator
    Reaktionen
    188
    • 11. August 2020 07:08
    • Offizieller Beitrag
    • #2
    Zitat

    principle that model files should not output HTML and leave that to the template.

    I agree with that.

    If you like, modifying it on GitHub and create a pullrequest. If the community likes it, it will be changed in the next version.

    Wir sind auf der Suche nach Helfern für die JoomGallery 4 Entwicklung!
    Melde dich bei Interesse bei mir (Elfangor93).
    (Verfügbare Jobs: PHP-Entwicklung, Testen, Übersetzen, Dokumentation)

    • Zitieren
  • whistler
    Benutzer
    Reaktionen
    4
    • 16. Dezember 2020 21:07
    • #3

    Sorry, not on Github, but finally got time to look into this. Solution is super simple.

    In the model for the detail view, just add this on line 630

    Code
            $this->_exifdata  = $exif_array;
          return true;

    you could obviously add a setting in the configuration if the user wants a data or graphical output of the EXIF data and encapsulate this into an if condition.

    From here onwards, the data are easily used in the template directly and can be used in any way you want and anywhere in the design you want.

    • Zitieren

Letzte Beiträge

  • URLs nach Update auf JoomGallery4 und SH404SEF /4SEF

    Elfangor93 2. Juli 2025 06:35
  • Looking to replicate JG3 Gallery / Category View under JG4

    GJSchaller 1. Juli 2025 20:01
  • What can you do with Tags?

    FriendlyUser 30. Juni 2025 22:40
  • JG3 Bilder als Artikelbild verlinkt - Welche Migrationseinstellung erhält die Dateipfade?

    MrMusic 30. Juni 2025 10:21
  • JoomGallery for Joomla 4

    MrMusic 26. Juni 2025 13:53
  • Bearbeiten von Bildern nicht möglich

    kaufi88 26. Juni 2025 11:11
  • URLS nach Migration auf JG4

    Elfangor93 25. Juni 2025 12:45
  • Inconsistent category folder paths defined in the database of your JG3 tables

    MrMusic 24. Juni 2025 15:49
  • JoomImages Module in Joomgallery 4

    Elfangor93 17. Juni 2025 09:07
  • 4SEF have native support for JoomGallery

    Elfangor93 17. Juni 2025 08:36

Tags

  • detail view
  1. Datenschutzerklärung
  2. Impressum
Community-Software: WoltLab Suite™