Toplam Üye:
32638
Aktif Üye:
0
Aktif Ziyaretçi:
117
??? Sitem deki Haberleri ..(25271 okuma, 26 yanıt) Free Hosta Php Nuke Kurul ..(16376 okuma, 14 yanıt) EKLENTİ: Misafire mesajın ..(36696 okuma, 38 yanıt) Php Nuke 9.0 Geliyor ..(20757 okuma, 19 yanıt) Bu başlık için mesaj bulu ..(13933 okuma, 15 yanıt) Facebook Sohbet Tipi Sohb ..(17681 okuma, 15 yanıt) üye aktivasyon ..(10592 okuma, 8 yanıt) Facebook tarzı altbar... ..(6240 okuma, 1 yanıt) kaldırmak istediğim bölüm ..(6516 okuma, 2 yanıt) Resimli RSS ..(23118 okuma, 25 yanıt) Onay linkini kaldirmak ..(11024 okuma, 8 yanıt) Yardım :( Site açılırken ..(6621 okuma, 2 yanıt) .Htaccess ile uzantıda ke ..(8236 okuma, 4 yanıt) block genişliği ..(5676 okuma, 1 yanıt) Haber Resimleri ve Slide ..(14305 okuma, 12 yanıt) Foruma büyük boyutlu resi ..(7269 okuma, 3 yanıt) Php-Nuke 8.0 Paket ..(9389 okuma, 6 yanıt) Hangi sürümü önerirsiniz? ..(10434 okuma, 8 yanıt) ethai1 3 ..(13096 okuma, 10 yanıt) Yeni PEHASPESEO ..(69571 okuma, 82 yanıt) Türkçe Karakter sorunu ? ..(37554 okuma, 36 yanıt) tek modul için sağ ve sol ..(11335 okuma, 8 yanıt) Php-nuke8.0 başlıklarda t ..(10530 okuma, 8 yanıt) Phpden iyi anlayan ..(5400 okuma, 1 yanıt) Php nuke 7.6 - 3.1 patch ..(72885 okuma, 89 yanıt) Mp3 Üst Player Yardım ..(29390 okuma, 40 yanıt) Toplu üyelik silme? ..(11072 okuma, 8 yanıt) Çözümleyemediğim hata... ..(12323 okuma, 11 yanıt) bloğu kayan hale getirmek ..(5947 okuma, 2 yanıt) Makale modulu ..(8541 okuma, 5 yanıt) PHP-Nuke Haber V.1 Paylas ..(84860 okuma, 121 yanıt) title değiştirme ..(10244 okuma, 6 yanıt) Arkadaşlar bu sorunun çöz ..(10003 okuma, 6 yanıt) Php Nuke 8.1 ..(4331 okuma, 0 yanıt) merhaba ..(10226 okuma, 9 yanıt) Anasayfa için boş modül o ..(13423 okuma, 13 yanıt) admin panelinde Access De ..(6358 okuma, 2 yanıt) Bu başlığa hiç cevap gelm ..(26243 okuma, 25 yanıt) Nuke Tema yapilisi ..(17026 okuma, 16 yanıt) Mavisce-net temasina bann ..(8681 okuma, 6 yanıt) PHP-Nuke wTeam - eklentil ..(6609 okuma, 2 yanıt) coppermine hata ..(10645 okuma, 8 yanıt) içerik tanıtımı ..(6253 okuma, 2 yanıt) Haber Ve İçeriğe Resim Ek ..(7123 okuma, 3 yanıt) google keywords ..(8927 okuma, 6 yanıt) 8.0'da html sorunu ..(5477 okuma, 1 yanıt) PHP-Nuke_8.1.3.5+NukeSent ..(53814 okuma, 76 yanıt) üye olunurken gereksiz is ..(9982 okuma, 7 yanıt) Arkadaşlar kolifa haber s ..(6329 okuma, 2 yanıt) Hesabınız'a tıklayınca te ..(10436 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-05-19, 08:57:10 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