Toplam Üye:
32638
Aktif Üye:
0
Aktif Ziyaretçi:
1011
??? Sitem deki Haberleri ..(25371 okuma, 26 yanıt) Free Hosta Php Nuke Kurul ..(16448 okuma, 14 yanıt) EKLENTİ: Misafire mesajın ..(36858 okuma, 38 yanıt) Php Nuke 9.0 Geliyor ..(20859 okuma, 19 yanıt) Bu başlık için mesaj bulu ..(14013 okuma, 15 yanıt) Facebook Sohbet Tipi Sohb ..(17740 okuma, 15 yanıt) üye aktivasyon ..(10631 okuma, 8 yanıt) Facebook tarzı altbar... ..(6259 okuma, 1 yanıt) kaldırmak istediğim bölüm ..(6534 okuma, 2 yanıt) Resimli RSS ..(23218 okuma, 25 yanıt) Onay linkini kaldirmak ..(11066 okuma, 8 yanıt) Yardım :( Site açılırken ..(6636 okuma, 2 yanıt) .Htaccess ile uzantıda ke ..(8262 okuma, 4 yanıt) block genişliği ..(5703 okuma, 1 yanıt) Haber Resimleri ve Slide ..(14374 okuma, 12 yanıt) Foruma büyük boyutlu resi ..(7298 okuma, 3 yanıt) Php-Nuke 8.0 Paket ..(9423 okuma, 6 yanıt) Hangi sürümü önerirsiniz? ..(10487 okuma, 8 yanıt) ethai1 3 ..(13144 okuma, 10 yanıt) Yeni PEHASPESEO ..(69827 okuma, 82 yanıt) Türkçe Karakter sorunu ? ..(37717 okuma, 36 yanıt) tek modul için sağ ve sol ..(11396 okuma, 8 yanıt) Php-nuke8.0 başlıklarda t ..(10577 okuma, 8 yanıt) Phpden iyi anlayan ..(5413 okuma, 1 yanıt) Php nuke 7.6 - 3.1 patch ..(73190 okuma, 89 yanıt) Mp3 Üst Player Yardım ..(29483 okuma, 40 yanıt) Toplu üyelik silme? ..(11112 okuma, 8 yanıt) Çözümleyemediğim hata... ..(12370 okuma, 11 yanıt) bloğu kayan hale getirmek ..(5962 okuma, 2 yanıt) Makale modulu ..(8575 okuma, 5 yanıt) PHP-Nuke Haber V.1 Paylas ..(85198 okuma, 121 yanıt) title değiştirme ..(10290 okuma, 6 yanıt) Arkadaşlar bu sorunun çöz ..(10025 okuma, 6 yanıt) Php Nuke 8.1 ..(4340 okuma, 0 yanıt) merhaba ..(10266 okuma, 9 yanıt) Anasayfa için boş modül o ..(13483 okuma, 13 yanıt) admin panelinde Access De ..(6377 okuma, 2 yanıt) Bu başlığa hiç cevap gelm ..(26364 okuma, 25 yanıt) Nuke Tema yapilisi ..(17101 okuma, 16 yanıt) Mavisce-net temasina bann ..(8714 okuma, 6 yanıt) PHP-Nuke wTeam - eklentil ..(6630 okuma, 2 yanıt) coppermine hata ..(10678 okuma, 8 yanıt) içerik tanıtımı ..(6271 okuma, 2 yanıt) Haber Ve İçeriğe Resim Ek ..(7157 okuma, 3 yanıt) google keywords ..(8954 okuma, 6 yanıt) 8.0'da html sorunu ..(5493 okuma, 1 yanıt) PHP-Nuke_8.1.3.5+NukeSent ..(54000 okuma, 76 yanıt) üye olunurken gereksiz is ..(10006 okuma, 7 yanıt) Arkadaşlar kolifa haber s ..(6349 okuma, 2 yanıt) Hesabınız'a tıklayınca te ..(10484 okuma, 7 yanıt)
Netopsiyon Online: Forums
Netopsiyon Online :: Başlık görüntüleniyor - Topic image ?
Önceki başlık :: Sonraki başlık
Yazar
Mesaj
24872 Mesaj: 50+
Kayıt: Aug 07, 2006 Mesajlar: 93
Tarih: 2007-06-28, 21:04:42 Mesaj konusu: Topic image ?
aşağıdaki gibi bir haber bloğum var. ama blokta haber hangi konu (topic) da ise o konunun resmininde yanında çıkmasını istiyorum. ilgilenen olursa sevinirim.
Kod:
<?php
/**
* pragmaMx Content Management System
* Copyright (c) 2006 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 as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* $Source: /home/www/dps3311/home/cvsroot/pragmamx/html/blocks/Attic/block-News.php,v $
* $Revision: 1.1.2.4 $
* $Author: tora60 $
* $Date: 2006/11/20 14:26:07 $
*/
if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
/**
* -----------------------------------------------------------------------------
* Einstellungen fuer den Block
*/
// die ersten Teile des Artikeltextes anzeigen,
// - 0 fuer nein, oder
// - eine beliebige Zahl, die die Menge der angezeigten Zeichen definiert
// HTML-Tags, ausser <br> werden entfernt und nicht mitgerechnet
$showintro = 300;
// Bilder im Text anzeigen, wenn $showintro angeschaltet ist
$showpics = false;
// Buttonleiste anzeigen
$showbuttons = 0;
// Veroeffentlichungsdatum anzeigen
$showdate = 1;
// Kategorie zusammen mit der Artikelueberschrift anzeigen
$showcattitle = 1;
// Anzahl der Spalten
$showcolumns = 2;
// Anzahl der angezeigten Artikel
// - eine beliebige Zahl, oder
// - die globale Variable $GLOBALS['storyhome']
$storynum = $GLOBALS['storyhome'];
// Links zu Suche etc. anzeigen
$showextendedlinks = 0;
// Blockcache erlauben
$mxblockcache = true;
/**
* ENDE Einstellungen fuer den Block
* -----------------------------------------------------------------------------
*/
global $prefix, $bgcolor1, $bgcolor2, $bgcolor3;
if ($GLOBALS["multilingual"] == 1) {
if (ereg("german", $GLOBALS["currentlang"])) $thislang = "german";
else $thislang = $GLOBALS["currentlang"];
$querylang = "AND (alanguage LIKE '" . $thislang . "%' OR alanguage='')";
} else {
$querylang = "";
}
$qry = "SELECT sid, cat.catid, aid, s.title, time, DATE_ADD(time, INTERVAL 2 DAY) AS expire, now() AS jetzt, 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";
$result = sql_query($qry);
if (!$result) {
return;
}
// $empty = "<img src=\"images/menu/empty.gif\" border=0 >";
$count = 0;
$out = '';
$width = ceil(100 / $showcolumns);
while ($story = sql_fetch_assoc($result)) {
// Textlaengen
// $introcount = strlen(strip_tags($story['hometext']));
// $fullcount = strlen(strip_tags($story['bodytext']));
$totalcount = strlen(strip_tags($story['hometext'])) + strlen(strip_tags($story['bodytext']));
$introtext = '';
if ($showintro) {
if ($showpics) {
// Alle Tags ausser <br> & <img> entfernen
$introtext = trim(strip_tags($story['hometext'], '<br><img>'));
// <br> am Textbeginn entfernen
$introtext = preg_replace('#^(?:<br\s*/*>\s*)*#is', '', $introtext);
// array zuruecksetzen
$replaces = array();
$textlentemp = $showintro;
// alle Imagetags suchen und zwischenspeichern
if (preg_match_all('#<img[^>]*>#si', $introtext, $images)) {
foreach($images[0] as $i => $img) {
// einen alternativen String zum Ersetzen erstellen
$alternate = md5($img);
// die gewuenschte Textlaenge um die Textlaenge des alternativen String erweitern
$textlentemp = $showintro + strlen($alternate);
// den gefundenen Imagetag in das array stellen
$replaces[$alternate] = $img;
// den gefundenen Imagetag aus dem Text entfernen und dafuer den alternativen String einsetzen
$introtext = trim(str_replace($img, $alternate, $introtext));
}
}
// Text auf die gewuenschte Laenge kuerzen
$introtext = mxCutString($introtext, $textlentemp, " ...", " ");
// wenn imagetags gefunden wurden, die alternativen Textteile wieder
// durch die im Array zwischengespeicherten Imagetags ersetzen
if (count($replaces)) {
$introtext = str_replace(array_keys($replaces), array_values($replaces), $introtext);
}
// Text auf die gewuenschte Laenge kuerzen
$introtext = trim(mxCutString($introtext, $showintro, " ...", " "));
} else {
// Alle Tags ausser <br> entfernen
$introtext = trim(strip_tags($story['hometext'], '<br>'));
// <br> am Textbeginn entfernen
$introtext = preg_replace('#^(?:<br\s*/*>\s*)*#is', '', $introtext);
// Text auf die gewuenschte Laenge kuerzen
$introtext = trim(mxCutString($introtext, $showintro, " ...", " "));
}
if ($introtext) {
$introtext = '<div class="content">' . $introtext . '</div>';
}
}
// das formatierte Datum
//$datetime = '';
//if ($showdate) {
// $datetime = '<td width="96%"></td>';
// }
// die Buttons
$buttons = array();
if ($showbuttons) {
$buttons[] = '<a href="modules.php?name=News&file=print&sid=' . $story['sid'] . '"><img src="images/menu/print.gif" width=12 height=13 border=0 alt="' . _BMXPRINTER . '" title="' . _BMXPRINTER . '" ></a>';
if (mxModuleAllowed('Recommend_Us')) {
$buttons[] = '<a href="modules.php?name=News&file=friend&sid=' . $story['sid'] . '"><img src="images/menu/friend.gif" width=12 height=13 border=0 alt="' . _BMXFRIEND . '" title="' . _BMXFRIEND . '" ></a>';
}
$buttons[] = '<a href="modules.php?name=News&file=article&sid=' . $story['sid'] . '"><img src="images/menu/bytesmore.gif" border=0 width=12 height=13 alt="' . _BMXBYTESMORE . ' ' . $totalcount . '" title="' . _BMXBYTESMORE . ' ' . $totalcount . '" ></a>';
$buttons[] = '<a href="modules.php?name=News&file=article&sid=' . $story['sid'] . '#comments"><img src="images/menu/comments2.gif" width=12 height=13 border=0 alt="' . _COMMENTS . ' ' . $story['comments'] . '" title="' . _COMMENTS . ' ' . $story['comments'] . '" ></a>';
if (mxModuleAllowed('Userinfo')) {
$buttons[] = '<a href="modules.php?name=Userinfo&uname=' . $story['informant'] . '"><img src="images/menu/informant.gif" width=12 height=13 border=0 alt="' . $story['informant'] . '" title="' . _UNICKNAME . ': ' . $story['informant'] . '" ></a>';
}
$buttons[] = '<img src="images/menu/counter.gif" width=12 height=13 border=0 alt="' . $story['counter'] . ' ' . _READS . '" title="' . $story['counter'] . ' ' . _READS . '" >';
}
$colspan = count($buttons) + 1;
// $buttons = '<table border="0" cellspacing="1" cellpadding="1" align="right"><tr><td>'.implode('</td><td>', $button).'</td></tr></table>';
$buttons = '<td>' . implode('</td><td>', $buttons) . '</td>';
// der Titel des Artikels
$story['title'] = '<a href="modules.php?name=News&file=article&sid=' . $story['sid'] . '">' . $story['title'] . '</a>';
// den Kategoriename mit anzeigen
if ($showcattitle && $story['catid']) {
$story['title'] = $story['title'] . ' [<a href="modules.php?name=News&file=categories&op=newindex&catid=' . $story['catid'] . '">' . $story['title1'] . '</a>]';
}
// $image = ($story['jetzt'] > $story['expire']) ? 'sign' : 'new';
// $out .= '<td colspan="'.$colspan.'"><img src="images/menu/' . $image . '.gif" align="middle" alt=""> '.$story['title'].'</td>';
if ($count == 0) {
$out .= '<tr valign="top">';
}
$out .= '
<td width="' . $width . '%" valign="top" style="border: 1px solid ' . $bgcolor2 . ';">
<table border="0" cellspacing="0" cellpadding="2" width="100%">';
if ($datetime || $buttons) {
$out .= '
<tr valign="top" style="height: 10px;">
' . $datetime . $buttons . '
</tr>
';
}
$out .= '
<tr valign="top" style="height: 35px;">
<td colspan="' . $colspan . '"><p><b>' . $story['title'] . '</b></p>' . $introtext . '</td>
</tr>
</table>
</td>
';
$count++;
if ($count * $width == 100) {
$out .= '</tr>';
$count = 0;
}
}
// falls nicht alle Tabellenspalten am Ende gefuellt sind, eine zus. anfuegen
if ($count && $out) {
$out .= '<td colspan="' . ($showcolumns - $count) . '"> </td>';
}
// die Links zu anderen Modulen
if ($showextendedlinks) {
if (mxModuleAllowed('Stories_Archive')) {
$links[] = '<a href="modules.php?name=Stories_Archive">' . _STORIEARCHIVE . '</a>';
}
if (mxModuleAllowed('Submit_News')) {
$links[] = '<a href="modules.php?name=Submit_News">' . _SUBMITNEWS . '</a>';
}
if (mxModuleAllowed('Search')) {
$links[] = '<a href="modules.php?name=Search">' . _SEARCH . '</a>';
}
if (isset($links)) {
$out .= '<tr><td align="center" colspan="' . $showcolumns . '" style="border: 1px solid ' . $bgcolor2 . ';">';
$out .= '[ ' . implode(' | ', $links) . ' ]';
$out .= '</td></tr>';
}
}
// content-tabelle, nur wenn ueberhaupt was zum anzeigen da ist...
if ($out) {
$content = '<table width="100%" border="0" cellspacing="2" cellpadding="5" align="center">' . $out . '</table>';
}
?>
Başa dön
Bu Site Google Adsense ile Gelir Elde Ediyor
Tarih: 2024-06-02, 10:02:06 Mesaj konusu: Forum Arası Reklamlar
Başa dön
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız