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

Recent

Welcome to TinyPortal. Please login or sign up.

May 14, 2024, 04:06:18 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,188
  • Total Topics: 21,220
  • Online today: 83
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 64
  • Total: 64

Son Konular..

Started by findpeople, January 14, 2007, 01:08:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

findpeople

Belirteceğim kategoriler içindeki son konuları blok şeklinde göstermemiz mümkün mü acaba? son mesajlar gibi. Yalnız her hangi bir konuya yeni mesaj yazıldımı üst'e çıkmayacak. Yeni konular sabit kalıcak block'da mümkünmüdür?

deniz

son atılan mesaj olan konu üste gelmez ise son konular nasıl olacak. ?

kategori bazında son konular bloğu olablir. block snippets lere bi baksana..

jackboot77

Bir phpbox aç ve içine aşağıdaki kodu ekle.. Bu sayede foruma yollanan konular çıkar.. (10 mesaj)

global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                               <tr><td colspan="3" class="titlebg">Son Mesajlar</td></tr> ';
       $what=ssi_recentTopics('10', NULL, 'array');


        foreach ($what as $topic)
        {
                echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                ', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                        echo '
                                                <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="20%">
                                                ', $topic['poster']['link'], '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
                                        <a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
                echo '
                                                <span class="smalltext">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';

findpeople

Teşekkürler fakat isteğim böyle değil.

istediÄŸim tam olarak. "Recent topic" bloÄŸu gibi  istedÄŸim bölümlerden (bir kaç bölüm yani) son 10 konuyu sıralıyacak fakat tarihlerine göre sıralıyacak mesaj yazıdıldımı üst'e geçmeyecek yeni açılan konu üst'e geçecek. Forum mesajlarını anasayfada gösterdiÄŸimiz ÅŸekilde yani. Yazınca baya zor olduÄŸu anladım :) sanırım olma ihtimali var fakat olmayacak gibi gözüküyor..  :)

almora

Bölümlerin ismi konuların altında görünmesi için üstteki kodlara ne eklememiz gerekiyor acaba?...

behzat

Quote from: jackboot77 on January 16, 2007, 07:48:12 PM
Bir phpbox aç ve içine aÃ...ŸaÃ,,ŸÃ,,±daki kodu ekle.. Bu sayede foruma yollanan konular çÃ,,±kar.. (10 mesaj)

global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                               <tr><td colspan="3" class="titlebg">Son Mesajlar</td></tr> ';
       $what=ssi_recentTopics('10', NULL, 'array');


        foreach ($what as $topic)
        {
                echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                ', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                        echo '
                                                <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="20%">
                                                ', $topic['poster']['link'], '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
                                        <a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
                echo '
                                                <span class="smalltext">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';


bu kodlarÃ,,± kullandÃ,,±m oldu. bu kodlarÃ,,± ayrÃ,,±ca en çok bakÃ,,±lan konular veya sadece belli bölüme ait konularÃ,,± nasÃ,,±l gösterebilirim

turkyucel

#6
TP versiyonun nedir?

Beta 3 için;

Git:
"Admin / TinyPortal Admin Menu / Paneller ve Bloklar / Bloklar [Yeni blok]"

Blok Türü: Forum/SSI FonksiyonlarÃ,,±


  • - yok -
  • En Çok Oy Verilen Anket
  • En Popüler Anket
  • En Popüler Bölüm
  • En Çok Mesaj Yazanlars
  • En Çok Cevap AtÃ,,±lan
  • En Çok Görüntülenen
  • Bugünün takvimi

önceki blok ile aynÃ,,± deÃ,,Ÿil. SöylediÃ,,Ÿin iÃ...Ÿlev ile aynÃ,,±.

behzat

çok güzel teÃ...ŸÃ...Ÿekürler beta 3 kurulu (baya geliÃ...ŸtirilmiÃ...Ÿ) örnek vererek açÃ,,±klayayÃ,,±m

kategori-1
-bölüm-1
-bölüm-2
-bölüm-3
kategori-2
.
.
.

ben sadece kategori-1 veya bölüm-1'deki konularÃ,,±nÃ,,± kullanabilirmiyim. yani bu kategori veya bölümlerden sadece birinin en çok bakÃ,,±lan, edilen, falan filan ......

Paragaya

Ewet geliÃ...Ÿtirilirdi :)

turkyucel

Quote from: behzat on April 29, 2009, 06:56:40 AM
çok güzel teÃ...ŸÃ...Ÿekürler beta 3 kurulu (baya geliÃ...ŸtirilmiÃ...Ÿ) örnek vererek açÃ,,±klayayÃ,,±m

kategori-1
-bölüm-1
-bölüm-2
-bölüm-3
kategori-2
.
.
.

