TinyPortal v1.0 beta 4

Tinyportal is a portal mod for SMF that adds articles, blocks, modules and frontpage options for your site.

* *

User

Welcome, Guest. Please login or register.
February 09, 2010, 07:40

Login with username, password and session length

BlocWeb

Shoutbox

Last 10 Shouts:

February 08, 2010, 19:26
Anyone knowq whats happening with SMF .. is the situation resolving or getting worse.. IE: whats going to happen to SMF what Tinyportal is built to use
February 08, 2010, 05:14
Tux,

Ask in support.
February 07, 2010, 21:41
I need help with my tiny portal :(
February 07, 2010, 14:05
I dunno

No RC2 TP then no smilies

Kidding, please don't stress Bloc  ;D
February 07, 2010, 13:43
lol, back now 8)
February 07, 2010, 13:38
;D
February 07, 2010, 13:37
Hello everyone!
No smilies..oh golly gosh..someone stole Bloc's smilies.
lmaooooooooooo
February 07, 2010, 12:50
Great Work Bloc...
February 07, 2010, 09:33
Rest assued beta5 is moving towards public release at a pretty good pace. The bugs are being erased as fast as they are discovered. :)
February 07, 2010, 07:54
Go Colts[/b]

Show 50 latest

Recent Topics

Stats

Members
Stats
  • Total Posts: 244572
  • Total Topics: 25485
  • Online Today: 122
  • Online Ever: 1642
  • (July 09, 2008, 20:19)
Users Online
Users: 5
Guests: 104
Total: 109

Author Topic: Son Konular..  (Read 6331 times)

0 Members and 1 Guest are viewing this topic.

Offline behzat

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: Son Konular..
« Reply #10 on: April 30, 2009, 08:08 »
inşallah ilgilenir. teşşekürler

Offline turkyucel

  • Yücel Türk
  • Jr. Member
  • **
  • Posts: 53
  • “Yeryüzündeki alimler, gökteki yıldızlar gibidir.”
    • View Profile
Re: Son Konular..
« Reply #11 on: April 30, 2009, 12:55 »
İ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 />' => '&#10;')));
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.

Code: [Select]
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)"
« Last Edit: April 30, 2009, 13:47 by turkyucel »

Offline behzat

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: Son Konular..
« Reply #12 on: May 13, 2009, 08:48 »
Bir phpbox aç ve içine aşağıdaki kodu ekle.. Bu sayede foruma yollanan konular çıkar.. (10 mesaj)

Code: [Select]
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 ?


Offline turkyucel

  • Yücel Türk
  • Jr. Member
  • **
  • Posts: 53
  • “Yeryüzündeki alimler, gökteki yıldızlar gibidir.”
    • View Profile
Re: Son Konular..
« Reply #13 on: May 13, 2009, 09:16 »
Quote
$what=ssi_recentTopics('10', NULL, 'array');


yukarıdaki 10 rakamını arttırarak deneyiniz.

Offline NAVDIR

  • TP Challenged
  • *
  • Posts: 8
    • View Profile
Re: Son Konular..
« Reply #14 on: August 18, 2009, 16:48 »
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 .

Code: [Select]
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>';


Offline bbTURK

  • Baran
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Son Konular..
« Reply #15 on: August 18, 2009, 17:27 »
sanırım bunu kastettin. bu arada yukarıda verdiğinkodda ssi fonksiyonu yanlış yazılmış gibi geldi çalışıyor mu sende?
Code: [Select]
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>';
« Last Edit: August 18, 2009, 17:32 by bbTURK »
Temanız daha önceden çevrilme ihtimaline karşı lütfen arama yapın.
TP Türkçe dosyalarını buradan bulabilirsiniz.
Türkçe bölümünün daha düzenli olması ve daha kolay yardım almanız için bölüm kurallarını okuyun.

Offline NAVDIR

  • TP Challenged
  • *
  • Posts: 8
    • View Profile
Re: Son Konular..
« Reply #16 on: August 20, 2009, 05:18 »
cevabın için teşekkür ederim ama istediğim tam olarak bu değil örnek vereyim bende çalışan kod şöyle

Code: [Select]
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 ...

Offline bbTURK

  • Baran
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Son Konular..
« Reply #17 on: August 21, 2009, 13:28 »
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?
Temanız daha önceden çevrilme ihtimaline karşı lütfen arama yapın.
TP Türkçe dosyalarını buradan bulabilirsiniz.
Türkçe bölümünün daha düzenli olması ve daha kolay yardım almanız için bölüm kurallarını okuyun.

Offline NAVDIR

  • TP Challenged
  • *
  • Posts: 8
    • View Profile
Re: Son Konular..
« Reply #18 on: August 22, 2009, 07:08 »
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
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?


Offline bbTURK

  • Baran
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: Son Konular..
« Reply #19 on: August 26, 2009, 06:16 »
deneme daha yapamadım. yapınca sonuçları yazarım ama ssi boardnews ile kolay yapılır bence.
Temanız daha önceden çevrilme ihtimaline karşı lütfen arama yapın.
TP Türkçe dosyalarını buradan bulabilirsiniz.
Türkçe bölümünün daha düzenli olması ve daha kolay yardım almanız için bölüm kurallarını okuyun.

 

Page created in 0.044 seconds with 31 queries.