Hi
Ich möchte das center-Last_comments block ändern und zwar möchte ich das 4Bilder nebeneinander sind und 3untereinander also das 12Bilder angezeigt werden
Hier der Code
<?php
/**
* pragmaMx Content Management System
* Copyright (c) 2005-2007 pragmaMx Dev Team - http://pragmaMx.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3
* as published by the Free Software Foundation.
*
* $Revision: 1.3 $
* $Author: tora60 $
* $Date: 2008/04/16 10:50:00 $
*
* this file based on:
* Coppermine Photo Gallery
* Copyright (c) 2003-2005 Coppermine Dev Team
* v1.1 originally written by Gregory DEMAR
* required version: >= 1.4.18
*
* center design based on an idea by 'reddragon'
*/
defined('mxMainFileLoaded') or die('access denied');
// //// Beginn Blockkonfiguration //////////////////////////
// der Name/Pfad des Gallerymoduls
$cpg_name = 'Gallery';
// Anzahl der Thumbnails
$limit = 4;
// length of body of comment to show
$body_length = 20;
// length of author name to show
$auth_length = 20;
// Liste der Alben, aus denen keine Bilder angezeigt werden sollen. Die ID's durch Komma trennen.
$exluded_albums = '';
// //// Ende Blockkonfiguration ////////////////////////////
if (@file_exists('modules/' . $cpg_name . '/blocks.inc.php')) {
// die $THEME_DIR wird in der Smiliesfunktion benoetigt
global $THEME_DIR;
if (isset($THEME_DIR)) {
$TEMP_THEME_DIR = $THEME_DIR;
}
include('modules/' . $cpg_name . '/blocks.inc.php');
} else {
if (MX_IS_ADMIN) {
$content = 'The module "' . $cpg_name . '" doesn\'t exist or is not correctly installed. Please install this module or change the Variable $cpg_name in file blocks/' . basename(__file__) . '.';
}
return;
}
// Abfragebedingung für versteckte Alben erstellen
$exluded_albums = preg_split('#\s*,\s*#', trim($exluded_albums));
foreach($exluded_albums as $ex) {
$excluded[] = intval($ex);
}
$exluded_albums = '';
if (isset($excluded)) {
$exluded_albums = ' AND p.aid NOT IN (' . implode(',', $excluded) . ')';
}
if ($CONFIG['enable_smilies'] && !function_exists('process_smilies')) {
include_once(MXCPG_PATH_INCLUDE . "smilies.inc.php");
}
$result = sql_query("
SELECT p.pid, p.url_prefix, p.filepath, p.filename, p.title, c.msg_author, UNIX_TIMESTAMP(c.msg_date) as msg_date, c.msg_body, c.msg_id
FROM $CONFIG[TABLE_COMMENTS] as c, $CONFIG[TABLE_PICTURES] AS p INNER JOIN $CONFIG[TABLE_ALBUMS] AS a ON (p.aid = a.aid)
WHERE c.pid=p.pid AND approved='YES' AND " . $vis_groups . " " . $exluded_albums . "
ORDER BY c.msg_id DESC
LIMIT $limit");
$pic = 0;
$output = '';
while ($row = sql_fetch_array($result)) {
$row = mxCpgBlocksPrepareData($row);
$date = localised_date($row['msg_date'], $lastcom_date_fmt);
$author = mxCutString($row["msg_author"], $auth_length);
$messagebody = mxCutString($row["msg_body"], $body_length);
if ($CONFIG['enable_smilies']) {
$messagebody = process_smilies($messagebody);
}
$output .= '<td align="center" valign="baseline"><a href="modules.php?name=' . $cpg_name . '&act=displayimage&album=lastcom&cat=0&pos=' . $pic . '"><img src="' . get_pic_url($row, 'thumb') . '" border="0" alt="' . $row['title'] . '" title="' . $row['title'] . '"><br />' . $author . '</a><br />' . $messagebody . '<br>(' . $date . ')</td>';
$pic++;
}
if ($output) {
$content = '<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center"><tr>'
. $output . '</tr>
</table>
<p align="center"><a href="modules.php?name=' . $cpg_name . '">' . $CONFIG['gallery_name'] . '</a></p>
';
}
// zuruecksetzen
if (isset($TEMP_THEME_DIR)) {
$THEME_DIR = $TEMP_THEME_DIR;
}
?>
Es müßte also ein IF befehl rein wo nach 4Bilder ein <br> macht
gruß
DeMa