Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
| [ Anmelden zum schreiben ] |
| Lightbox | |||
|---|---|---|---|
| Fonsi1 Mitglied
Posts: 453 |
Hallo liebe Ilchler
Habe mir hier heute Mittag die Lightbox gedownloaded www.ilch.de/downloads-show-1085.html Funzt auch soweit super Ich habe mich soweit an die Beschreibung gehalten, die es hier im Forum gibt. www.ilch.de/forum-showposts-20803-p2.html Nun zu meiner Frage?? Wie bekomme ich das hin, dass ich in dem sich öffnenden Fenster auch die Pfeile habe,und ein Bild vor und zurück gehen kann,ohne das Fenster wieder zu schließen? Hier meine Lightbox css #lightbox{
position: absolute;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
line-height: 0;
}
#lightbox a img{ border: none; }
#outerImageContainer{
position: relative;
background-color: #fff;
width: 250px;
height: 250px;
margin: 0 auto;
}
#imageContainer{
padding: 10px;
}
#loading{
position: absolute;
top: 40%;
left: 0%;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
#hoverNav{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}
#prevLink, #nextLink{
width: 49%;
height: 100%;
background: transparent url(include/images/lightbox/blank.gif) no-repeat; /* Trick IE into showing hover */
display: block;
}
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(include/images/lightbox/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(include/images/lightbox/nextlabel.gif) right 15% no-repeat; }
#imageDataContainer{
font: 10px Verdana, Helvetica, sans-serif;
background-color: #fff;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%
}
#imageData{ padding:0 10px; color: #666; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
#imageData #caption{ font-weight: bold; }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
#imageData #bottomNavClose{ width: 66px; float: right; padding-bottom: 0.7em; }
#overlay{
position: absolute;
top: 0;
left: 0;
z-index: 90;
width: 100%;
height: 500px;
background-color: #000;
}
Gruß Fonsi |
||
| Lord|Schirmer Administrator
Posts: 4603 |
Stimmt der Bilderpfad include/images/lightbox/?
Werden die Bilder mit rel="lightbox[gruppe]" geöffnet? rel="lightbox" - bedeutet Einzelbildöffnung rel="lightbox[xyz]" - bedeutet alle Bilder mit xyz werden zusammen geöffnet "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
Super Lord|Schirmer
Es funzt in der Usergallery und in der Gallery. Habe zwar immer noch keine Pfeile. Kann aber trotzdem die Bilder durch klicken, wenn ich rechts oder links am rand klicke. Zitat Stimmt der Bilderpfad include/images/lightbox/?
Habe ich doch angegeben in der CSS #prevLink:hover, #prevLink:visited:hover { background: url(include/images/lightbox/prevlabel.gif) left 15% no-repeat; }
So jetzt hätte ich noch ne Frage? Das habe ich in die Design/Index gepackt <!-- LIGHTBOX --> <script type="text/javascript" src="include/includes/js/lightbox/js/prototype.js"></script> <script type="text/javascript" src="include/includes/js/lightbox/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="include/includes/js/lightbox/js/lightbox.js"></script> <link rel="stylesheet" href="include/includes/js/lightbox/css/lightbox.css" type="text/css" media="screen" /> und das in die include/includes/js/BBCodeGlobal.js var ersatz = document.createElement('a');
ersatz.setAttribute('href',src);
var newImg = document.createElement('img');
newImg.setAttribute('src',src);
newImg.setAttribute('width',w);
newImg.setAttribute('height',h);
newImg.setAttribute('border','0');
newImg.setAttribute('style',img.getAttribute('style',0));
ersatz.appendChild(newImg);
img.parentNode.replaceChild(ersatz,img);
$(ersatz).lightbox();
Zereisst es mir bei manchen Bilder die ich schon drin habe das Forum. Bei anderen Bildern öffnet sich ein neues Fenster. Habe es wieder aus den BBCode rausgenommen. Gruß Fonsi |
||
| Lord|Schirmer Administrator
Posts: 4603 |
Ich habe es Dir mal die Pfade der js & css angepasst!
css ../images/prevlabel.gif ../images/nextlabel.gif js include/includes/js/lightbox/images/loading.gif include/includes/js/lightbox/images/closelabel.gif include/images/lightbox -> gelöscht, war nicht nötig! "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
Danke Lord|Schirmer
Haste das wieder in die include/includes/js/BBCodeGlobal.js rein gemacht?? var ersatz = document.createElement('a');
ersatz.setAttribute('href',src);
var newImg = document.createElement('img');
newImg.setAttribute('src',src);
newImg.setAttribute('width',w);
newImg.setAttribute('height',h);
newImg.setAttribute('border','0');
newImg.setAttribute('style',img.getAttribute('style',0));
ersatz.appendChild(newImg);
img.parentNode.replaceChild(ersatz,img);
$(ersatz).lightbox();
Wenn du bei mir im Forum schaust unter Otti Jäger und Samler Dann weisst du was ich meine Gruß Fonsi |
||
| Lord|Schirmer Administrator
Posts: 4603 |
An der BBCodeGlobal.js war ich eigentlich nicht dran, ich habe es Dir wieder herausgenommen!
In [shot]...[/shot] für Screenshot, könnte ich dir ein funktionierendes Lightbox einbauen! "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
Das wäre super, wenn du das tuhn würdest.
|
||
| Fonsi1 Mitglied
Posts: 453 |
Das wäre super, wenn du das tuhn würdest.
|
||
| Lord|Schirmer Administrator
Posts: 4603 |
Habe es Dir geändert, sollte jetzt bei Screenshot/BBCODE [shot] funktionieren!
Info: Lightbox in die DESIGN/index.htm einbinden, damit Lightbox überall anwendbar ist! "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
Morgen Lord|Schirmer
Habe gerade ein Bild aus der Gallery genommen und es über Screenshot/BBCODE [shot] eingefügt. Funzt aber nicht also es öffnet sich nicht die Lightbox. Zitat Info: Lightbox in die DESIGN/index.htm einbinden, damit Lightbox überall anwendbar ist!
Habe doch das in der DESIGN/index.htm Zitat <!-- LIGHTBOX -->
<script type="text/javascript" src="include/includes/js/lightbox/js/prototype.js"></script> <script type="text/javascript" src="include/includes/js/lightbox/js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="include/includes/js/lightbox/js/lightbox.js"></script> <link rel="stylesheet" href="include/includes/js/lightbox/css/lightbox.css" type="text/css" media="screen" /> So weit ich das verstanden habe, ist das doch das einzige was da rein kommt. ODER?? |
||
| Lord|Schirmer Administrator
Posts: 4603 |
JA, das hast du auch richtig gemacht ABER ich gebe Dir mal einen TIP
design.ini -> index_forum.htm ![]() "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
hehe alles klar^^
Habe es doch tasächlich geschaft unglaublich hehe Habe jetzt ein Bild über [shot] eingefügt, aber wenn ich es anklicke wird es zimlich klein angezeigt. Kann ich nur für [shot] Lightbox die größe ändern In Gallery und Usergallery, wird die größe mit der Lightbox, richtig angezeigt. Gruß Fonsi Zuletzt modifiziert von Fonsi1 am 28.08.2010 - 10:39:50 |
||
| Lord|Schirmer Administrator
Posts: 4603 |
Die Größe der Bildanzeige von [shot] wird im Adminbereich/BBCODE-Konfiguration eingestellt! Lightbox zeight dann die originale Größe an!
"In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
Ja ich dachte eigentlich, das man die Lightbox größe. für shot größer machen kann
Habe noch mal versucht das anzupassen include/includes/js/BBCodeGlobal.js für img. Aber er macht es nicht auf var ersatz = document.createElement('a');
ersatz.setAttribute('href',src);
var newImg = document.createElement('img');
newImg.setAttribute('src',src);
newImg.setAttribute('width',w);
newImg.setAttribute('height',h);
newImg.setAttribute('border','0');
newImg.setAttribute('style',img.getAttribute('style',0));
ersatz.appendChild(newImg);
img.parentNode.replaceChild(ersatz,img);
$(ersatz).lightbox();
Ich habe es mal getestet, im Forum unter TS3 kannste dir ja mal anschauen. Habe dort einmal das bild als img drin was er nich öffnet und als shot was er öffnet Gruß Fonsi |
||
| Lord|Schirmer Administrator
Posts: 4603 |
Du arbeitest am falschen Code!
Du musst zwischen [img] und [shot] unterscheiden! [img] verkleinert das Bild per JavaScript global im Nachhinein [shot] setzt die in der Admin/Konfig BBCODE definierte Größe sofort $(ersatz).lightbox(); -> kannst Du vergessen Ich habe es Dir in [shot] eingebaut! Hier in include/includes/class/bbcode.php unter function _screenshot() "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Fonsi1 Mitglied
Posts: 453 |
ok
Danke nochmal Gruß Fonsi |
||
| sladee Mitglied
Posts: 23 |
Hallo zusammen
Diese Geschichte mit der Lightbox für den [shot]-Tag finde ich sehr interessant... verliere hier aber ein wenig den Überblick in diesem Thread was jetzt genau gemacht werden muss um dies hin zu bekommen. Ich habe die Lightbox bereits in der Usergallery im Einsatz und sie ist auch in der index.htm eingebunden. Kann mir hier ev. nochmals jemand Schrittweise erklären was ich wo noch einfügen muss, damit sie auch über [shot] zu Einsatz kommt? Gruss sladee www.bootcamp-clan.com |
||
| Fonsi1 Mitglied
Posts: 453 |
Schau mal hier, vielleicht hilft es dir weiter.
www.ilch.de/forum-showposts-42307.html#296536 www.ilch.de/forum-showposts-41386.html#289369 |
||
| sladee Mitglied
Posts: 23 |
Thx, da ich nach [shot] suchte hab ich die türlich nicht gefunden ^^
Also wenn das Prinzip das selbe ist sollte ichs hinbekommen, sonst meld ich mich wieder! Edit: Habe es jetzt mal versucht nach diesen zwei Threads in den [img] zu bauen, den generell fänd ich es schön wenn jedes verkleinerte Bild ([img] & [shot]) über die Lightbox geöffnet würde. Funkt irgendwie aber nicht, jemand ne Idee? Zuletzt modifiziert von sladee am 09.12.2010 - 17:51:30 www.bootcamp-clan.com |
||
| sladee Mitglied
Posts: 23 |
Hmmmm... kann mir jetzt keiner weiterhelfen?
Habe wieder den Standart Code drin, da sonst nicht mal mehr die auto-verkleinerung geht ![]() www.bootcamp-clan.com |
||
| Fonsi1 Mitglied
Posts: 453 |
So das hier wie Lord|Schirmer geschrieben hat.
In der bbcode.php //> Bilder auf Verkleinern via Javascript überprüfen.
function _img($string, $float='') {
if ($float == 'none' OR $float == 'left' OR $float == 'right') {
$float = 'style="float:'.$float.'; margin: 5px;" ';
} else {
$float = '';
}
$image = '<img src="'.$string.'" alt="" title="" border="0" class="bbcode_image" '.$float.'/>';
return $image;
}
Hir drunter das einfügen //> Screenshots darstellen.
function _screenshot($string,$float='none') {
if ($float == 'none' OR $float == 'left' OR $float == 'right') {
$float = 'style="float:'.$float.'; margin: 5px;" ';
} else {
$float = '';
}
$image = '<a rel="lightbox[news]" href="'.$string.'" target="_blank"><img src="'.$string.'" alt="" title="" border="0" width="'.$this->info['ScreenMaxBreite'].'" height="'.$this->info['ScreenMaxHoehe'].'" '.$float.'/></a>';
return $image;
}
Zuletzt modifiziert von Fonsi1 am 09.12.2010 - 21:58:37 |
||
| sladee Mitglied
Posts: 23 |
bist du sicher in der bbcode.php? Ich kann den oberen Teil jedenfalls nicht finde...
hier meine bbcode.php: <?php
# Copyright by Manuel Staechele
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
//Klasse laden
require_once('include/includes/class/bbcode.php');
require_once('include/includes/bbcode_config.php');
$ILCH_HEADER_ADDITIONS .= "<script type=\"text/javascript\" src=\"include/includes/js/BBCodeGlobal.js\"></script>\n<script type=\"text/javascript\">\nvar bbcodemaximagewidth = {$info['ImgMaxBreite']};\nvar bbcodemaximageheight = {$info['ImgMaxHoehe']};\n</script>";
//Farbliste erstellen
function colorliste ( $ar ) {
$l = '';
foreach($ar as $k => $v) {
$l .= '<td width="10" style="background-color: '.$k.';"><a href="#" onClick="javascript:bbcode_code_insert(\'color\',\''.$k.'\'); hide_color();"><img src="include/images/icons/bbcode/transparent.gif" border="0" height="10" width="10" alt="'.$v.'" title="'.$v.'"></td>';
}
return ($l);
}
function getBBCodeButtons(){
//> Buttons Informationen.
$ButtonSql = db_query("SELECT
fnFormatB,fnFormatI,fnFormatU,fnFormatS,fnFormatEmph,
fnFormatColor,fnFormatSize,fnFormatUrl,fnFormatUrlAuto,fnFormatEmail,
fnFormatLeft,fnFormatCenter,fnFormatRight,fnFormatSmilies,
fnFormatList,fnFormatKtext,fnFormatImg,fnFormatScreen,fnFormatVideo,
fnFormatPhp,fnFormatCss,fnFormatHtml,fnFormatCode,fnFormatQuote,fnFormatCountdown
FROM
prefix_bbcode_buttons
WHERE
fnButtonNr='1'");
$boolButton = db_fetch_assoc($ButtonSql);
$cfgBBCsql = db_query("SELECT
fnYoutubeBreite,fnYoutubeHoehe,fcYoutubeHintergrundfarbe,
fnGoogleBreite,fnGoogleHoehe,fcGoogleHintergrundfarbe,
fnMyvideoBreite,fnMyvideoHoehe,fcMyvideoHintergrundfarbe,
fnSizeMax,fnUrlMaxLaenge,fnWortMaxLaenge,
fnImgMaxBreite,fnImgMaxHoehe,fnScreenMaxBreite,fnScreenMaxHoehe
FROM
prefix_bbcode_config
WHERE
fnConfigNr='1'");
$cfgInfo = db_fetch_assoc($cfgBBCsql);
$BBCodeButtons = '<script type="text/javascript" src="include/includes/js/interface.js"></script>';
//> Fett Button!
if($boolButton['fnFormatB'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('b','Gib hier den Text an der formatiert werden soll.')\"><img src=\"include/images/icons/bbcode/bbcode_bold.png\" alt=\"Fett formatieren\" title=\"Fett formatieren\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Kursiv Button!
if($boolButton['fnFormatI'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('i','Gib hier den Text an der formatiert werden soll.')\"><img src=\"include/images/icons/bbcode/bbcode_italic.png\" alt=\"Kursiv formatieren\" title=\"Kursiv formatieren\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Unterstrichen Button!
if($boolButton['fnFormatU'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('u','Gib hier den Text an der formatiert werden soll.')\"><img src=\"include/images/icons/bbcode/bbcode_underline.png\" alt=\"Unterstrichen formatieren\" title=\"Unterstrichen formatieren\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Durchgestrichener Button!
if($boolButton['fnFormatS'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('s','Gib hier den Text an der formatiert werden soll..')\"><img src=\"include/images/icons/bbcode/bbcode_strike.png\" alt=\"Durchgestrichen formatieren\" title=\"Durchgestrichen formatieren\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Leerzeichen?
if($boolButton['fnFormatI'] == 1 || $boolButton['fnFormatU'] == 1 || $boolButton['fnFormatS'] == 1) {
$BBCodeButtons .= " ";
}
//> Links Button!
if($boolButton['fnFormatLeft'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_code_insert('left','0')\"><img src=\"include/images/icons/bbcode/bbcode_left.png\" alt=\"Links ausrichten\" title=\"Links ausrichten\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Zentriert Button!
if($boolButton['fnFormatCenter'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_code_insert('center','0')\"><img src=\"include/images/icons/bbcode/bbcode_center.png\" alt=\"Mittig ausrichten\" title=\"Mittig ausrichten\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Rechts Button!
if($boolButton['fnFormatRight'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_code_insert('right','0')\"><img src=\"include/images/icons/bbcode/bbcode_right.png\" alt=\"Rechts ausrichten\" title=\"Rechts ausrichten\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Leerzeichen?
if($boolButton['fnFormatLeft'] == 1 || $boolButton['fnFormatCenter'] == 1 || $boolButton['fnFormatRight'] == 1) {
$BBCodeButtons .= " ";
}
//> Listen Button!
if($boolButton['fnFormatList'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('list','Gib hier den Text ein der aufgelistet werden soll \\n Um die liste zu beenden einfach auf Abbrechen klicken.')\"><img src=\"include/images/icons/bbcode/bbcode_list.png\" alt=\"Liste erzeugen\" title=\"Liste erzeugen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Hervorheben Button!
if($boolButton['fnFormatEmph'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_code_insert('emph','0')\"><img src=\"include/images/icons/bbcode/bbcode_emph.png\" alt=\"Text hervorheben\" title=\"Text hervorheben\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Schriftfarbe Button!
if($boolButton['fnFormatColor'] == 1) {
$colorar = array('#FF0000' => 'red','#FFFF00' => 'yellow','#008000' => 'green','#00FF00' => 'lime','#008080' => 'teal','#808000' => 'olive','#0000FF' => 'blue','#00FFFF' => 'aqua', '#000080' => 'navy','#800080' => 'purple','#FF00FF' => 'fuchsia','#800000' => 'maroon','#C0C0C0' => 'grey','#808080' => 'silver','#000000' => 'black','#FFFFFF' => 'white',);
$BBCodeButtons .= "<a href=\"javascript:hide_color();\"><img id=\"bbcode_color_button\" src=\"include/images/icons/bbcode/bbcode_color.png\" alt=\"Text färben\" title=\"Text färben\" width=\"23\" height=\"22\" border=\"0\"></a> ";
$BBCodeButtons .= '<div style="display:none; position:absolute; top:0px; left:0px; width:200px; z-index:100;" id="colorinput">
<table width="100%" class="border" border="0" cellspacing="1" cellpadding="0">
<tr class="Chead" onclick="javascript:hide_color();"><td colspan="16"><b>Farbe w�hlen</b></td></tr>
<tr class="Cmite" height="15">'.colorliste($colorar).'</tr></table>
</div>';
}
//> Schriftgrösse Button!
if($boolButton['fnFormatSize'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert_with_value('size','Gib hier den Text an der formatiert werden soll.','Gib hier die Größe des textes in Pixel an. \\n Pixellimit liegt bei ".$cfgInfo['fnSizeMax']."px !!!')\"><img src=\"include/images/icons/bbcode/bbcode_size.png\" alt=\"Textgröße verändern\" title=\"Textgröße verändern\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Leerzeichen?
if($boolButton['fnFormatList'] == 1 || $boolButton['fnFormatEmph'] == 1 || $boolButton['fnFormatColor'] == 1 || $boolButton['fnFormatSize'] == 1) {
$BBCodeButtons .= " ";
}
//> Url Button!
if($boolButton['fnFormatUrl'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert_with_value('url','Gib hier den namen des links an.','Gib hier die Adresse zu welcher verlinkt werden soll.')\"><img src=\"include/images/icons/bbcode/bbcode_url.png\" alt=\"Hyperlink einfügen\" title=\"Hyperlink einfügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> E-Mail Button!
if($boolButton['fnFormatEmail'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert_with_value('mail','Gib hier den namen des links an.','Gib hier die eMail - Adresse an.')\"><img src=\"include/images/icons/bbcode/bbcode_email.png\" alt=\"eMail hinzufügen\" title=\"eMail hinzufügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Leerzeichen?
if($boolButton['fnFormatUrl'] == 1 || $boolButton['fnFormatEmail'] == 1) {
$BBCodeButtons .= " ";
}
//> Bild Button!
if($boolButton['fnFormatImg'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('img','Gib hier die Adresse des Bildes an. \\n Die Breite und Höhe des Bildes ist auf ".$cfgInfo['fnImgMaxBreite']."x".$cfgInfo['fnImgMaxHoehe']." eingeschränkt und würde verkleinert dargstellt werden.')\"><img src=\"include/images/icons/bbcode/bbcode_image.png\" alt=\"Bild einfügen\" title=\"Bild einfügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Screenshot Button!
if($boolButton['fnFormatScreen'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert('shot','Gib hier die Adresse des Screens an. \\n Die Breite und Höhe des Bildes ist auf ".$cfgInfo['fnScreenMaxBreite']."x".$cfgInfo['fnScreenMaxHoehe']." eingeschränkt und wird verkleinert dargstellt.')\"><img src=\"include/images/icons/bbcode/bbcode_screenshot.png\" alt=\"Bild einfügen\" title=\"Screen einfügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Leerzeichen?
if($boolButton['fnFormatImg'] == 1 || $boolButton['fnFormatScreen'] == 1) {
$BBCodeButtons .= " ";
}
//> Quote Button!
if($boolButton['fnFormatQuote'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_code_insert('quote','0')\"><img src=\"include/images/icons/bbcode/bbcode_quote.png\" alt=\"Zitat einfügen\" title=\"Zitat einfügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Klapptext Button!
if($boolButton['fnFormatKtext'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert_with_value('ktext','Gib hier den zu verbergenden Text ein.','Gib hier einen Titel für den Klapptext an.')\"><img src=\"include/images/icons/bbcode/bbcode_ktext.png\" alt=\"Klappfunktion hinzufügen\" title=\"Klappfunktion hinzufügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Video Button!
if($boolButton['fnFormatVideo'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert_with_value_2('video','Gib hier die Video ID vom Anbieter an.','Bitte Anbieter auswählen.\\nAkzeptiert werden: Google, YouTube und MyVideo')\"><img src=\"include/images/icons/bbcode/bbcode_video.png\" alt=\"Video einfügen\" title=\"Video einfügen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Countdown Button!
if($boolButton['fnFormatCountdown'] == 1) {
$BBCodeButtons .= "<a href=\"javascript:bbcode_insert_with_value('countdown','Gib hier das Datum an wann das Ereignis beginnt.\\n Format: TT.MM.JJJJ Bsp: 24.12.".date("Y")."','Gib hier eine Zeit an, wann das Ergeinis am Ereignis- Tag beginnt.\\nFormat: Std:Min:Sek Bsp: 20:15:00')\"><img src=\"include/images/icons/bbcode/bbcode_countdown.png\" alt=\"Countdown festlegen\" title=\"Countdown festlegen\" width=\"23\" height=\"22\" border=\"0\"></a> ";
}
//> Umfragebutton
if($GLOBALS['menu']->get(0) == 'forum') {
$BBCodeButtons .= " <a href=\"javascript:insertvote()\"><img src=\"include/images/icons/bbcode/bbcode_vote.png\" alt=\"Umfrage einfügen\" title=\"Umfrage einfügen\" width=\"23\" height=\"22\" border=\"0\"></a>";
}
//> Leerzeichen?
if($boolButton['fnFormatQuote'] == 1|| $boolButton['fnFormatKtext'] == 1 || $boolButton['fnFormatVideo'] == 1) {
$BBCodeButtons .= " ";
}
//> Code Dropdown!
if($boolButton['fnFormatCode'] == 1 || $boolButton['fnFormatPhp'] == 1 || $boolButton['fnFormatHtml'] == 1 || $boolButton['fnFormatCss'] == 1) {
$BBCodeButtons .= "<select onChange=\"javascript:bbcode_code_insert_codes(this.value); javascript:this.value='0';\" style=\"font-family:Verdana;font-size:10px; margin-bottom:6px; z-index:0;\" name=\"code\"><option value=\"0\">Code einfügen</option>";
}
if($boolButton['fnFormatPhp'] == 1) {
$BBCodeButtons .= "<option value=\"php\">PHP</option>";
}
if($boolButton['fnFormatHtml'] == 1) {
$BBCodeButtons .= "<option value=\"html\">HTML</option>";
}
if($boolButton['fnFormatCss'] == 1) {
$BBCodeButtons .= "<option value=\"css\">CSS</option>";
}
if($boolButton['fnFormatCode'] == 1) {
$BBCodeButtons .= "<option value=\"code\">Sonstiger Code</option>";
}
if($boolButton['fnFormatCode'] == 1 || $boolButton['fnFormatPhp'] == 1 || $boolButton['fnFormatHtml'] == 1 || $boolButton['fnFormatCss'] == 1) {
$BBCodeButtons .= "</select>";
}
return $BBCodeButtons;
}
function BBcode($s,$maxLength=0,$maxImgWidth=0,$maxImgHeight=0) {
global $permitted,$info,$global_smiles_array;
//> Smilies in array abspeichern.
if(!isset($global_smiles_array)) {
$erg = db_query("SELECT ent, url, emo FROM `prefix_smilies`");
while ($row = db_fetch_object($erg) ) {
$global_smiles_array[$row->ent] = $row->emo.'#@#-_-_-#@#'.$row->url;
}
}
$bbcode = new bbcode();
$bbcode->smileys = $global_smiles_array;
$bbcode->permitted = $permitted;
$bbcode->info = $info;
if ($maxLength != 0) {
$bbcode->info['fnWortMaxLaenge'] = $maxLength;
}
if ($maxImgWidth != 0) {
$bbcode->info['fnImgMaxBreite'] = $maxImgWidth;
}
if ($maxImgHeight != 0) {
$bbcode->info['fnImgMaxBreite'] = $maxImgHeight;
}
return $bbcode->parse($s);
}
?>www.bootcamp-clan.com |
||
| Lord|Schirmer Administrator
Posts: 4603 |
include/includes/class/bbcode.php
"In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| sladee Mitglied
Posts: 23 |
Jo wie im Militär:
Ziel, Weg zum Ziel und Verhalten am Ziel ... und es funktioniert^^ Danke Euch allen für die Hilfe! Gruss sladee www.bootcamp-clan.com |
||
| Fonsi1 Mitglied
Posts: 453 |
Bitte hauptsache es funzt
|
||
| Leon007 Mitglied
Posts: 77 |
Hi leutz das script funktioniert soweit bis auf das ich keine feile sehe und next pic erscheint und diese datei include/includes/class/bbcode.php habe ich garnicht bei mir drauf????????Zitat
Ich weiss nicht immer wovon ich rede aber ich weiss ich habe recht :-)
Zuletzt modifiziert von Leon007 am 15.12.2010 - 22:56:26 |
||
| Lord|Schirmer Administrator
Posts: 4603 |
Die Pfeile zeigt er nur an wenn Du Bilder gruppierst!
Einzelbild -> rel="lightbox" Gruppierung -> rel="lightbox[Gruppenname]" Hast Du BBCode 2.0 (für 1.1O) drauf? "In mir schlummert ein Genie, leider wacht es nicht auf!" my portfolio | my community | important link |
||
| Leon007 Mitglied
Posts: 77 |
Hi nein ich finde garkeine datei mit bbcode? oder bin ich blind sorry bin anfänger aber erstmal thx für deine antwort
ach nochwas habe die lightbox bei user reingemacht so wie beschrieben sie funktioniert auch soweit in der usergallerie aber kann halt nicht auf next klicken da kein Bild angezeigt wird habe noch was entdekt die Bilder lassen sich auch nicht mehr komentieren:-( Zuletzt modifiziert von Leon007 am 15.12.2010 - 23:23:59 |
||
| Leon007 Mitglied
Posts: 77 |
LoL bin blind habe eins drauf hier:
<?php # Copyright by Manuel # Support www.ilch.de defined ('main') or die ( 'no direct access' ); function BBcode($s,$maxLength=40) { #$s = unescape($s); $coTime = str_replace(' ', '', microtime()); preg_match_all('/\[code\](.+)\[\/code\]/Uis',$s,$result); $s = bbcode_code_start ($s, $coTime, $result); # bbcode einheitlicher machen zum bessern pruefen. $s = bbcode_simple_prev ($s); #$s = preg_replace ("/(\015\012|\015|\012)/", " \\1", $s); # autoumbruch nach x zeichen #$s = bbcode_autonewline($s, $coTime, $maxLength); $s = htmlentities($s); # speziell bilder $s = bbcode_images ($s); # speziell zitate ersetzten. $s = bbcode_quote ($s); # replace simple $s = bbcode_simple ($s); # smilies umwandeln $s = bbcode_smiles ($s); $s = preg_replace ("/\015\012|\015|\012/", "\n<br />", $s); # code zurueck ersetzten $s = bbcode_code_end ($s, $coTime, $result); return ($s); } # diese funktion ist etwas komplizierter. und zwar wird hier versucht # dem problem beizukommen das immer irgendwelche spassvoegel sehr lange # texte schreiben die dann das design verzerren. dagegen hilft nur der # automatische umbruch. ich habe mir dafuer ausgedacht es gibt # bestimmte zeichen ab dennen die kontrolle total aus ist (url, img) # und es gibt zeichen ab dennen die kontrolle wieder eingeschaltet wird # ausserdem gibt es zeichen ab dennen wieder von vorn angefangen wird # zu zahlen, wird der counter erreicht wird ein leerzeichen eingefueght. function bbcode_autonewline ($s, $coTime,$maxLength) { $neu_s = ''; $ar_start = array ( '' ); $ar_ende = array ( ']', '[/img]' ); $ar_neu = array ( ' ', ); $ar_next = array (' ',"\n","\r",'','','','','','','',$coTime,'
$count = TRUE; $countgr = null; $counter = -1; $a = strlen ($s); for ($i=0;$i<$a;$i++) { # counter raus / rein if ($count == TRUE) { foreach ($ar_start as $sk => $sv) { if ($s{$i} == substr($sv, 0, 1) AND preg_match("/^".preg_quote($sv, '/')."/", substr($s, $i))) { $count = FALSE; $countgr = $sk; $counter = 0; #echo '<h1>ON</h1>'; break; } } } elseif ($count == FALSE AND $s{$i} == substr($ar_ende[$countgr], 0, 1) AND preg_match("/^".preg_quote($ar_ende[$countgr], '/')."/", substr($s, $i))) { #echo '<h1>||'. $s{$i} .'||<br>||'.substr($s, $i, 10).'||<br>'; #echo 'OFF</h1>'; $count = TRUE; $counter = -2; $countgr = null; } if ($count == TRUE) { $counter++; # ar neu? foreach ($ar_neu as $v) { if ($count == TRUE AND $s{$i} == substr($v, 0, 1) AND preg_match ("/^".preg_quote($v)."/", substr($s, $i))) { $counter = -3; break; } } # springen foreach ($ar_next as $v) { if ($s{$i} == substr($v, 0, 1) AND preg_match("/^".preg_quote($v, '/')."/", substr($s, $i))) { $i = $i + strlen ($v) - 1; $springen = true; $valSprin = $v; break; } } if (isset($springen) AND $springen === true) { $neu_s .= $valSprin; $springen = false; $valSprin = null; continue; } if ($counter >= $maxLength) { $neu_s .= ' '; $counter = 0; } } $neu_s .= $s{$i}; } /* $s = str_replace('</a>', ' </a>', $s); $lines = explode(' ',$s); $ntxt = ''; foreach ($lines as $v) { if ( strpos($v,$coTime) === FALSE AND strpos ($v, 'src="') === FALSE AND strpos ($v, 'href="') === FALSE AND strpos ($v, '</table>') === FALSE) { $ntxt .= chunk_split($v, $maxLength, ' ').' '; } else { $ntxt .= $v.' '; } } $s = $ntxt; $s = str_replace(' </a>', '</a>', $s); */ return($neu_s); } function bbcode_images ($s) { global $allgAr; preg_match_all('/\[img\](http|https):\/\/([^\ \?&=\#\"\n\r\t<>]+)\.(gif|jpeg|jpg|png)\[\/img\]/Ui',$s,$imgRs); $max_breite = 0; if (isset($allgAr['allg_bbcode_max_img_width'])) { $max_breite = $allgAr['allg_bbcode_max_img_width']; } $endung = array (1 => 'gif', 2 => 'jpg', 3 => 'png'); if ( isset ($imgRs[0][0]) ) { for($i=0;$i<count($imgRs[0]);$i++) { $imgstr = $imgRs[1][$i].'://'.$imgRs[2][$i].'.'.$imgRs[3][$i]; $size = @getimagesize($imgstr); $breite = $neueBreite = $size[0]; $hoehe = $neueHoehe = $size[1]; $er = ''; if (isset($endung[$size[2]]) OR !is_array($size)) { $er = '<img style="border: none;" src="'.$imgstr.'" />'; if ( $breite > $max_breite ) { $neueHoehe = intval($hoehe*$max_breite/$breite); $neueBreite = $max_breite; $er = '<a href="'.$imgstr.'" target="_blank"><img height="'.$neueHoehe.'" width="'.$neueBreite.'" style="border: none;" src="'.$imgstr.'" /></a>'; } } $s = str_replace($imgRs[0][$i],$er,$s); } } return($s); } function bbcode_quote ($s) { $tpl = new tpl ( 'zitatreplace.htm' ); $header1_quote = $tpl->get(0); $header2_quote = $tpl->get(1); $footer1_quote = $tpl->get(2); unset($tpl); $i=0; while(strpos($s,"[/quote]" !==FALSE AND $i < 5 ) {
$i++; $s = preg_replace("#\[quote\=([^\]]*)\](.*)\[\/quote\]#Uis",$header1_quote."geschrieben von \\1".$header2_quote."\\2".$footer1_quote, $s); $s = preg_replace("/\[quote\](.*)\[\/quote\]/Usi", $header1_quote.$header2_quote."\\1".$footer1_quote, $s ); } return ($s); } function bbcode_simple_prev ($s) { $search = array ( "/(^|[^=\]\>\"])http:\/\/(www\.)?([^\s\"\<\[]*)/i", "/\[url\]http:\/\/(www\.)?(.*?)\[\/url\]/si", ); $replace = array ( "\\1\\2\\3", "\\2", ); $s = preg_replace($search, $replace, $s); return ($s); } function bbcode_simple ($s) { $page = preg_quote(dirname(str_replace('www.','',$_SERVER["HTTP_HOST"]).$_SERVER["SCRIPT_NAME"]), '/'); $search = array ( "/\[b\](.*?)\[\/b\]/si", "/\[i\](.*?)\[\/i\]/si", "/\[u\](.*?)\[\/u\]/si", "/\[url=http:\/\/(www\.)?(".$page." (.*?)](.*?)\[\/url\]/si",
"/\[url=http:\/\/(www\.)?(.*?)\](.*?)\[\/url\]/si", "/\[list(=1)?\](.+)\[\/list\]/Usie", "/(script|about|applet|activex|chrome):/is", ); $replace = array ( "<b>\\1</b>", "<i>\\1</i>", "<u>\\1</u>", "<a href=\"http://\\1\\2\\3\">\\4</a>", "<a href=\"http://\\1\\2\" target=\"_blank\">\\3</a>", "bbcode_simple_list ('\\1', '\\2')", "\\1:", ); $s = preg_replace($search, $replace, $s); return ($s); } function bbcode_simple_list ($w, $s) { # $s = preg_replace("\015\012 $s = preg_replace("/\[\*\]([^\[]+)/ies", "'<li>'.trim('\\1').'</li>'", trim($s)); if ($w == '=1') { return ('<ol>'.trim($s).'</ol>'); } return ('<ul>'.trim($s).'</ul>'); } function bbcode_smiles ($s) { global $global_smiles_array; if (!isset($global_smiles_array)) { $global_smiles_array = array(); $erg = db_query("SELECT ent, url, emo FROM `prefix_smilies`" ;
while ($row = db_fetch_object($erg) ) { $global_smiles_array[$row->ent] = $row->emo.'#@#-_-_-#@#'.$row->url; } } foreach ($global_smiles_array as $k => $v) { list($emo, $url) = explode('#@#-_-_-#@#', $v); $s = str_replace($k,'<img src="include/images/smiles/'.$url.'" border="0" alt="'.$emo.'" title="'.$emo.'" />',$s); } return ($s); } function bbcode_code_start ($s, $coTime, $result) { for ($i=0;$i<count($result[1]);$i++) { if ($result[0][$i]) { $s = str_replace ($result[0][$i],'#'.$coTime.'#'.$i.'#'.$coTime.'#',$s); } } return ($s); } function bbcode_code_end ($s, $coTime, $result) { $tpl = new tpl ( 'codereplace.htm' ); for ($i=0;$i<count($result[1]);$i++) { if ($result[1][$i]) { ob_start(); #$result[1][$i] = str_replace ('<', '<', str_replace('>', '>', $result[1][$i])); #$codereplace = highlight_string(trim($result[1][$i]), 1); highlight_string(trim($result[1][$i])); $codereplace = ob_get_contents(); ob_end_clean(); $newstring = $tpl->set_get ( 'CODEREPLACE', $codereplace, 0); $s = str_replace('#'.$coTime.'#'.$i.'#'.$coTime.'#',$newstring,$s); } } unset($tpl); return ($s); } ?> |
||
| Leon007 Mitglied
Posts: 77 |
Habe die Lightbox raus gemacht da man dann keine komis mehr machen kann
|
||
| [ Anmelden zum schreiben ] |