Moin :)
Integrate Lightbox (http://custom.simplemachines.org/mods/index.php?mod=1158)
Features
o Integrates Slimbox to work with
- Attachments
- Non-Linked Images
- Text-based Links to images
o Prevents Slimbox from affecting images linked to page/urls
o Fixes Imageshack.us & Photobucket links to work with Slimbox
Installation
1. Obige Modifikation über den Paket-Manager installieren.
2. Erforderliche Anpassungen für das mx-port Template:
In Datei modules/Forum/smf/Themes/mx-port/index.template.php
Suche nach:
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';
Dahinter einfügen:
// Include the Lightbox Scripts (except for the stats page and SMF Garage)
if($context['current_action'] != 'stats' && $context['current_action'] != 'garage')
echo '
<!-- Integrate Lightbox Mod: Start -->
<!-- MooTools Includes -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/mootools1.11.js"></script>
<!-- Lightbox Includes -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/slimbox.js"></script>
<link rel="stylesheet" href="', $settings['default_theme_url'], '/slimbox.css" type="text/css" media="screen" />
<!-- Integrate Lightbox Mod: End -->';
In Datei modules/Forum/smf/Themes/mx-port/Display.template.php
Suche nach:
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" onclick="', $attachment['thumbnail']['javascript'], '"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
Ersetze mit:
echo '
<a href="', $attachment['href'], ';image" id="link_', $attachment['id'], '" rel="lightbox[smf]"><img src="', $attachment['thumbnail']['href'], '" alt="" id="thumb_', $attachment['id'], '" border="0" /></a><br />';
zum Testen (inkl. PREV u. NEXT):
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fwww.pragmamx.org%2Fmodules%2FSitebanner%2Fimages%2Fpragmamxbanner1.gif&hash=7996d8625172da9ac60b49b3d04c33bd2be349f4)
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fwww.pragmamx.org%2Fmodules%2FSitebanner%2Fimages%2Fpragmamxbanner3.gif&hash=578302077403a4dd734396418c1916d27837dd25)
geil .. dankeschön :)
nachtrag:
habs eingebaut - läuft hervorragend - nochmal vielen Dank dafür :) :thumbup:
Vielleicht ein kleiner Nachtrag für alle "Hosenschisser" so wie mich, die ein anderes Theme bzw. Template im Einsatz haben und sich nicht trauen...
Führt einfach beide vorgenannten Änderungen im Theme "mx-port" durch.
Dann geht in das aktuell von euch verwendete Theme und führt den Schritt eins:
Zitat von: Sitki am 18 Januar 2009, 11:05:43
Suche nach:
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';
Dahinter einfügen:
// Include the Lightbox Scripts (except for the stats page and SMF Garage)
if($context['current_action'] != 'stats' && $context['current_action'] != 'garage')
echo '
<!-- Integrate Lightbox Mod: Start -->
<!-- MooTools Includes -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/mootools1.11.js"></script>
<!-- Lightbox Includes -->
<script type="text/javascript" src="', $settings['default_theme_url'], '/slimbox.js"></script>
<link rel="stylesheet" href="', $settings['default_theme_url'], '/slimbox.css" type="text/css" media="screen" />
<!-- Integrate Lightbox Mod: End -->';
in der index.template.php eures Themes nocheinmal genau so durch, Schritt zwei entfällt in eurem Theme.
Und das Ganze sollte laufen.
Liebe Grüße
Markus
:thumbup: danke :drinks: