TinyPortal

Development => International => Turkish => Topic started by: unforgivenx on December 13, 2009, 06:48:22 PM

Title: Board İndex Gösterimi
Post by: unforgivenx on December 13, 2009, 06:48:22 PM
arkadaÃ...Ÿlar Ã...Ÿu kodla anasayfada forum indexini (fihristini) göstericem,ancak tüm bölümleri deÃ,,Ÿil... yani belli kategorinin bölümlerini göstermek istiyorum... ne yapabilirim? bu kodlarÃ,,±n içinde nereye kategori id nereye bölüm id yazabilirim?

global $db_prefix, $context, $user_info;


// Find the boards/cateogories they can see.
$request = db_query("
SELECT c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.numTopics, b.childLevel
FROM {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT)
WHERE $user_info[query_see_board]", __FILE__, __LINE__);
$context['jump_to'] = array();
$this_cat = array('id' => -1);
while ($row = mysql_fetch_assoc($request))
{
if ($this_cat['id'] != $row['ID_CAT'])
{
$this_cat = &$context['jump_to'][];
$this_cat['id'] = $row['ID_CAT'];
$this_cat['name'] = $row['catName'];
$this_cat['boards'] = array();
}

$this_cat['boards'][] = array(
'id' => $row['ID_BOARD'],
'name' => $row['boardName'],
'child_level' => $row['childLevel'],
'is_current' => isset($context['current_board']) && $row['ID_BOARD'] == $context['current_board'],
'topics' => $row['numTopics']
);
}
mysql_free_result($request);

foreach ($context['jump_to'] as $category){
// edit the following line if you want to change the style of the category text.
echo '<span style="line-height: 10px; font-weight: bold;" class="normaltext" ><b>', strtoupper($category['name']), '</b></span><br />';

foreach ($category['boards'] as $board){
            if (!$board['child_level']){
//edit the following line for the regular board text
echo '<a href="',$scripturl,'?board=', $board['id'], '">', $board['name'], '</a><br />';
//this line you can edit for the topics count text
echo '<span class="smalltext" style="margin-left: 10px;">', $board['topics'],' ', $txt[330], '</span><br />';
}
else{
//this line you can edit to change the child board text
echo '<a class="normaltext" style="margin-left: 20px;" href="',$scripturl,'?board=', $board['id'], '">', $board['name'],'</a><br />';
}
         
}
}
Title: Re: Board İndex Gösterimi
Post by: unforgivenx on December 13, 2009, 11:16:46 PM
konu güncel.
Title: Re: Board İndex Gösterimi
Post by: bbTURK on December 18, 2009, 08:11:36 PM
kategori id ile yapamazsÃ,,±n ama istersen forumda ara ön sayfa ayarlarÃ,,±ndaki bölüm sayÃ,,±sÃ,,±nÃ,,± çoÃ,,Ÿaltmak hakkÃ,,±nda bi kaç çözüm var. onlarÃ,,± kullanabilirsin. göstereceÃ,,Ÿin bölümleri seçersin oradan.

yok ben illa bu kodu kullanÃ,,±cam dersen
      WHERE $user_info[query_see_board]", __FILE__, __LINE__);
kÃ,,±smÃ,,±nÃ,,± aÃ...ŸarÃ,,ŸÃ,,±daki gibi deÃ,,ŸiÃ...Ÿtirip uzatabilirsin. biraz kod hammallÃ,,±Ã,,ŸÃ,,± oluyo ama kÃ,,±sa yolunu hatÃ,,±rlayamadÃ,,±m.
      WHERE b.BOARD_ID=1 or b.BOARD_ID=2", __FILE__, __LINE__);

bu arada konu güncel diye flood yapmana gerek yok. vakit ayÃ,,±ramadÃ,,±Ã,,ŸÃ,,±m için modluÃ,,Ÿu bÃ,,±raktÃ,,±m. türkçe bölüme pek gelip yardÃ,,±m edende çÃ,,±kmÃ,,±yo baÃ...Ÿka.
Title: Re: Board İndex Gösterimi
Post by: unforgivenx on December 19, 2009, 01:06:33 PM
hocam çok saÃ,,Ÿol... hemen deneyeceÃ,,Ÿim, ayrÃ,,±ca flood yapmak istememiÃ...Ÿtim :) sadece çözüm bulamadÃ,,±Ã,,ŸÃ,,±m için konu güncel yazdÃ,,±m..  teÃ...Ÿekkür ederim cevabÃ,,±n için..
Title: Re: Board İndex Gösterimi
Post by: unforgivenx on December 22, 2009, 11:59:22 AM
malesef hocam dediÃ,,Ÿin Ã...Ÿekilde olmadÃ,,±... hata veriyor... bir yerlerden cat_id belirtmem lazÃ,,±m ama nereden, bulamadÃ,,±m...