ben sadece kategori-1 veya bölüm-1'deki konularÃ,,±nÃ,,± kullanabilirmiyim. yani bu kategori veya bölümlerden sadece birinin en çok bakÃ,,±lan, edilen, falan filan ......


Daha önce yazÃ,,±lmÃ,,±Ã...Ÿ böyle bir blok bilmiyorum.
Bu konuda TP-Code lerden destek almak gerekir.
EÃ,,Ÿer ingilizceniz varsa Blok Code bölümünde destek isteyiniz.
yoksa bbTURK bu konuyla ilgilenecektir.

behzat

inÃ...Ÿallah ilgilenir. teÃ...ŸÃ...Ÿekürler

turkyucel

#11
Ã,,°stediÃ,,Ÿiniz Kategorinin KonularÃ,,±nÃ,,± Göstermek Ã,,°Ã§in,

./SSI.php
Code (Bul) Select

?>


Code (ÃÅ"stüne Ekle) Select

function ssi_recentTopics_Include($num_recent = 8, $include_boards = null, $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $ID_MEMBER;
global $user_info, $modSettings, $func;

$include_boards = empty($include_boards) ? array() : $include_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b, {$db_prefix}messages AS ms)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE t.ID_LAST_MSG = m.ID_MSG
AND b.ID_BOARD = t.ID_BOARD" . (empty($include_boards) ? '' : "
AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")") . "
AND $user_info[query_see_board]
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY t.ID_LAST_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);
$posts = array();
while ($row = mysql_fetch_assoc($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileysEnabled'], $row['ID_MSG']), array('<br />' => '')));
if ($func['strlen']($row['body']) > 128)
$row['body'] = $func['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['ID_BOARD'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['ID_TOPIC'],
'poster' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['posterName'],
'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['isRead']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
);
}
mysql_free_result($request);

// Just return it.
if ($output_method != 'echo' || empty($posts))
return $posts;

echo '
<table border="0" class="ssi_table">';
foreach ($posts as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">
[', $post['board']['link'], ']
</td>
<td valign="top">
<a href="', $post['href'], '">', $post['subject'], '</a>
', $txt[525], ' ', $post['poster']['link'], '
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', '
</td>
<td align="right" nowrap="nowrap">
', $post['time'], '
</td>
</tr>';
echo '
</table>';
}



YukarÃ,,±da iÃ...Ÿlemden sonra,

AÃ...ŸaÃ,,ŸÃ,,±daki kodu Php Kod, Phpbox olarak bloÃ,,Ÿunuzu oluÃ...Ÿturunuz.


global $context, $scripturl, $settings, $txt;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';

$result=ssi_recentTopics_Include(10,array(1),'return');

foreach($result as $my){
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'];

  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
        echo ' <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '<br />';
echo ' Yazar ', $my['poster']['link'];
echo '<br />';
echo ' posted ', $my['time'];
echo '<br />';
echo '<hr />';
}
echo '</span>';


Bu bölümü "array(1)" göstermek istediÃ,,Ÿiniz kategorinin/kategorilerin [id]'lerine göre düzenleyiniz.
Ãâ€"r: "array(1,2,3)"

behzat

Quote from: jackboot77 on January 16, 2007, 07:48:12 PM
Bir phpbox aç ve içine aÃ...ŸaÃ,,ŸÃ,,±daki kodu ekle.. Bu sayede foruma yollanan konular çÃ,,±kar.. (10 mesaj)

global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                               <tr><td colspan="3" class="titlebg">Son Mesajlar</td></tr> ';
       $what=ssi_recentTopics('10', NULL, 'array');


        foreach ($what as $topic)
        {
                echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                ', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                        echo '
                                                <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="20%">
                                                ', $topic['poster']['link'], '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
                                        <a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
                echo '
                                                <span class="smalltext">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';



En fazla kaç tane gösterebiliriz ?


turkyucel

Quote$what=ssi_recentTopics('10', NULL, 'array');

yukarÃ,,±daki 10 rakamÃ,,±nÃ,,± arttÃ,,±rarak deneyiniz.

NAVDIR

bu  blok çok güzel  yalnÃ,,±z bu bloktan üç tane yan yana koymak istersek yapabilirmiyiz..
arkadaÃ...Ÿlar yardÃ,,±mlarÃ,,±nÃ,,±z ve paylaÃ...ŸÃ,,±mlarÃ,,±nÃ,,±z için gerçekten çok teÃ...Ÿekkürler .

global $context, $scripturl, $settings, $txt;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" border="0" style="margin:0 2px 0 0;" />';

$result=ssi_recentTopics_Include(10,array(1),'return');

foreach($result as $my){
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'];

  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
        echo ' <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '<br />';
echo ' Yazar ', $my['poster']['link'];
echo '<br />';
echo ' posted ', $my['time'];
echo '<br />';
echo '<hr />';
}
echo '</span>';


bbTURK

#15
sanırım bunu kastettin. bu arada yukarıda verdiğinkodda ssi fonksiyonu yanlış yazılmış gibi geldi çalışıyor mu sende?
global $context, $scripturl, $settings, $txt;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider.gif" alt="" style="margin: 0pt 2px 0pt 0pt;" border="0">';

$result=ssi_recentTopics(12,null,'array');
$i=0;
echo'<table>';
foreach($result as $my){
if($i%3==0)
echo'<tbody><tr>';
echo'<td>';
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'];

  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
        echo ' <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo '<br />';
echo ' Yazar ', $my['poster']['link'];
echo '<br />';
echo ' posted ', $my['time'];
echo '<br />';
echo '<hr />';
echo '</span>';
echo'</td>';
if($i%3==2)
echo'</tr>';
$i++;
}echo'</tbody></table>';

NAVDIR

cevabÃ,,±n için teÃ...Ÿekkür ederim ama istediÃ,,Ÿim tam olarak bu deÃ,,Ÿil örnek vereyim bende çalÃ,,±Ã...Ÿan kod Ã...ŸÃ¶yle

global $context, $scripturl, $settings, $txt;
$bullet = '<img src="'.$settings['images_url'].'/8top10.gif" alt="" border="0" style="margin:0 2px 0 0;" />';

$result=ssi_recentTopics_Include(10,array(46),'return');

foreach($result as $my){
  echo "$bullet";
  echo '<span class="2px">'.$my['link'];

  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
        echo ' <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['new_from'], '#new"></a>';
echo '<br />';

}
echo '</span>';


ben kendimce kodu bu halde kullanÃ,,±yorum
örneÃ,,Ÿin katagori 1 katagori 2 katagori 3 (atÃ,,±yorum 25, 354, 300 nolu baÃ...ŸlÃ,,±klar)
üçtanesini yan yana  bir blokta gösterebilme Ã...ŸansÃ,,±zÃ,,±m varmÃ,,±. ve birde yazÃ,,± fontunu deÃ,,ŸiÃ...Ÿtirmek gibi bir olanaÃ,,ŸÃ,,±nÃ,,±zÃ,,±m örneÃ,,Ÿin verdana 12px gibi.. yazÃ,,± fontunu deÃ,,ŸiÃ...Ÿtirmeye çalÃ,,±Ã...ŸtÃ,,±m ama beceremedim..

ayrÃ,,±ca alakan için cok teÃ...Ÿekkür ederim saÃ,,ŸolasÃ,,±n ...

bbTURK

yazÃ,,± fontu deÃ,,ŸiÃ...Ÿtirmek bazÃ,,± fontlar ve tarayÃ,,±cÃ,,±lar için istenileni vermeyebilir amma css kodlarÃ,,±yla deÃ,,ŸiÃ...Ÿtirebiliriz.

1 2 3 bölümlerine yazÃ,,±lan son konularÃ,,± ayrÃ,,± sütunlar halinde mi vermek istiyorsun yoksa istediÃ,,Ÿin konularÃ,,± mÃ,,± göstermek istiyorsun?

NAVDIR

evet aynÃ,,± blok içersinde ama ayrÃ,,± sutunlarda yapÃ,,±labilirmi...
ve her sutunun baÃ...ŸÃ,,±nda ilgili katagori adÃ,,± örneÃ,,Ÿin birinci sutun için katagori 1 altÃ,,±nda son 10 mesat ikinci sutun için katagori 2 son on mesaj  katagori 3 son on mesaj Ã...Ÿeklinde
mümkünmü acaba..
yardÃ,,±mlarÃ,,±nÃ,,±z için çok teÃ...Ÿekkürler
Quote from: bbTURK on August 21, 2009, 07:28:56 PM
1 2 3 bölümlerine yazÃ,,±lan son konularÃ,,± ayrÃ,,± sütunlar halinde mi vermek istiyorsun yoksa istediÃ,,Ÿin konularÃ,,± mÃ,,± göstermek istiyorsun?

bbTURK

deneme daha yapamadÃ,,±m. yapÃ,,±nca sonuçlarÃ,,± yazarÃ,,±m ama ssi boardnews ile kolay yapÃ,,±lÃ,,±r bence.

Paragaya

bence de sm.org da vardi sanirim sinan a bir konuda sordular arastirayim bulursam eklerim.

zehir

ben bunu kurmustum Ã...Ÿimdi beta 5 kurdum çalÃ,,±smÃ,,±yor ne yapmam lazÃ,,±m?
yardÃ,,±mcÃ,,± olabÃ,,±lÃ,,±rmÃ,,±sÃ,,±nÃ,,±z tÃ...Ÿk Ã...Ÿimdiden