Bin ja noch nich so "per Du" mit den neuen Funktionen
Lightbox anpassen (html in lightbox caption) [SOLVED]
Lightbox anpassen (html in lightbox caption) [SOLVED]
Kurze Frage: Wie kann ich die Full-View-Größe der Lightbox Bilder anpassen (es scheint mir nicht die Originalgrpöße der Bilder zu sein)? Jemand ne Idee? Auch würde mich brennen interessieren wie ich html in den Bildunterschriften aktivieren kann, das würde nämlich eine Armada an tollen Möglichkeiten eröffnen
(Na, wenigstens diese [EXT] Dinger hätten doch funzen können).
Bin ja noch nich so "per Du" mit den neuen Funktionen
Bin ja noch nich so "per Du" mit den neuen Funktionen
Last edited by phalancs on Tue 5. Feb 2008, 18:12, edited 1 time in total.
2008
Re: Lightbox anpassen
Code: Select all
$phpwcms['img_prev_width'] = 1200; //max width of the large preview image
$phpwcms['img_prev_height'] = 800; //max height of the large preview image
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Re: Lightbox anpassen
"groß"artig. Danke 
Nu muss ich mir nur noch die Bildunterschriften vorknöpfen.
Nu muss ich mir nur noch die Bildunterschriften vorknöpfen.
2008
Re: Lightbox anpassen
Na dann... lies mal hier, vielleicht hilft das weiter:
http://forum.phpwcms.org/viewtopic.php? ... ge+caption
Auf jeden Fall geht so was wie [br]usw standardmässig schon...
http://forum.phpwcms.org/viewtopic.php? ... ge+caption
Auf jeden Fall geht so was wie [br]usw standardmässig schon...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Cutomizing Lightbox Captions (enable HTML)
Cutomizing Lightbox Captions (enable HTML)
Liebe Freunde des CMS Customizing, ich habe folgende Lösung gefunden um HTML in den Captions der Lightbox zu aktivieren:
open include/inc_lib/cnt2.readform.inc.php
FIND
REPLACE WITH
open include/inc_front/img.func.inc.php
FIND
REPLACE WITH
Basicall you just need to change 2 lines in 2 files 
As there is no real clearing of the caption string anymore, please be sure with what you do.
Liebe Freunde des CMS Customizing, ich habe folgende Lösung gefunden um HTML in den Captions der Lightbox zu aktivieren:
open include/inc_lib/cnt2.readform.inc.php
FIND
Code: Select all
$content["image_caption"] = clean_slweg($_POST["cimage_caption"]);
Code: Select all
//enym: Enable html in Lightbox Caption
//$content["image_caption"] = clean_slweg($_POST["cimage_caption"]);
$content["image_caption"] = $_POST["cimage_caption"];
FIND
Code: Select all
$caption[0] = html_specialchars($caption[0]);
Code: Select all
//enym
//$caption[0] = html_specialchars($caption[0]);
$caption[0] = $caption[0];
As there is no real clearing of the caption string anymore, please be sure with what you do.
2008
Re: Cutomizing Lightbox Captions (enable HTML)
Hi phalancs,
thank you.
Well, I right now did a test. As this hack affects CP images i tried to place some HTML tags in the caption field.
OK it works, at least that way, that --> now the --> tags aren't 'html_specialchars'-ed [stripped off] anymore, but --> remains in the caption field. If you have --> lightbox enabled and click the image all this caption HTML code is displayed below the image and can be styled with CSS. So far, so good.
On the other hand the --> caption [as already mentioned in the parallel thread: http://forum.phpwcms.org/viewtopic.php?f=16&t=16199 ] is rendered to the image TITLE --> title="...caption....".
As a consequence of this, when you are on the article page and hold the mouse over the images --> the HTML code as TITLE pop ups...
Am I wrong?
What else need to be changed -- btw: there ARE many files affecting image captions next to /include/inc_lib/content/cnt2.readform.inc.php -- [but keeps other CPs' output untouched?]
Wouldn't it be easier to add one additional field 'image description' to be shown with lightbox....???
[best solution: read out IPTC/EXIF data automatically to image description field
]
thank you.
Well, I right now did a test. As this hack affects CP images i tried to place some HTML tags in the caption field.
OK it works, at least that way, that --> now the --> tags aren't 'html_specialchars'-ed [stripped off] anymore, but --> remains in the caption field. If you have --> lightbox enabled and click the image all this caption HTML code is displayed below the image and can be styled with CSS. So far, so good.
On the other hand the --> caption [as already mentioned in the parallel thread: http://forum.phpwcms.org/viewtopic.php?f=16&t=16199 ] is rendered to the image TITLE --> title="...caption....".
As a consequence of this, when you are on the article page and hold the mouse over the images --> the HTML code as TITLE pop ups...
Am I wrong?
What else need to be changed -- btw: there ARE many files affecting image captions next to /include/inc_lib/content/cnt2.readform.inc.php -- [but keeps other CPs' output untouched?]
Wouldn't it be easier to add one additional field 'image description' to be shown with lightbox....???
[best solution: read out IPTC/EXIF data automatically to image description field
What does this mean...?phalancs wrote:...As there is no real clearing of the caption string anymore, please be sure with what you do.
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
OK, da ich die Captions in der preview nicht zeige, ist mir das wahrscheinlich wurscht gewesen, aber dafür gibts auch nen easy trick.
Irgendwo in dem img.. datei wird das title Tag definiert, dort musste damnn wohl einfach ein clean_slweg() um die Variable jagen und die Html dinger verschwinden aus der anzeige.
Irgendwo in dem img.. datei wird das title Tag definiert, dort musste damnn wohl einfach ein clean_slweg() um die Variable jagen und die Html dinger verschwinden aus der anzeige.
Last edited by phalancs on Tue 5. Feb 2008, 23:53, edited 1 time in total.
2008
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
ja klar, aber dann ist der --> title im zweifelsfall bei --> allen CPs, die ein -->image ausgeben, --> futsch !!??
[edit]
ne, warte, umgekehrt - ähh, dann ist der title --> leer !!??
[/edit]
[edit]
nee, nicht leer, aber voll mit plain text ohne punkt und komma...
gut, geht zur not || stell dir vor, du hast einen table im caption-feld, dann knallt's alle td inhalte aneinander???!??
[/edit]
[edit]
ne, warte, umgekehrt - ähh, dann ist der title --> leer !!??
[/edit]
[edit]
nee, nicht leer, aber voll mit plain text ohne punkt und komma...
gut, geht zur not || stell dir vor, du hast einen table im caption-feld, dann knallt's alle td inhalte aneinander???!??
[/edit]
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
ich weiss nicht 100 pro was diese funktion alles rausschmeisst, aber für das, was ich den Captions zumute funzt es bisher (und ne Tabelle gehört da nicht dazu) 
Also mir ging es primär darum in die Captions einen Link und ggf. ein Bild reinzubasteln. das mit dem Link funktioniert und das mit dem Bild hab ich noch nich getestetm, aber da bin ich mal ganz optimistisch.
P.S. Auf dieses title Tag könnte ich sowieso komplett verzichten, da es bei der Lightbox irgendwie irrelevant ist. Wenns also da Probleme gibt, dann schmeiss ich es auch raus. Abe rmit dem Cleaning hat es bisher gut geklappt.
Also mir ging es primär darum in die Captions einen Link und ggf. ein Bild reinzubasteln. das mit dem Link funktioniert und das mit dem Bild hab ich noch nich getestetm, aber da bin ich mal ganz optimistisch.
P.S. Auf dieses title Tag könnte ich sowieso komplett verzichten, da es bei der Lightbox irgendwie irrelevant ist. Wenns also da Probleme gibt, dann schmeiss ich es auch raus. Abe rmit dem Cleaning hat es bisher gut geklappt.
2008
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
pragmatism practised by pragmatist 
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
So wird man wen man lange mit diesem system arbeitet. 
2008
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
schon richtig!
halte aber gleichsam für wichtig, dass es für alles und immer [und kunde] fluppt....
sozusagen --> proofed, generalized und workflow optimized
[ich krieg immer haue von ollie, wenn ich inne files rum mache....]
halte aber gleichsam für wichtig, dass es für alles und immer [und kunde] fluppt....
sozusagen --> proofed, generalized und workflow optimized
[ich krieg immer haue von ollie, wenn ich inne files rum mache....]
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
hehe, genau deswegen mach ich das ja so. Anders fluppt es ja für den Kunden nicht. Ja ansonsten geb ich Dir völlig recht, Corechanges sollte man vermeiden. Diesem "sollte" hab ich aber vor zwei Jahren abgeschworen.
Daher kaqm auch mein Zusat, dass man das nur machen soll, wenn man weiss was man tut. Wie ss immer so ist mit Hacks und Co
Daher kaqm auch mein Zusat, dass man das nur machen soll, wenn man weiss was man tut. Wie ss immer so ist mit Hacks und Co
2008
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
Jappphalancs wrote:...dass man das nur machen soll, wenn man weiss was man tut...
ist dir dabei die "gepimpte v1.2.6" noch nie um die ohren geflogen???phalancs wrote:ich weiss nicht 100 pro was diese funktion alles rausschmeisst...
Re: Lightbox anpassen (html in lightbox caption) [SOLVED]
Nein, ist noch nie etwas um die Ohren geflogen.
Das hab ich salopp so geschrieben, da ich in diesem Falle nur nachgeschaut ob es für meinen Zweck reicht. Und das tut es. Sorry, aber ohne meine Standard-Veränderungen im Kern wäre phpwcms für mich nur halb so viel Wert. Schön ist das nicht. Aber gerade da ich jetzt einmal eine Seite nicht auf meiner "gepimpten 1.2.6" aufbaue, fällt mir das wieder schmerzlich auf.
Das hab ich salopp so geschrieben, da ich in diesem Falle nur nachgeschaut ob es für meinen Zweck reicht. Und das tut es. Sorry, aber ohne meine Standard-Veränderungen im Kern wäre phpwcms für mich nur halb so viel Wert. Schön ist das nicht. Aber gerade da ich jetzt einmal eine Seite nicht auf meiner "gepimpten 1.2.6" aufbaue, fällt mir das wieder schmerzlich auf.
2008