Orijinalini görmek için tıklayınız : Arşivleme Bileşeni
Fatih TOPRAK
25-06-2007, 15:44:54
Merhabalar.
Arkadaşlar Forumda bakındım bir tek arşiv modülünün kullanımından bahsedilmiş..
Acaba haberlerimizi arşivleyebileceğimiz, güzel bir component varmı ?
İlginize teşekkürler.
Fatih TOPRAK
25-06-2007, 15:49:02
veya
<?php
/**
* @version $Id: mod_archive.php 5883 2006-11-29 23:26:33Z predator $
* @package Joomla
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
$count = intval( $params->def( 'count', 10 ) );
$now = _CURRENT_SERVER_TIME;
$query = "SELECT MONTH( created ) AS created_month, created, id, sectionid, title, YEAR(created) AS created_year"
. "\n FROM #__content"
. "\n WHERE ( state = -1 AND checked_out = 0 AND sectionid > 0 )"
. "\n GROUP BY created_year DESC, created_month DESC"
;
$database->setQuery( $query, 0, $count );
$rows = $database->loadObjectList();
if( count( $rows ) ) {
echo '<ul>';
foreach ( $rows as $row ) {
$created_month = mosFormatDate ( $row->created, "%m" );
$month_name = mosFormatDate ( $row->created, "%B" );
$created_year = mosFormatDate ( $row->created, "%Y" );
$link = sefRelToAbs( 'index.php?option=com_content&task=archivecategory &year='. $created_year .'&month='. $created_month .'&module=1' );
$text = $month_name .', '. $created_year;
?>
<li>
<a href="<?php echo $link; ?>">
<?php echo $text; ?></a>
</li>
<?php
}
echo '</ul>';
}
?>
bu mod_archive'nin kodu.
Listeleme yaparken 2 sütun halınde sayfa gosterıluyor.
Bunu tek sutuna ındırebılırmıyız.
teşekkürler
Fatih TOPRAK
25-06-2007, 15:53:26
Şimdi sanrıım bulmaya çalışıyorum
$count = intval( $params->def( 'count', 10 ) );
$now = _CURRENT_SERVER_TIME;
$query = "SELECT MONTH( created ) AS created_month, created, id, sectionid, title, YEAR(created) AS created_year"
. "\n FROM #__content"
. "\n WHERE ( state = -1 AND checked_out = 0 AND sectionid > 0 )"
. "\n GROUP BY created_year DESC, created_month DESC"
;
$database->setQuery( $query, 0, $count );
$rows = $database->loadObjectList();
bu kısma gelecek sanrım
ben şunları anladım
10 tane listelenecek...
gerisini rows satır olmalı :)
ama column nasıl olucak .. destek lütfen
Fatih TOPRAK
25-06-2007, 15:54:33
kendİm Yazip Kendİm Cevapladim Valla:)
Ama SonuÇ Yok :)
Yardimlarinizi Beklİyorum ArkadaŞlar Telrardan TeŞekkÜrler.
Pentacle
25-06-2007, 16:01:19
iki sutun halinde mi gosteriyor? nasıl yani burda sadece ul ile bir liste olusturuyor.
Fatih TOPRAK
25-06-2007, 23:01:34
vet ustad ıkı sutun haljnde lıstelyıyor
malesef
istersen bir dene
üstad sen de bı joomlada
archiveyi :( yardım edebilecek olan ?
Lütfen
Fatih TOPRAK
25-06-2007, 23:23:06
DOSTUM NE DEMEK İSTEDİĞİMİ ;
www.mengenpostasi.com/arama Linkinden görebilirisn .
Sağ tarfta haber arşivi kısmı var
oradan bı lıjnke tıkayınca gorecekısn saygılar
Fatih TOPRAK
26-06-2007, 14:08:36
dostum sorunu hallettım
yanı daha doğrusu
sağ blokta
en altta bılgı menunun altında haber arsıvı dıye
'' Kategori Arşiv Lnkleri '' oluşturdum :)
Tek satırlı oldu :D
vBulletin v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.