Hallo,
ich hätte es gerne so das die Bilder+Kommentare und Bewertung nicht in einem neuen Popup geöffnet werden sondern ganz normal im Content angezeigt werden.
Wie kann ich das am sinnvollsten anstellen?
Währe fürn paar Tipps sehr Dankbar
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
onClick="return oeffneFenster({bildr},{cat});" target="_blank"
$title = $allgAr['title'].' :: Gallery '.$cattitle; $hmenu = '<a class="smalfont" href="?gallery">Gallery</a>'.$catname; $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('gallery' );
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); # mini config $img_per_site = $allgAr['gallery_imgs_per_site']; $img_per_line = $allgAr['gallery_imgs_per_line']; function get_cats_title ( $catsar ) { $l = ''; foreach($catsar as $k => $v) { if ( $k != '' AND $v != '' ) { $l = $v.' :: '.$l; } } return ($l); } function get_cats_urls ( $catsar ) { $l = ''; foreach($catsar as $k => $v) { if ( $k != '' AND $v != '' ) { $l = '<a class="smalfont" href="?gallery-'.$k.'">'.$v.'</a><b> » </b>'.$l; } } return ($l); } function count_files ($cid) { $zges = 0; $e = db_query("SELECT id FROM prefix_gallery_cats WHERE cat = ".$cid); if ( db_num_rows($e) > 0 ) { while ($r = db_fetch_assoc($e) ) { $zges = $zges + count_files ( $r['id'] ); } } $zges = $zges + db_count_query("SELECT COUNT(*) FROM prefix_gallery_imgs WHERE cat = ".$cid); return ( $zges ); } function get_cats_array ( $cid , $ar ) { if ( empty($cid) ) { return ($ar); } else { $erg = db_query("SELECT cat,id,name FROM prefix_gallery_cats WHERE id = ".$cid); $row = db_fetch_assoc($erg); $ar[$row['id']] = $row['name']; return ( get_cats_array($row['cat'],$ar) ); } if ( $r ) { return ($l); } } # original groesse anzeigen if ($menu->get(1) == 'showOrig') { $tpl = new tpl ('gallery_show'); $tpl->set('id', escape($menu->get(2), 'integer')); $tpl->set('endung',htmlentities($menu->get(3))); $tpl->out(4); # normale groesse anzeigen } elseif ($menu->get(1) == 'show') { $title = $allgAr['title'].' :: Gallery '.$cattitle; $hmenu = ''; $design = new design ( $title , $hmenu ); $design->header(); $page = ($menu->getA(3) == 'p' ? escape($menu->getE(3), 'integer') : 1 ); $cid = escape($menu->get(2), 'integer'); $anz = db_result(db_query("SELECT COUNT(*) FROM prefix_gallery_imgs WHERE prefix_gallery_imgs.cat = ".$cid),0); $erg = db_query("SELECT prefix_gallery_imgs.id,prefix_gallery_imgs.cat,datei_name,endung,prefix_gallery_imgs.`besch`,klicks,vote_wertung,vote_klicks FROM prefix_gallery_imgs LEFT JOIN prefix_gallery_cats ON prefix_gallery_imgs.cat = prefix_gallery_cats.id WHERE prefix_gallery_imgs.cat = ".$cid." AND (recht >= ".$_SESSION['authright']." OR recht IS NULL) ORDER BY id ASC LIMIT ".$page.",1"); $row = db_fetch_assoc($erg); $size = getimagesize('include/images/gallery/img_'.$row['id'].'.'.$row['endung']); $breite = $size[0] + 5; $hoehe = $size[1] + 5; # vote zahlen if (isset($_GET['doVote']) AND is_numeric($_GET['doVote']) AND !isset ($_SESSION['galleryDoVote'][$row['id']])) { $_SESSION['galleryDoVote'][$row['id']] = 'o'; $row['vote_wertung'] = round ( ( ( $row['vote_wertung'] * $row['vote_klicks'] ) + $_GET['doVote'] ) / ( $row['vote_klicks'] + 1 ) , 3 ); $row['vote_klicks']++; db_query("UPDATE prefix_gallery_imgs SET vote_wertung = ".$row['vote_wertung'].", vote_klicks = ".$row['vote_klicks']." WHERE id = ".$row['id']); } # klicks zaehlen if (!isset($_SESSION['galleryDoKlick'][$row['id']])) { $_SESSION['galleryDoKlick'][$row['id']] = 'o'; db_query("UPDATE prefix_gallery_imgs SET klicks = klicks + 1 WHERE id = ".$row['id']); } # page vor und ruck dev $next = $page + 1; $last = $page - 1; if ( $next >= $anz ) { $next = 0; } if ( $last < 0 ) { $last = $anz -1; } # diashow einstellungen $diashow_html = ''; $diashow = $next.'=0&diashow=start'; if (isset($_GET['diashow']) AND ($_GET['diashow'] == 'start' OR $_GET['diashow'] == 'shownext')) { $sek = 4; if (isset($_GET['sek'])) { $sek = $_GET['sek']; } $diashow_html = '<meta http-equiv="refresh" content="'.$sek.'; URL=index.php?gallery-show-'.$cid.'-p'.$next.'=0&diashow=shownext&sek='.$sek.'">'; $diashow = $page.'=0&diashow=stop'; } # anzeigen $tpl = new tpl ('gallery_show'); $arr = array ( 'cid' => $cid, 'last' => $last, 'next' => $next, 'diashow' => $diashow, 'diashow_html' => $diashow_html, 'endung' => $row['endung'], 'id' => $row['id'], 'vote_wertung' => $row['vote_wertung'], 'vote_klicks' => $row['vote_klicks'], 'bildr' => $page, 'besch' => unescape($row['besch']), 'breite' => $breite, 'hoehe' => $hoehe ); $tpl->set_ar_out($arr,0); # kommentare if ($allgAr['gallery_img_koms'] == 1) { # eintragen $insertmsg = ''; if ((loggedin() or isset($_POST['name'])) and !empty($_POST['text']) and $antispam = chk_antispam('gallery')) { if (loggedin()) { $name = $_SESSION['authname']; } else { $name = escape($_POST['name'],'string'); if (db_count_query('SELECT COUNT(*) FROM prefix_user WHERE name = "'.$name.'"')) { $insertmsg .= 'Der Name ist bereits für einen registrierten User vergeben'; } } if (empty($insertmsg)) { $text = escape($_POST['text'],'string'); db_query("INSERT INTO prefix_koms (name,text,uid,cat) VALUES ('".$name."','".$text."',".$row['id'].",'GALLERYIMG')"); } } elseif (isset($_POST['subgalkom']) and !$antispam) { $insertmsg .= 'Falscher Antispam'; } # loeschen if (isset($_GET['delete']) AND is_siteadmin()) { db_query("DELETE FROM prefix_koms WHERE id = ".escape($_GET['delete'], 'integer')); } # zeigen if (!empty($insertmsg)) { $insertmsg = '<span style="color:red;">'.$insertmsg.'</span><br />'; } $tpl->set('insertmsg', $insertmsg ); $tpl->set('uname', $_SESSION['authname']); $tpl->set('antispam', get_antispam('gallery', 0)); $tpl->out(1); $class = 'Cnorm'; $erg = db_query("SELECT id, name, text FROM prefix_koms WHERE uid = ".$row['id']." AND cat = 'GALLERYIMG' ORDER BY id DESC"); while ($r = db_fetch_assoc($erg)) { $class = ($class == 'Cmite' ? 'Cnorm' : 'Cmite'); $r['class'] = $class; $r['text'] = bbcode ($r['text']); if (is_admin()) { $r['text'] .= '<a href="index.php?gallery-show-'.$cid.'-p'.$page.'=0&delete='.$r['id'].'"><img src="include/images/icons/del.gif" border="0" title="löschen" alt="löschen" /></a>'; } $tpl->set_ar_out($r,2); } $tpl->out(3); $design->footer(); } } else { $cid = ( $menu->get(1) ? escape($menu->get(1),'integer') : 0 ); $erg = db_query("SELECT cat,name FROM prefix_gallery_cats WHERE recht >= {$_SESSION['authright']} AND id = ".$cid); $cname = 'Gallery'; if ( db_num_rows($erg) > 0 ) { $row = db_fetch_assoc($erg); $array = get_cats_array($row['cat'],''); $cname = $row['name']; if ( !empty($array) ) { $titelzw = get_cats_title($array); $namezw = get_cats_urls($array); } else { $titelzw = ''; $namezw = ''; } $cattitle = ':: '.$titelzw.$row['name']; $catname = '<b> » </b>'.$namezw.$row['name']; } else { $cattitle = ''; $catname = ''; } $title = $allgAr['title'].' :: Gallery '.$cattitle; $hmenu = '<a class="smalfont" href="?gallery">Gallery</a>'.$catname; $design = new design ( $title , $hmenu ); $design->header(); $tpl = new tpl ('gallery' ); $erg = db_query("SELECT id,name,`besch` FROM prefix_gallery_cats WHERE recht >= {$_SESSION['authright']} AND cat = ".$cid." ORDER BY pos"); if ( db_num_rows($erg) > 0 ) { $tpl->out(1); $class = 'Cnorm'; while ($row = db_fetch_assoc($erg) ) { $row['gallery'] = count_files($row['id']); $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); $row['class'] = $class; $tpl->set_ar_out($row,2); } $tpl->out(3); } $limit = $img_per_site; $page = ($menu->getA(2) == 'p' ? escape($menu->getE(2), 'integer') : 1 ); $MPL = db_make_sites ($page , '' , $limit , '?gallery-'.$cid , "gallery_imgs LEFT JOIN prefix_gallery_cats ON prefix_gallery_imgs.cat = prefix_gallery_cats.id WHERE prefix_gallery_imgs.cat = ".$cid." AND (recht >= ".$_SESSION['authright']." OR recht IS NULL)"); $anfang = ($page - 1) * $limit; $erg = db_query("SELECT prefix_gallery_imgs.id,prefix_gallery_imgs.cat,datei_name,endung,prefix_gallery_imgs.`besch`,klicks,vote_wertung,vote_klicks FROM prefix_gallery_imgs LEFT JOIN prefix_gallery_cats ON prefix_gallery_imgs.cat = prefix_gallery_cats.id WHERE prefix_gallery_imgs.cat = ".$cid." AND (recht >= ".$_SESSION['authright']." OR recht IS NULL) ORDER BY id ASC LIMIT ".$anfang.",".$limit); if ( db_num_rows($erg) > 0 ) { $tpl->set('imgperline', $allgAr['gallery_imgs_per_line']); $tpl->set('cname', $cname); $tpl->set('breite', $allgAr['gallery_normal_width']+30); $tpl->set('MPL',$MPL); $tpl->out(4); $class = 'Cnorm'; $i = 0; while($row = db_fetch_assoc($erg) ) { $class = ( $class == 'Cmite' ? 'Cnorm' : 'Cmite' ); $row['class'] = $class; $row['anz_koms'] = db_result(db_query("SELECT COUNT(*) FROM prefix_koms WHERE uid = ".$row['id']." AND cat = 'GALLERYIMG'"),0); $row['besch'] = unescape($row['besch']); $row['width'] = round( 100 / $img_per_line ); $row['bildr'] = $i + (($page-1) * $img_per_site); if ( $i <> 0 AND ($i % $img_per_line ) == 0 ) { echo '</tr><tr>'; } $tpl->set_ar_out($row,5); $i++; } if ( $i % $img_per_line <> 0 ) { $anzahl = $img_per_line - ($i % $img_per_line); for($x=1;$x<=$anzahl;$x++){ echo '<td class="'.$class.'"></td>'; } } $tpl->out(6); } $design->footer(); } ?>
{EXPLODE} <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3"> <tr class="Chead"> <td width="80%" align="center"><b>{_lang_category}</b></td> <td width="20%" align="center">{_lang_pictures}</td> </tr> {EXPLODE} <tr class="{class}"> <td><a href="index.php?gallery-{id}">{name}</a><br /><span class="smalfont">» {besch}</span></td> <td align="center">{gallery}</td> </tr> {EXPLODE} </table> <br /><br /> {EXPLODE} <table width="100%" class="border" border="0" cellspacing="1" cellpadding="3"> <tr class="Chead"> <td colspan="{imgperline}" align="center"><b>{cname}</b></td> </tr> {EXPLODE} <td class="{class}" width="{width}%" valign="top" align="center"> <div onmouseover="hiddpos('infodiv{id}')" class="layer" id="infodiv{id}" style="position:absolute; top:50px; left:50px; display:none; width:200px; height:200px;"> <table width="100%" class="border" border="0" cellspacing="1" cellpadding="4"> <tr> <td class="{class}" align="left"> <strong>{_lang_filename}:</strong> {datei_name} <br /><strong>{_lang_seen}:</strong> {klicks} <br /><strong>{_lang_voting}:</strong> {vote_wertung} <br /><strong>{_lang_comments}:</strong> {anz_koms} <br /><strong>{_lang_desc}:</strong> {besch} </td> </tr> </table> </div> <table class="border" border="0" cellspacing="1" cellpadding="0"> <tr> <td onmouseout="hiddpos('infodiv{id}')" onmouseover="alertpos('infodiv{id}')"><a href="index.php?gallery-show-{cat}-p{bildr}"><img src="include/images/gallery/img_thumb_{id}.{endung}" border="0" alt="{datei_name}" title=" " /></a></td> </tr> </table> </td> {EXPLODE} </tr> </table> <center>{MPL}</center> <script language="JavaScript" type="text/javascript"> <!-- function oeffneFenster (bildr, cat) { var fenster = window.open ('index.php?gallery-show-'+cat+'-p'+bildr,'showBild','scrollbars=yes,height=600,width={breite},left=200,status=yes,resizable=yes'); fenster.focus(); return (false); } // manage div ... document.onmousemove = checkPosition; function checkPosition(e) { if(document.all) { mausX = event.clientX + document.body.scrollLeft; mausY = event.clientY + document.body.scrollTop; } else { mausX = e.pageX; mausY = e.pageY; } } function alertpos(dname) { if (document.layers) { document.layers[0].left = mausX; document.layers[0].top = mausY; } else if (document.getElementById) { document.getElementById(dname).style.left = mausX + "px"; document.getElementById(dname).style.top = mausY + "px"; } document.getElementById(dname).style.display = "inline"; } function hiddpos(dname) { document.getElementById(dname).style.display = "none"; } //--> </script>
<table width="100%" class="border" border="0" cellspacing="1" cellpadding="3"> <tr> <td class="Callg"> <div class="layer" id="diashowDiv" style="position:absolute; top:25px; left:25px; display:none; width:85px; height:15px;"> <table onMouseOver="showDiashowDiv()" onMouseOut="closeDiashowDiv()" width="85" class="border" border="0" cellspacing="1" cellpadding="4"> <tr> <td class="Cdark" title="Bilder alle 3 Sekunden wechseln" width="15" onClick="startDiashow(3)" style="cursor:pointer"> 3 </td> <td class="Cmite" title="Bilder alle 5 Sekunden wechseln" width="15" onClick="startDiashow(5)" style="cursor:pointer"> 5 </td> <td class="Cdark" title="Bilder alle 10 Sekunden wechseln" width="15" onClick="startDiashow(10)" style="cursor:pointer"> 10 </td> <td class="Cmite" title="Bilder alle 20 Sekunden wechseln" width="15" onClick="startDiashow(20)" style="cursor:pointer"> 20 </td> <td class="Cdark" title="Bilder alle 30 Sekunden wechseln" width="15" onClick="startDiashow(30)" style="cursor:pointer"> 30 </td> </tr> </table> </div> <table class="border" border="0" cellspacing="1" cellpadding="3" width="100%"> <tr> <td class="Cnorm" align="center" width="15"><a href="javascript:closeThisWindow()"><img src="include/images/icons/del.gif" alt="{_lang_close}" title="{_lang_close}" border="0"></a></td> <td class="Cmite" align="center" width="15"><a href="index.php?gallery-show-{cid}-p{last}"><img src="include/images/icons/pfeill.gif" alt="{_lang_back}" title="{_lang_back}" border="0"></a></td> <td class="Cmite" align="center" width="15"><a href="index.php?gallery-show-{cid}-p{next}"><img src="include/images/icons/pfeilr.gif" alt="{_lang_forward}" title="{_lang_forward}" border="0"></a></td> <td class="Cnorm" align="center" width="15" onMouseOut="closeDiashowDiv()" onMouseOver="showDiashowDiv()"><a href="index.php?gallery-show-{cid}-p{diashow}"><img src="include/images/icons/diashow.gif" alt="{_lang_diashowstartstop}" title="{_lang_diashowstartstop}" border="0"></a></td> <td title="{_lang_participant}: {vote_klicks}" class="Cnorm" align="right"> <table class="border" border="0" cellspacing="1" cellpadding="0"> <tr> <td class="Cdark" onClick="doVote(1)" style="cursor:pointer"> 1 </td> <td class="Cmite" onClick="doVote(2)" style="cursor:pointer"> 2 </td> <td class="Cdark" onClick="doVote(3)" style="cursor:pointer"> 3 </td> <td class="Cmite" onClick="doVote(4)" style="cursor:pointer"> 4 </td> <td class="Cdark" onClick="doVote(5)" style="cursor:pointer"> 5 </td> <td class="Cmite" onClick="doVote(6)" style="cursor:pointer"> 6 </td> <td class="Cdark" onClick="doVote(7)" style="cursor:pointer"> 7 </td> <td class="Cmite" onClick="doVote(8)" style="cursor:pointer"> 8 </td> <td class="Cdark" onClick="doVote(9)" style="cursor:pointer"> 9 </td> <td class="Cmite" onClick="doVote(10)" style="cursor:pointer"> 10 </td> <td class="Cnorm" align="right"> {_lang_rating}: {vote_wertung} </td> </tr> </table> </td> </tr> </table> <br /> <center><table class="border" border="0" cellspacing="1" cellpadding="0"><tr><td><a href="include/images/gallery/img_{id}.{endung}" target="_blank"><img id="bild1" style="progid:DXImageTransform.Microsoft.{bild_style}" src="include/images/gallery/img_norm_{id}.{endung}" border="0" /></a></td></tr></table></center> <br /> <table class="border" border="0" cellspacing="1" cellpadding="3" width="100%"> <tr> <td class="Cmite"><strong>{_lang_desc}:</strong>: {besch}</td> </tr> </table> {EXPLODE} <br /> <table class="border" border="0" cellspacing="1" cellpadding="3" width="100%"> <tr> <td class="Cdark"><strong>{_lang_comments}:</strong></td> </tr> <td class="Cnorm"> <form action="index.php?gallery-show-{cid}-p{bildr}" method="POST"> {insertmsg}<input type="text" name="name" value="{uname}" /><br /> <textarea cols="50" rows="2" name="text"></textarea><br /> {antispam}<input type="submit" name="subgalkom" value="{_lang_formsub}"> </form> </td> </tr> </table> <br /> <table class="border" border="0" cellspacing="1" cellpadding="3"> {EXPLODE}<tr> <td class="{class}"><b>{name}:</b> {text}</td> </tr>{EXPLODE} </table> </td> </tr> </table> {EXPLODE}
Geschlossen | ||
Zurück zu Allgemein |