block-NewsmaaX soll nur eine Spalte haben.

Begonnen von zazaeren, 30 Oktober 2003, 17:35:46

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

zazaeren

Ich habe schon vieles geändert in diesem Block. Daher habe ich die ganze Kode unten stehen.  da will ich, dass da nur eine splate steht. Anstatt 2.

Ich habe es leider nicht gefunden.  Die Admins werden hoffentlich ein teil diese Kode löschen. Ist ja zulang. Ich weiss aber nicht was wir da brauchen. Deswegen habe ich die ganze block-NewsmaaX.php  hier stehen.



<?php //$Id: block-NewsmaaX.php,v 20.6 2003/09/21 10:47:31 EllselAn Exp $
/************************************************************************/
/* vkpMx 2.0  Content Management System                                 */
/* ==================================================================== */
/* Copyright (C) 2003 by the vkpMx & pragmaMx Developer Team            */
/* email:         team@pragmamx.org                                     */
/* homepage:      http://www.maax-design.de                             */
/* further sites: http://www.pragmamx.org, http;//guggemahier.de,   */
/*            http://www.marx-city.de, http://www.genutec-studios.de,   */
/*            http://www.shiba-design.de, http://www.power-maax.de      */
/* ==================================================================== */
/* Based on:                                                            */
/* PHP-NUKE Web Portal System - http://phpnuke.org/                     */
/* Thatware - http://thatware.org/                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

$thisfile=basename(__file__);
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");

$mxblockcache = TRUE;
include_once("includes/mxNewsFunctions.php");
// ToDo: 1. Anpasssung an alle Browser wegen Kompatib....
//       2. Themendefinierung überarbeiten.
//       3. Allgemeines sauber coden
$module_name = "News";
#mxGetLangfile($module_name);
global $storyhome, $httpref, $httprefmax, $topicname, $topicimage, $topictext, $datetime, $cookie, $prefix, $articlecomm, $bgcolor1, $bgcolor2, $bgcolor3, $datetime;
$cookie = mxGetUserSession();
$coun = 0;
$catname = array();

if ($GLOBALS["multilingual"] == 1) {
   if(ereg("german", $GLOBALS["currentlang"])) $thislang = "german";
    else $thislang = $GLOBALS["currentlang"];
    $querylang = "AND (alanguage LIKE '".$thislang."%' OR alanguage='')";
} else {
    $querylang = "";
}

#$querylang = ($multilingual == 1) ? "AND (alanguage='$currentlang' OR alanguage='')" : "";
#$storynum = (isset($cookie[3])) ? $cookie[3] : $GLOBALS['storyhome'];
$storynum = $GLOBALS['storyhome'];

$qry = "SELECT sid, cat.catid, aid, s.title, time, DATE_ADD(time, INTERVAL 2 DAY), now(), hometext, bodytext, comments, s.counter, topic, informant, notes, acomm, cat.title AS title1
FROM ${prefix}_stories AS s LEFT JOIN ${prefix}_stories_cat AS cat ON s.catid = cat.catid
WHERE (ihome='0' OR s.catid='0') AND time <= now() $querylang
ORDER BY s.time DESC
limit 0,$storynum";
#print $qry;
$result = sql_query($qry);
if(!$result) {
   return;
   }
$content ="<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\"><tr valign=\"top\">";
while(list($s_sid, $catid, $aid, $title, $time, $expire, $now, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes, $acomm, $title1) = sql_fetch_row($result)) {
   $printP = "<a href=\"modules.php?name=News&file=print&sid=$s_sid\"><img src=\"images/menu/print.gif\" width=12 height=13 border=0 Alt=\""._BMXPRINTER."\"  title=\""._BMXPRINTER."\" ></a>";
   $sendF = "<a href=\"modules.php?name=News&file=friend&op=FriendSend&sid=$s_sid\"><img src=\"images/menu/friend.gif\" width=12 height=13 border=0 Alt=\""._BMXFRIEND."\" title=\""._BMXFRIEND."\" ></a>";
   #$topicdata = vkpGetTopics($s_sid);
   ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
   $datetime = mx_strftime(_SHORTDATESTRING, mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
   #$datetime = ucfirst($datetime);
   $title = stripslashes($title);
   $title = "<a href=\"modules.php?name=News&file=article&sid=$s_sid\">$title</a>";
   $hometext = stripslashes($hometext);
   $notes = stripslashes($notes);
   $introcount = strlen($hometext);
   $fullcount = strlen($bodytext);
   $totalcount = $introcount + $fullcount;
   $byteM    = "<a href=\"modules.php?name=News&file=article&sid=$s_sid\"><img src=\"images/menu/bytesmore.gif\" border=0 width=12 height=13 Alt=\""._BMXBYTESMORE." $fullcount\" title=\""._BMXBYTESMORE." $fullcount\" ></a>";
   $commentC = "<a href=\"modules.php?name=News&file=article&sid=$s_sid&mode=&order=0&thold=0\"><img src=\"images/menu/comments2.gif\" width=12 height=13 border=0  Alt=\""._COMMENTS." $comments\"  title=\""._COMMENTS." $comments\" ></a>";
   $senderT  = "<a href=\"modules.php?name=Userinfo&uname=$informant\"><img src=\"images/menu/informant.gif\" width=12 height=13 border=0 Alt=\"$informant\" title=\"$informant\" ></a>";
   $empty    = "<img src=\"images/menu/empty.gif\" border=0 >";
   $sid = $s_sid;
   if ($catid != 0) {   
      $title = "$title   [<a href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>]";
   }
   $colspan = 4;
   $content .="<td width=\"50%\" valign=\"top\">";
   $content .="<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\" bgcolor=\"$bgcolor2\" height=\"100%\" style=\"height: 45px;\"><tr valign=\"top\" style=\"height: 10px;\">";
   $content .="<td colspan=\"$colspan\" bgcolor=\"$bgcolor2\"><img src=images/menu/sign.gif align=\"absmiddle\"><span style=\"font-size:12pt;\">$title</span></td>";
   if ($comments > 0)  {
      $content .="<td bgcolor=\"$bgcolor2\">$commentC</td>";
      $colspan++;
      } #else {$content .="<td bgcolor=\"$bgcolor2\">$empty</td>";}
   #if ($fullcount > 0) {$content .="<td bgcolor=\"$bgcolor2\">$byteM</td>";    $colspan++;} #else {$content .="<td bgcolor=\"$bgcolor2\">$empty</td>";}
   if ($counter > 0)   {
      $content .="<td bgcolor=\"$bgcolor2\">$counterC</td>";
      $colspan++;
      } #else {$content .="<td bgcolor=\"$bgcolor2\">$empty</td>";}
   $image = ($now>$expire) ? "sign" : "new" ;
   $content .="</tr><tr valign=\"top\" style=\"height: 35px;\">";
   $body2text=mxCutString($hometext, 300);
   $content.="<tr><td colspan=\"$colspan\" bgcolor=\"$bgcolor1\">$body2text</td></tr>";
   $content .="</tr></table></td>";
   if ($coun == 1) {
      $content.= "</tr><tr>";
      $coun = 0;
      }
   else {
      $coun++;
      }
   }

$content .="</tr>";
$content .="<tr><td bgcolor=\"$bgcolor2\" align=\"center\" colspan=2>";
$content .= "[ <a href=\"modules.php?name=Stories_Archive\">Tüm Haberler</a> ]      ";
$content .= "[ <a href=\"modules.php?name=Submit_News\">"._SUBMITNEWS."</a> ]      ";
$content .= "[ <a href=\"modules.php?name=Search&file=index\">"._SEARCH."</a> ]";

$content .= "</center></td></tr></table>";

?>

zazaeren

Kann keiner hier was sagen? Ich habe alleine wirklich alles versucht, aber erfolglos.  :cry

Vielleicht ist es ja nicht möglich?
Dann höre ich auch auf mit meine Versuche......

zazaeren

Dank Future habe ich es wie ich es haben wollte.  :D

Danke Future vielmals! Genau das habe ich versucht zu selber machen, aber net geschafft, ;)