Hi Leute,
ich suche nach einer lösung für den block" NewsmaaX.php"
ich möchte diesen nicht auf der startseite haben, wie geht das????
servus
hi,
habe mich vielleicht falsch ausgedrückt.
Ich möchte diesen Block nicht auf der Startseite,
sondern auf einer anderen Seite haben.
Wie geht das? Hat jemand eine Idee????
Servus
Also, so wie unsere DOWNLOAD`S als besipiel mit dem Block im Modu`?
Dann musst du den Blockinhalt bisschen umbauen und in die gewünschte Seite einsetzen.
ich möchte nur den Block auf einer Seite haben!!
was muß ich umbauen?
So ohne es zu testen würde ich sagen das sollte gehen.
require_once("mainfile.php");
include("config.php");
include('modules/News/functions.php');
$index = 1;
include("header.php");
$module_name = "News";
get_lang($module_name);
OpenTable();
global $storyhome, $httpref, $httprefmax, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $bgcolor2, $bgcolor4, $datetime;
echo"<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"tabletable\" width=\"100%\" valign=\"top\"><tr>";
$coun = 0;
if ($multilingual == 1) {
$querylang = "AND (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
if (isset($cookie[3])) {
$storynum = $cookie[3];
} else {
$storynum = $storyhome;
}
$result = mysql_query("SELECT sid, catid, aid, title, time, DATE_ADD(time, INTERVAL 2 DAY), now(), hometext, bodytext, comments, counter, topic, informant, notes, acomm FROM $prefix"._stories." WHERE (ihome='0' OR catid='0') $querylang ORDER BY sid DESC limit $storynum");
if(!$result) {
echo mysql_errno(). ": ".mysql_error(). "<br>"; exit();
}
while (list($s_sid, $catid, $aid, $title, $time, $expire, $now, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes, $acomm) = mysql_fetch_row($result)) {
if ($catid > 0) {
list($cattitle) = mysql_fetch_row(mysql_query("select title from $prefix"._stories."_cat where catid='$catid'"));
}
$printP = "<a href=\"modules.php?name=News&file=print&sid=$s_sid\"><img src=\"images/menu/print.gif\" border=0 Alt=\""._PRINTER."\" ></a>";
$sendF = "<a href=\"modules.php?name=News&file=friend&op=FriendSend&sid=$s_sid\"><img src=\"images/menu/friend.gif\" border=0 Alt=\""._FRIEND."\" ></a>";
getTopics($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 = strftime("%d-%m-%Y", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
$subject = stripslashes($subject);
$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 Alt=\""._BYTESMORE." $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\" border=0 Alt=\""._COMMENTS." $comments\" ></a>";
$senderT = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$informant\"><img src=\"images/menu/informant.gif\" border=0 Alt=\"$informant\" ></a>";
$counterC = "<img src=\"images/menu/counter.gif\" border=0 Alt=\""._READS." $counter\" ></a>";
$empty = "<img src=\"images/menu/empty.gif\" border=0 >";
$sid = $s_sid;
if ($catid != 0) {
$resultm = mysql_query("select title from $prefix"._stories."_cat where catid='$catid'");
list($title1) = mysql_fetch_row($resultm);
$title = "$title <a class =\"storycat\" href=\"modules.php?name=News&file=categories&op=newindex&catid=$catid\">[ $title1 ]</a>";
}
echo"<td width= \"50%\">";
echo"<table border=\"1\" cellspacing=\"1\"><tr>";
echo"<td class=\"tableColumnLeftTD\"width=\"80%\" bgcolor=\"$bgcolor4\"><font class=\"newsmaax_date\">($datetime)</font></td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$senderT</td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$printP</td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$sendF</td>";
if ($comments > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$commentC</td>";} else {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ($fullcount > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$byteM</td>"; } else {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ($counter > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$counterC</td>";} else {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ( $now>$expire ) {$image="sign";} else { $image="new";}
echo"</tr><tr>";
echo"<td class=\"tableColumnRightTD\" colspan=\"7\" bgcolor=\"$bgcolor3\"><img src=images/menu/$image.gif align=\"absmiddle\"> <a href=\"modules.php?name=News&file=article&sid=$s_sid\"><font class=\"newsmaax_title\">$title</font></a></td>";
echo"</tr></table></td>";
if ($coun == 1) {
$content.= "</tr><tr>";
$coun = 0;
} else {
$coun++;
}
}
mysql_free_result($result);
echo"</tr></table>";
echo"<table width=\"100%\"><tr><td bgcolor=\"$bgcolor4\"><center>";
echo"[ <a href=\"modules.php?name=Stories_Archive\">Stories Archive</a> ] ";
echo"[ <a href=\"modules.php?name=Submit_News\">"._SUBMITNEWS."</a> ] ";
echo"[ <a href=\"modules.php?op=modload&name=Search&file=index\">"._SEARCH."</a> ]";
echo"</center></tr><br><br></td></table>";
CloseTable();
include("footer.php");
Hi DarkBoy,
bekomme jetzt den Fehler
Parse error: parse error in modules/News1/index.php on line 49
wieso NEWS1
ZitatParse error: parse error in modules/News1/index.php on line 49
benutzt du 2 Newsmodule oder ??
nein habe deinen quelltext als index.php gespeichert und das ganze
als modul news1 angelegt
war wohl falsch
Ups, nein das war als ROOT Datei gedacht, SORRY
Modul ist das net
ZitatUps, nein das war als ROOT Datei gedacht, SORRY
Modul ist das net
gibt es eine möglichkeit als modul???
sicher, muss ich nur umfuckeln, ist nicht viel :) aber momentan no time
hi darkboy,
kein prob, aber wenn du mich nicht vergißt, wäre ich dir dankbar!!!!!!
Zitatsicher, muss ich nur umfuckeln, ist nicht viel :) aber momentan no time
VERSUCH Teil2 mal aus dem Stehgreif und ohne TEST <?
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$index = 0; // rechte Blöcke an-abschalten 0= aus / 1=an
$blockleft = 1;// linke Blöcke an-abschalten 0= an / 1=aus
include("header.php");
include('modules/News/functions.php');
$module_name = "News";
get_lang($module_name);
OpenTable();
global $storyhome, $httpref, $httprefmax, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $bgcolor2, $bgcolor4, $datetime;
echo"<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"tabletable\" width=\"100%\" valign=\"top\"><tr>";
$coun = 0;
if ($multilingual == 1) {
$querylang = "AND (alanguage='$currentlang' OR alanguage= '')";
} else {
$querylang = "";
}
if (isset($cookie[3])) {
$storynum = $cookie[3];
} else {
$storynum = $storyhome;
}
$result = mysql_query("SELECT sid, catid, aid, title, ti, me, DATE_ADD(time, INTERVAL 2 DAY), now(), ho metext, bodytext, comments, counter, topic, inform ant, notes, acomm FROM $prefix"._stories." WHERE (ihome='0' OR catid='0')ORDER BY sid DESC limit $storynum");
if(!$result) {
echo mysql_errno(). ": ".mysql_error(). "<br>"; exit();
}
while (list($s_sid, $catid, $aid, $title, $time, $expire, $now, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes, $acomm) = mysql_fetch_row($result)) {
if ($catid > 0) {
list($cattitle) = mysql_fetch_row(mysql_query("select title from $prefix"._stories."_cat where catid='$catid'"));
}
$printP = "<a href=\"modules.php?name=News&file=print&sid=$s_sid< font color=\"#007700\">\"><img src=\"images/menu/print.gif\" border=0 Alt=\""._PRINTER."\" ></a>";
$sendF = "<a href=\"modules.php?name=News&file=friend&op=FriendSend& ;sid=$s_sid\"><img src=\"images/menu/friend.gif\" border=0 Alt=\""._FRIEND."\" ></a>";
getTopics($s_sid);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2})<img src=\"modules/eBoard/images/smilies/sad.gif\" border=0>[0-9]{1,2})<img src=\"modules/eBoard/images/smilies/sad.gif\" border=0>[0-9]{1,2})", $time, $datetime);
$datetime = strftime("%d-%m-%Y", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
$subject = stripslashes($subject);
$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 Alt=\""._BYTESMORE." $fullcount\" ></a>";
$commentC = "<a href=\"modules.php?name=News&file=article&sid=$s_sid&m ode=&order=0&thold=0\"><img src=\"images/menu/comments2.gif\" border=0 Alt=\""._COMMENTS." $comments\" ></a>";
$senderT = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$in formant\"><img src=\"images/menu/informant.gif\" border=0 Alt=\"$informant\" ></a>";
$counterC = "<img src=\"images/menu/counter.gif\" border=0 Alt=\""._READS." $counter\" ></a>";
$empty = "<img src=\"images/menu/empty.gif\" border=0 >";
$sid = $s_sid;
if ($catid != 0) {
$resultm = mysql_query("select title from $prefix"._stories."_cat where catid='$catid'");
list($title1) = mysql_fetch_row($resultm);
$title = "$title <a class =\"storycat\" href=\"modules.php?name=News&file=categories&op=newindex&a mp;catid=$catid\">[ $title1 ]</a>";
}
echo"<td width= \"50%\">";
echo"<table border=\"1\" cellspacing=\"1\"><tr>";
echo"<td class=\"tableColumnLeftTD\"width=\"80%\" bgcolor=\"$bgcolor4\"><font class=\"newsmaax_date\">($datetime)</font></td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$senderT</td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$printP</td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$sendF</td>";
if ($comments > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$commentC</td>";} else {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ($fullcount > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$byteM</td>"; } else {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ($counter > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$counterC</td>";} else {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ( $now>$expire ) {$image="sign";} else { $image="new";}
echo"</tr><tr>";
echo"<td class=\"tableColumnRightTD\" colspan=\"7\" bgcolor=\"$bgcolor3\"><img src=images/menu/$image.gif align=\"absmiddle\"> <a href=\"modules.php?name=News&file=article&sid=$s_sid\"><font class=\"newsmaax_title\">$title</font></a></td>";
echo"</tr></table></td>";
if ($coun == 1) {
$content.= "</tr><tr>";
$coun = 0;
} else {
$coun++;
}
}
mysql_free_result($result);
echo"</tr></table>";
echo"<table width=\"100%\"><tr><td bgcolor=\"$bgcolor4\"><center>";
echo"[ <a href=\"modules.php?name=Stories_Archive\">Stories Archive</a> ] ";
echo"[ <a href=\"modules.php?name=Submit_News\">"._SUBMITNEWS."</a> ] ";
echo"[ <a href=\"modules.php?op=modload&name=Search&file=index\">"._SEARCH."</a> ]";
echo"</center></tr><br><br></td>& lt;/table>";
CloseTable();
include("footer.php");
?>
Geht das nicht geh ich es in Ruhe testen, weil ist nur aus dem Handgelenk, obowhl mich hier betrübt das ich einen Fehler engebuat habe!!!!! Isch sach es vorwech :D
Hi DarkBoy,
danke für Deine Arbeit,
Fehler in der 1 Zeile habe ich geändert, aber jetzt kommt ein Fehler in Zeile 173
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in \modules\News\index.php on line 173
für Dich bestimmt eine Kleinigkeit
danke Bert
Hm
was hasst du in zeile 1 geändert? und was ist bei dir zeile 173?
Poste mal so 3 zeilen davor und 3 danach.
wie heisst das modul bei dir wo dieser block nun reinsoll?
ZitatHm
was hasst du in zeile 1 geändert? und was ist bei dir zeile 173?
Poste mal so 3 zeilen davor und 3 danach.
wie heisst das modul bei dir wo dieser block nun reinsoll?
Zeile 1 war mein Fehler ENTSCHULDIGUNG
echo"</tr></table>";
echo"<table width=\"100%\"><tr><td bgcolor=\"$bgcolor4\"><center>";
echo"[ <a href=\"modules.php?name=Stories_Archive\">Stories Archive</a> ] ";
echo"[ <a href=\"modules.php?name=Submit_News\">"._SUBMITNEWS."</a> ] ";
(Zeile 173)echo"[ <a href=\"modules.php?op=modload&name=Search&file=index\">"< font color="#007700">._SEARCH."</a> ]";
echo"</center></tr><br><br></td>& lt;/table>";
CloseTable();
include("footer.php");
Name des Modules Volleynews
So
nun aber
Zitat(Zeile 173)echo"[ <a href=\"modules.php?op=modload&name=Search&file=index\">._SEARCH."</a> ]";
Das FONT holt er sich eh als link aus dem css
Hi darkboy,
danke für deinen post. mußte noch ein paar kleinigkeiten änder und funzt jetzt soweit. nur ein prob gibt es noch!
die news werden alle in einer reihe angezeigt und nicht in 2 spalten.
anbei poste ich noch einmal den code. kannst du ihn dir noch einmal anschauen?????? wäre echt toll von dir!!!!!!!
danke bert
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$index = 0; // rechte Blöcke an-abschalten 0= aus / 1=an
$blockleft = 1;// linke Blöcke an-abschalten 0= an / 1=aus
include("header.php");
include('modules/News/functions.php');
$module_name = "News";
get_lang($module_name);
OpenTable();
global $storyhome, $httpref, $httprefmax, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl,
$prefix, $multilingual, $currentlang, $articlecomm, $bgcolor2, $bgcolor4, $datetime;
echo"<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"tabletable\" width=\"100%\"
valign=\"top\"><tr>";
$coun = 0;
if ($multilingual == 1) {
$querylang = "AND (alanguage='$currentlang' OR alanguage= '')";
} else {
$querylang = "";
}
if (isset($cookie[3])) {
$storynum = $cookie[3];
} else {
$storynum = $storyhome;
}
$result = mysql_query("SELECT sid, catid, aid, title, time, DATE_ADD(time, INTERVAL 2 DAY), now(), hometext,
bodytext, comments, counter, topic, informant, notes, acomm FROM $prefix"._stories." WHERE (ihome='0' OR catid='0')
$querylang ORDER BY sid DESC limit $storynum");
if(!$result) {
echo mysql_errno(). ": ".mysql_error(). "<br>"; exit();
}
while (list($s_sid, $catid, $aid, $title, $time, $expire, $now, $hometext, $bodytext, $comments, $counter,
$topic, $informant, $notes, $acomm) = mysql_fetch_row($result)) {
if ($catid > 0) {
list($cattitle) = mysql_fetch_row(mysql_query("select title from $prefix"._stories."_cat where
catid='$catid'"));
}
$printP = "<a href=\"modules.php?name=News&file=print&sid=$s_sid<&nbs p;font color=\"#007700\">\"><img
src=\"images/menu/print.gif\" border=0 Alt=\""._PRINTER."\" ></a>";
$sendF = "<a href=\"modules.php?name=News&file=friend&op=FriendSend& ; ;sid=$s_sid\"><img
src=\"images/menu/friend.gif\" border=0 Alt=\""._FRIEND."\" ></a>";
getTopics($s_sid);
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2})<img src=\"modules/eBoard/images/smilies/sad.gif\"
border=0>[0-9]{1,2})<img src=\"modules/eBoard/images/smilies/sad.gif\" border=0>[0-9]{1,2})", $time, $datetime);
$datetime = strftime("%d-%m-%Y",
mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
$subject = stripslashes($subject);
$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 Alt=\""._BYTESMORE." $fullcount\" ></a>";
$commentC = "<a href=\"modules.php?name=News&file=article&sid=$s_sid&m ode=&order=0&thold=0\"><img
src=\"images/menu/comments2.gif\" border=0 Alt=\""._COMMENTS." $comments\" ></a>";
$senderT = "<a href=\"modules.php?name=Your_Account&op=userinfo&uname=$in formant\"><img
src=\"images/menu/informant.gif\" border=0 Alt=\"$informant\" ></a>";
$counterC = "<img src=\"images/menu/counter.gif\" border=0 Alt=\""._READS." $counter\" ></a>";
$empty = "<img src=\"images/menu/empty.gif\" border=0 >";
$sid = $s_sid;
if ($catid != 0) {
$resultm = mysql_query("select title from $prefix"._stories."_cat where catid='$catid'");
list($title1) = mysql_fetch_row($resultm);
$title = "$title <a class =\"storycat\" href=\"modules.php?name=News&file=categories&op=newindex&a mp;a
mp;catid=$catid\">[ $title1 ]</a>";
}
echo"<td width= \"50%\">";
echo"<table border=\"1\" cellspacing=\"1\"><tr>";
echo"<td class=\"tableColumnLeftTD\"width=\"80%\" bgcolor=\"$bgcolor4\"><font
class=\"newsmaax_date\">($datetime)</font></td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$senderT</td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$printP</td>";
echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$sendF</td>";
if ($comments > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$commentC</td>";} else {echo"<td
class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ($fullcount > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$byteM</td>"; } else {echo"<td
class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ($counter > 0) {echo"<td class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$counterC</td>";} else {echo"<td
class=\"tableColumnLeftTD\" bgcolor=\"$bgcolor4\">$empty</td>";}
if ( $now>$expire ) {$image="sign";} else { $image="new";}
echo"</tr><tr>";
echo"<td class=\"tableColumnRightTD\" colspan=\"7\" bgcolor=\"$bgcolor3\"><img src=images/menu/$image.gif
align=\"absmiddle\"> <a href=\"modules.php?name=News&file=article&sid=$s_sid\"><font
class=\"newsmaax_title\">$title</font></a></td>";
echo"</tr></table></td>";
if ($coun == 1) {
$content.= "</tr><tr>";
$coun = 0;
} else {
$coun++;
}
}
mysql_free_result($result);
echo"</tr></table>";
echo"<table width=\"50%\"><tr><td bgcolor=\"$bgcolor4\"><center>";
echo"[ <a href=\"modules.php?name=Stories_Archive\">Stories Archive</a> ] ";
echo"[ <a href=\"modules.php?name=Submit_News\">"._SUBMITNEWS."</a> ] ";
echo"[ <a href=\"modules.php?op=modload&name=Search&file=index\">"._SEARCH."</a>& gt; ]";
echo"</center></tr><br><br></td>";
CloseTable();
include("footer.php");
hi,
mit dem umschreiben hat es nicht gefunzt, habe aber
das ganze mit dem block " 4ncenter" gelöst.
servus bert :)