Latest Posts
Keine neuen Beiträge
Advert
Codepaste - Details
Weitere Infos zum Codepaste

Name Lightbox bei Board-Attachments
Autor de Tom08
CMS-Version Clansphere 2009
Datei board/thread.php
Datum 03.02.2010 um 15:40 Uhr
Beschreibung Auf Nachfrage ein kleines Update meines alten Codepastes.
(http://www.csphere.eu/modules/codepaste/view/id/74)

Funktion: Fügt einen Link für die Lightbox hinzu, wenn es sich beim Attachment/Anhang um ein Bild handelt.
Alter Code Alter Code
Neuer Code Neuer Code
Zurück - Übersicht

Kommentare: 2
Seite < [1] >
Tweety

12.03.2010

Ort: -
Beiträge: 19
# 1 - 03.02.2010 um 18:51 Uhr

Vielen herzlichsten Dank für das schnelle Update.

Es funzt super !!!
RuGer

05.02.2010

Ort: -
Beiträge: 111
# 2 - 05.02.2010 um 20:43 Uhr

1. "/system/core/runstartup/lightbox.php" - wtf???
"/system/runstartup/lightbox.php" - so wäre doch richtig, oder!?

2. alles richtig gemacht, mehrfach kontrolliert: steht leider nur "{com_files:file}" anstatt "Lightbox"...

Fehler gefunden, Korrektur:

I) /mods/board/thread.php

Falsh:
1.
2.
3.
4.
5.
1. / 2. / ...  if($ext == 'jpg' OR $ext=='JPG' OR $ext == 'jpeg' OR $ext=='JPEG' OR $ext == 'gif' OR $ext=='GIF' OR $ext == 'bmp' OR $ext=='BMP' OR $ext == 'png' OR $ext=='PNG'){
            
$data['comment'][$run]['com_files'][$run]['lb'] = cs_html_br(1) . '<a href="uploads/board/files/'.$cs_comments_files[$run2]['boardfiles_id'].'.'$ext '"  rel="lightbox" >Lightbox</a>';
            }else{
            
$data['comment'][$run]['com_files'][$run]['lb'] = '';
            }


Richtig:
1.
2.
3.
4.
5.
1. / 2. / ...  if($ext == 'jpg' OR $ext=='JPG' OR $ext == 'jpeg' OR $ext=='JPEG' OR $ext == 'gif' OR $ext=='GIF' OR $ext == 'bmp' OR $ext=='BMP' OR $ext == 'png' OR $ext=='PNG'){
            
$data['comment'][$run]['com_files'][$run2]['lb'] = cs_html_br(2) . '<a href="uploads/board/files/'.$cs_comments_files[$run2]['boardfiles_id'].'.'$ext '"  rel="lightbox" >Lightbox</a>';
            }else{
            
$data['comment'][$run]['com_files'][$run2]['lb'] = '';
            }


II) /themes/base/board/thread.tpl

Folgendes 2x durchführen!
--------------
Suche nach
--------------
{files:file}

-------------------
Füge danach ein
-------------------
{files:lb}

+

--------------
Suche nach
--------------
{com_files:file}

-------------------
Füge danach ein
-------------------
{com_files:lb}

---------------------------------------
Speichern und wieder hochladen!
---------------------------------------

Jetzt funzt es super !!!


Zuletzt editiert von RuGer, am 05.02.2010 um 21:51 Uhr (1x Editiert)


Bitte Login benutzen, um Kommentare zu schreiben.