TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 19, 2024, 03:32:38 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 128
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 52
  • Total: 53
  • tino

Board İndex Gösterimi

Started by unforgivenx, December 13, 2009, 06:48:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

unforgivenx

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 />';
}
         
}
}

unforgivenx


bbTURK

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.

unforgivenx

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..

unforgivenx

malesef hocam dediÃ,,Ÿin Ã...Ÿekilde olmadÃ,,±... hata veriyor... bir yerlerden cat_id belirtmem lazÃ,,±m ama nereden, bulamadÃ,,±m...