Hallo liebe Community,
wollte fragen, ob die Ilch Community einen Addon hat wie der vom webSpell.
www.to-live.de <- so in etwa..
Die Newsansicht ist da wirklich sehr gut, und so eine bräuchten wir.
Bitte melden...
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<div style="width:300px; float:left; height:250px;"> <div align="center">{kate}</div> <div style="margin:5px;"> {text} </div> </div> {EXPLODE} <br /> <br /><center>{SITELINK}</center> {EXPLODE} <!-- News Kommentare und Mehr lesen --> <table class="border" width="100%" cellpadding="5" cellspacing="1" border="0"> <tr class="Chead"> <th height="25"><b>{NAME}</b></th> </tr> <tr> <td height="25" class="Cdark">{_lang_message}</td> </tr> <tr> <td class="Cnorm"> <div style="float:left; ">{KATE}</div> <div style="float:left; padding-left:10px; ">{TEXT}</div><br style="clear:both; " /> <p></p> <a href="index.php?news"><b>«</b> {_lang_back}</a> </td> </tr> <tr> <td height="25" class="Cmite">{_lang_commentsfor} {NAME}</td> </tr> <tr> <td class="Cnorm"> {EXPLODE} <form action="index.php?news-{NID}" method="POST"> <fieldset> <legend>{_lang_writecomment}</legend> <input type="text" name="name" value="{uname}" /> {ANTISPAM} <input type="submit" value="{_lang_enter}"><br /> <textarea style="width: 98%" cols="50" rows="2" name="txt"></textarea><br /> </fieldset> </form> <br /> {EXPLODE} <span class="Cmite"># <b>{ZAHL}</b> von {NAME}</span> <br />{TEXT}<br /><br /> {EXPLODE} <br /> <a href="index.php?news"><b>«</b> {_lang_back}</a> </td> </tr> </table> {EXPLODE} <table width="100%" border="0" cellspacing="0" cellpadding="5" class="rand"> <tr class="mite"> <td width="65%"><b>{NAME}</b></td> <td width="15%">{FUER}</td> <td width="20%" align="right">{DATE}</td> </tr><tr class="norm"> <td valign="top" colspan="2">{TEXT}{MEHR}</td> <td valign="top" rowspan="2" align="center">{KATE}</td> </tr><tr class="norm"> <td valign="bottom" height="20" colspan="2" align="center"> <b>{_lang_from} {UNAME}</b> [ {KOM} <a href="index.php?news-1&nid={ID}">{_lang_comments}</a> ] </td> </tr> </table>
$i=0; echo '<table cellpadding="5" cellspacing="0"><tr>'; $o = opendir('include/images/avata/'); while ( $bild = readdir($o) ) { if (substr($bild,0,4) == 'usr_') { if ( $bild == '.' OR $bild== '..' ) { continue; } if ( ( $i % 4 ) == 0 AND $i <> 0) { echo '</tr><tr>'; } echo '<td><a href="#" onClick="javascript:put(\''.$bild.'\')"><img src="include/images/avata/'.$bild.'" border="0"></a></td>'; $i++; } } echo '</tr></table>';
<div style="position:relative;"> <div style="float:left; margin-bottom:5px;"> {EXPLODE} <div class="news_small"> <div class="news_small_top"></div> <div class="news_small_banner">{kate}</div> <div class="news_small_text"> <a href="index.php?news-{id}"><b>{title}</b><br /> {text} </a></b></i></u></a></font> </div> <div class="news_small_bottom"></div> </div> {EXPLODE} </div> ....
... .news_small{ float:left; background-image:url(images/news_small_bg.jpg); background-repeat:repeat-y; width:262px; margin:5px 3px 0 0; } .news_small_top{ background:url(images/news_small_top.jpg); width:262px; height:3px; } .news_small_banner{ width:256px; height:37px; margin:0 3px 0 3px; } .news_small_text{ margin:4px 5px 7px 9px; height:119px; width:248px; overflow:hidden; } .news_small_text a{ font-size:10px; color:#333333; text-decoration:none; font-weight:normal; } .news_small_text a:hover{ color:#000000; } .news_small_bottom{ background:url(images/news_small_bottom.jpg); width:262px; height:3px; } ...
... .news_small{ float:left; background-image:url(Bilder/news/news_small_bg.png); background-repeat:repeat-y; width:268px; margin:5px 3px 0 0; } .news_small_top{ background:url(Bilder/news/news_small_top.png); width:268px; height:3px; } .news_small_banner{ width:268px; height:115px; margin:0 3px 0 3px; } .news_small_text{ margin:4px 5px 7px 9px; height:119px; width:248px; overflow:hidden; } .news_small_text a{ font-size:10px; color:# 000000; text-decoration:none; font-weight:normal; } .news_small_bottom{ background:url(Bilder/news/news_small_bottom.png); width:262px; height:3px; } ...
<div style="position:relative;"> <div style="float:left; margin-bottom:5px;"> {EXPLODE} <div class="news_small"> <div class="news_small_top"></div> <div class="news_small_banner">{kate}</div> <div class="news_small_text"> <a href="index.php?news-{id}"><b>{title}</b></a><br /> {text} </b></i></u></font> </div> <div class="news_small_bottom"></div> </div> {EXPLODE} </div> <br /> <br /><center>{SITELINK}</center> {EXPLODE} <script language="JavaScript" type="text/javascript"> function delkom (NID, ID) { var Check = confirm("Kommentar wirklich löschen?") if (Check == true) window.open("index.php?news-"+NID+"-d"+ID,"_self"); }</script> <!-- News Kommentare und Mehr lesen --> <table class="border" width="100%" cellpadding="5" cellspacing="1" border="0"> <tr class="Chead"> <th height="25"><b>{NAME}</b></th> </tr> <tr> <td height="25" class="Cdark">{_lang_message}</td> </tr> <tr> <td class="Cnorm"> <div style="float:left; ">{KATE}</div> <div style="float:left; padding-left:10px; ">{TEXT}</div><br style="clear:both; " /> <p></p> <a href="index.php?news"><b>«</b> {_lang_back}</a> </td> </tr> <tr> <td height="25" class="Cmite">{_lang_commentsfor} {NAME}</td> </tr> <tr> <td class="Cnorm"> {info} {EXPLODE} <form action="index.php?news-{NID}" name="komform" method="POST"> <fieldset> <legend>{_lang_writecomment}</legend> <input type="text" id="komname" name="name" value="{uname}" {style} /> {ANTISPAM} <span id="komsubspan"><input type="submit" onclick="xajax_checkKomName(document.getElementById('komname').value);" value="{_lang_enter}"></span><br /> <textarea style="width: 98%" cols="50" rows="2" name="txt"></textarea><br /> </fieldset> </form> <script type="text/javascript"><!-- document.getElementById('komsubspan').innerHTML='<input type="button" onclick="xajax_checkKomName(document.getElementById(\'komname\').value);" value="{_lang_enter}">'; --></script> <br /> {EXPLODE} <span class="Cmite"># <b>{ZAHL}</b> von {NAME}</span> <br />{TEXT}<br /><br /> {EXPLODE} <br /> <a href="index.php?news"><b>«</b> {_lang_back}</a> </td> </tr> </table> {EXPLODE} <table width="100%" border="0" cellspacing="0" cellpadding="5" class="rand"> <tr class="mite"> <td width="65%"><b>{NAME}</b></td> <td width="15%">{FUER}</td> <td width="20%" align="right">{DATE}</td> </tr><tr class="norm"> <td valign="top" colspan="2">{TEXT}{MEHR}</td> <td valign="top" rowspan="2" align="center">{KATE}</td> </tr><tr class="norm"> <td valign="bottom" height="20" colspan="2" align="center"> <b>{_lang_from} {UNAME}</b> [ {KOM} <a href="index.php?news-{ID}">{_lang_comments}</a> ] </td> </tr> </table>
<?php # Copyright by: Manuel Staechele # Support: www.ilch.de # Modded by Mairu für News Extended defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: News'; $hmenu = 'News'; $design = new design ( $title , $hmenu ); $design->addheader('<link rel="alternate" type="application/atom+xml" title="News (Atom)" href="index.php?news-atom" /> <link rel="alternate" type="application/rss+xml" title="News (RSS)" href="index.php?news-rss" />'); function news_find_kat ($kat) { $katpfad = 'include/images/news/'; $katjpg = $katpfad.$kat.'.jpg'; $katgif = $katpfad.$kat.'.gif'; $katpng = $katpfad.$kat.'.png'; if ( file_exists( $katjpg ) ) { $pfadzumBild = $katjpg; } elseif ( file_exists ( $katgif ) ) { $pfadzumBild = $katgif; } elseif ( file_exists ( $katpng ) ) { $pfadzumBild = $katpng; } if ( !empty( $pfadzumBild ) ) { $kategorie = '<img style="" src="'.$pfadzumBild.'" alt="'.$kat.'">'; } else { $kategorie = '<b>'.$kat.'</b><br /><br />'; } return ( $kategorie ); } //Schaut ob ein Name so oder ähnlich in der Datenbank vorhanden ist //gibt true zurück falls der Name noch nicht verwendet ist function checkName($name) { if (db_count_query("SELECT COUNT(name) FROM prefix_user WHERE name LIKE '$name'")) { return false; } else { return true; } } function checkKomName($name) { $resp = new xajaxResponse(); if (checkName($name) OR loggedin()) { $name = utf8_decode($name); $resp->script('document.forms["komform"].submit();'); } else { $resp->assign('komname','value' ,'' ); $resp->alert('Dieser Name ist bereits an einen User vergeben, benutze bitte einen anderen.'); $resp->script("document.getElementById('komname').focus();"); } return $resp; } //xajax für namencheck $xajax = new xajax('index.php?news-ajax'); $xajax->registerFunction('checkKomName'); $xajax->processRequest(); if ($menu->get(1) == 'ajax') { exit(); } if ( !is_numeric($menu->get(1)) ) { if($menu->get(1) == 'rss' || $menu->get(1) == 'atom') { #ob_clean(); $feed_type = $menu->get(1); $abf = "SELECT MAX(news_time) AS last_update FROM prefix_news"; $erg = db_query($abf); $row = db_fetch_assoc($erg); $last_update = str_replace(' ', 'T', $row['last_update']) . 'Z'; $tn_id = intval(@db_result($news_opts = db_query("SELECT v1 FROM prefix_allg WHERE k = 'news' LIMIT 1"),0)); $abf = "SELECT a.news_title as title, a.news_id as id,"; $abf .= ($feed_type == 'atom') ? 'a.news_time as datum,' : "DATE_FORMAT(a.news_time,'%a, %e %b %y %H:%i:%s') as datum,"; $abf .= "a.news_kat as kate, a.news_text as text, b.name as username, a.html FROM prefix_news as a LEFT JOIN prefix_user as b ON a.user_id = b.id WHERE a.news_recht = 0 AND a.`show` > 0 AND a.`show` <= UNIX_TIMESTAMP() AND a.news_id != $tn_id AND a.`archiv` != 1 AND (a.endtime IS NULL OR a.endtime > UNIX_TIMESTAMP()) ORDER BY news_time DESC LIMIT 15"; $erg = db_query($abf); $tpl = new tpl( 'news_'.$menu->get(1).'.htm' ); header('Content-type: application/' . $menu->get(1) . '+xml'); $tpl->set_ar_out(array('FEEDTITLE' => $allgAr['title'], 'UPDATED' => $last_update, 'SITEURL' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF'])), 0); while ($row = db_fetch_assoc($erg)) { if($feed_type == 'atom') { $row['datum'] = str_replace(' ', 'T', $row['datum']) . 'Z'; } $a = explode('[PREVIEWENDE]', $row['text']); $tpl->set_ar_out(array('TITLE' => $row['title'], 'TXT' => $row['html'] ? $a[0] : bbcode($a[0]), 'LINK' => 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']). '/index.php?news-' . $row['id'], 'AUTHOR' => $row['username'], 'DATE' => $row['datum'] ), 1); } $tpl->out(0); exit; } else { $design->header(); $limit = $allgAr['Nlimit']; $page = ( $menu->getA(1) == 'p' ? $menu->getE(1) : 1 ); $anfang = ($page - 1) * $limit; //Topnews ausgeben $tn_id = intval(@db_result($news_opts = db_query("SELECT v1, v2 FROM prefix_allg WHERE k = 'news' LIMIT 1"),0,0)); $tn_koms = @db_result($news_opts,0,1); $tn_sql = db_query("SELECT news_title, news_text, html FROM prefix_news WHERE news_id = $tn_id AND `show` > 0 AND `show` <= UNIX_TIMESTAMP() AND (endtime IS NULL OR endtime > UNIX_TIMESTAMP())"); if (db_num_rows($tn_sql) > 0) { $tn_r = db_fetch_object($tn_sql); $tn_tpl = new tpl ( 'news_top'); $tn_tpl->set('title',$tn_r->news_title); $tn_tpl->set('koms', $tn_koms == '1' ? '<br /><a href="index.php?news-'.$tn_id.'">'.db_count_query("SELECT COUNT(id) FROM prefix_koms WHERE uid = $tn_id AND cat = 'NEWS'").' '.$lang['comments'].' </a>' : '' ); $tn_tpl->set_out('txt', $tn_r->html ? $tn_r->news_text : bbcode($tn_r->news_text), 0 ); unset($tn_tpl); } $MPL = db_make_sites ($page , "WHERE news_recht >= {$_SESSION['authright']} AND `show` > 0 AND `show` <= UNIX_TIMESTAMP() AND news_id != $tn_id AND archiv != 1 AND (endtime IS NULL OR endtime > UNIX_TIMESTAMP())" , $limit , '?news' , 'news' ); //Normale News $tpl = new tpl ( 'news.htm' ); $abf = "SELECT a.news_title as title, a.news_id as id, DATE_FORMAT(a.news_time,'%d. %m. %Y - %H:%i Uhr') as datum, DATE_FORMAT(a.news_time,'%W') as dayofweek, a.news_kat as kate, a.news_text as text, b.name as username, c.name as editorname, a.html, a.edit_time FROM prefix_news as a LEFT JOIN prefix_user as b ON a.user_id = b.id LEFT JOIN prefix_user as c ON a.editor_id = c.id WHERE (".$_SESSION['authright']." <= a.news_recht OR a.news_recht = 0) AND a.`show` > 0 AND a.`show` <= UNIX_TIMESTAMP() AND news_id != $tn_id AND a.`archiv` != 1 AND (a.endtime IS NULL OR a.endtime > UNIX_TIMESTAMP()) ORDER BY a.news_time DESC LIMIT ".$anfang.",".$limit; #echo '<pre>'.$abf.'</pre>'; $erg = db_query($abf); while ($row = db_fetch_assoc($erg)) { $k0m = db_query("SELECT COUNT(ID) FROM `prefix_koms` WHERE uid = ".$row['id']." AND cat = 'NEWS'"); $row['kom'] = db_result($k0m,0); $row['kate'] = news_find_kat($row['kate']); $row['datum'] = $lang[$row['dayofweek']].' '.$row['datum']; if ( strpos ( $row['text'] , '[PREVIEWENDE]' ) !== FALSE ) { $a = explode('[PREVIEWENDE]' , $row['text']); $row['text'] = $a[0]; $row['readwholenews'] = '» <a href="index.php?news-'.$row['id'].'">'.$lang['readwholenews'].'</a> «'; } else { $row['readwholenews'] = ''; } if (!$row['html']) { $row['text'] = bbcode($row['text']); } $row['edit'] = is_null($row['edit_time']) ? '' : '<br /><i>zuletzt geändert am '.date('d.m.Y - H:i',strtotime($row['edit_time'])).'Uhr'; if (!empty($row['edit']) and $row['editorname'] != $row['username']) { $row['edit'] .= ' von '.$row['editorname'].'</i>'; } elseif (!empty($row['edit'])) { $row['edit'] .= '</i>'; } $tpl->set_ar_out($row,0); } $tpl->set_out('SITELINK', $MPL,1); unset($tpl); } } else { $design->header(); $xajax->printJavascript(); $nid = escape($menu->get(1), 'integer'); $row = db_fetch_object(db_query("SELECT * FROM `prefix_news` WHERE `news_recht` >= {$_SESSION['authright']} AND `show` > 0 AND `show` <= UNIX_TIMESTAMP() AND news_id = '".$nid."'")); if ( has_right(array($row->news_recht)) ) { $komsOK = true; if ( $allgAr['Ngkoms'] == 0 ) { if ( loggedin() ) { $komsOK = true; } else { $komsOK = false; } } if ( $allgAr['Nukoms'] == 0 ) { $komsOK = false; } $kom_info = ''; # kommentar add if ( (loggedin() OR chk_antispam ('newskom')) AND $komsOK AND !empty($_POST['name']) AND !empty($_POST['txt']) ) { $_POST['txt'] = escape($_POST['txt'],'string'); $_POST['name'] = escape($_POST['name'],'string'); if (checkName($_POST['name']) or loggedin()) { if (loggedin()) { $_POST['name'] = $_SESSION['authname']; } db_query("INSERT INTO `prefix_koms` (`uid`,`cat`,`name`,`text`) VALUES (".$nid.",'NEWS','".$_POST['name']."','".$_POST['txt']."')"); } else { $kom_info = '<span style="color:red;">Dieser Name ist bereits an einen User vergeben, benutze bitte einen anderen.</span><br />'; } } # kommentar add # kommentar loeschen if ($menu->getA(2) == 'd' AND is_numeric($menu->getE(2)) AND has_right(-7, 'news')) { $kommentar_id = escape($menu->getE(2),'integer'); db_query("DELETE FROM prefix_koms WHERE uid = ".$nid." AND cat = 'NEWS' AND id = ".$kommentar_id); } # kommentar loeschen $kategorie = news_find_kat($row->news_kat); $textToShow = $row->html ? $row->news_text : bbcode($row->news_text); $textToShow = str_replace('[PREVIEWENDE]','',$textToShow); if ( !empty($such) ) { $textToShow = markword($textToShow,$such); } $tpl = new tpl ( 'news.htm' ); $ar = array ( 'TEXT' => $textToShow, 'KATE' => $kategorie, 'NID' => $nid, 'uname' => $_SESSION['authname'], 'ANTISPAM' => (loggedin()?'':get_antispam ('newskom', 0)), 'NAME' => $row->news_title, 'info' => $kom_info ); $tpl->set_ar_out($ar, 2 ); if ($komsOK) { $tpl->set_ar_out ( array ( 'NAME' => $row->news_title , 'NID' => $nid, 'style' => loggedin() ? 'style="display:none;"' : ''), 3 ); } $erg1 = db_query("SELECT text, name, id FROM `prefix_koms` WHERE uid = ".$nid." AND cat = 'NEWS' ORDER BY id DESC"); $ergAnz1 = db_num_rows($erg1); if ( $ergAnz1 == 0 ) { echo '<b>'.$lang['nocomments'].'</b>'; } else { $zahl = $ergAnz1; while ($row1 = db_fetch_assoc($erg1)) { $row1['text'] = bbcode(trim($row1['text'])); if (has_right(-7, 'news')) { $row1['text'] .= '<a href="javascript:delkom('.$nid.','.$row1['id'].')"><img src="include/images/icons/del.gif" alt="löschen" border="0" title="löschen" /></a>'; } $tpl->set_ar_out( array('NAME' => $row1['name'], 'TEXT' => $row1['text'], 'ZAHL' => $zahl ) , 4 ); $zahl--; } } } $tpl->out(5); } $design->footer(); ?>
Geschlossen | ||
Zurück zu Plauder Ecke |