collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 578
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Sohbet Kutusu

Refresh History
  • Destek için kullanmay?n!
  • akorkut: Ama desteklerinizi de bekliyoruz.
    November 18, 2016, 08:41:36 AM
  • akorkut: grafitus hocam, yaklaşık 10 yıl.. smf, sp,  sizin ve diğer paylaşımseverin çalışmalarınızl bize destek oldu. Herşey için çok teşekkür ederiz.
    November 18, 2016, 08:40:38 AM
  • grafitus: Merhabalar herkese. Uzun zaman oldu, hayatlar değişti. Vakit ayıramaz olduk. SMF ve SimplePortal'ın yeri farklı olsa da artık aktif olmadıkları aşikar. Belki bir gün yeniden forumlar doğar. :)) Sevgilerle.
    November 18, 2016, 08:26:32 AM
  • tc bolubeyi: gelen giden yok pek
    July 31, 2016, 02:52:53 PM
  • tekniker974: Neredeyse 1 sene olmuş
    May 12, 2016, 01:05:50 AM
  • tekniker974: Günaydın
    May 12, 2016, 01:05:19 AM
  • tc bolubeyi: merhaba dostlara
    August 28, 2015, 08:56:04 AM
  • mert1i: ker alaka
    August 03, 2015, 10:07:49 AM
  • sonkalem: sa
    July 14, 2015, 03:27:51 PM
  • tc bolubeyi: sağolun ben de iyi allaha şükür
    June 10, 2015, 05:52:54 PM
  • mkuru: Teşekkürler Hasan Bey. Sizi sormalı
    May 27, 2015, 02:53:43 AM
  • tc bolubeyi: selam dostlar nasılsınız
    May 23, 2015, 06:52:15 PM
  • streetfire: Ben seviyorum.
    May 01, 2015, 03:39:22 PM
  • streetfire: Valla bilmiyorum. Sitemde çok kullanıyorum.
    May 01, 2015, 03:39:14 PM
  • mkuru: Evet haklısın
    April 03, 2015, 08:23:32 AM
  • mert1i: portalın en çok istenen ama en aaz talep gören kısmı bu chat
    April 01, 2015, 07:35:31 AM
  • mert1i: Selamun aleyküm ahali..
    January 27, 2015, 05:20:06 AM
  • tekniker974: a.s.
    August 12, 2014, 03:22:53 PM
  • delirium: S.a
    August 02, 2014, 10:24:22 AM
  • tekniker974: :nervous-happy:kimse yok
    July 15, 2014, 01:19:26 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Son Konular Bloğunu düzenleme  (Read 7661 times)

0 Members and 1 Guest are viewing this topic.

Offline infrablack

  • Newbie
  • Posts: 2
  • SMF Version: 2 RC1.2
  • SP Version: 2.2.2
Son Konular Bloğunu düzenleme
« on: July 28, 2009, 03:57:50 PM »
Ben son konular bloğumun böyle olmasını istiyorum yani konular arasında çizgiler olacak,başlatan ayrı gözükecek.
aşağıdaki Ajax Recent topic le yapılmış ama o modu kullanınca konular biraz geç gözüküyor..
Yani Ajax recent topics olmadan yapmak istiyorum...
Umarım açıklayıcı olmuşumdur.
Şimdiden teşekkürler...

Offline rolcevi

  • Semi Newbie
  • *
  • Posts: 48
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Son Konular Bloğunu düzenleme
« Reply #1 on: July 30, 2009, 06:22:26 AM »
evet bu şekilde bir çalışma yapılırsa bence de süper olur. Umarım bilgisi olan arkadaşlar duruma el atarlar.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Son Konular Bloğunu düzenleme
« Reply #2 on: July 30, 2009, 02:20:39 PM »
Bu bölümde AJAX son konular ya da mesajlar bloğu ile ilgili bir konu vardı. Onu kontrol edebilirsiniz.

Bunun dışında, SimplePortal'ın PHP bloğunda herhangi bir PHP kodunu çalıştırabilirsiniz. Yani bunu PHP'de bir şekilde yazıp o blokta kullanabilirsiniz.

Böyle bir blok kodu yazabilecek kadar vaktim yok ama kodu yazdığınızda nasıl SimplePortal'a ekleyeceğinize dair yardımcı olabilirim.
And slowly, you come to realize... It's all as it should be...

Offline infrablack

  • Newbie
  • Posts: 2
  • SMF Version: 2 RC1.2
  • SP Version: 2.2.2
Re: Son Konular Bloğunu düzenleme
« Reply #3 on: July 31, 2009, 04:11:02 PM »
Sinan arkadaşım ben ajax istemiyorum çünkü sayfa yüklndikden 5-10 sn sonra geliyor konular.

Ama eğer sen normal bloğun kodunu verirsen onun üzerinde değişiklik yapmaya çalışırım..sıfırdan yazacak kadar php bilmiyorum...yardımın için teşekkürler...=)

Offline grafitus

  • Board Moderators
  • *
  • Posts: 1554
  • Gender: Male
  • just looking for own old energy
  • SMF Version: None
  • SP Version: None
Re: Son Konular Bloğunu düzenleme
« Reply #4 on: August 01, 2009, 07:00:23 AM »
Sinan, AJAX Recent Topics'in kodlarını birleştirerek ve onun tablo yapısını alarak bir çalışma yaptım ama çalışmadı=) Kodları veriyorum belki sen sorunu ve çözümü bulabilirsin:

Code: [Select]
function AJAXsizrecent()
{
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $board;

$query_parameters = array();
if (!empty($_REQUEST['c']) && empty($board))
{
$_REQUEST['c'] = explode(',', $_REQUEST['c']);
foreach ($_REQUEST['c'] as $i => $c)
$_REQUEST['c'][$i] = (int) $c;

if (count($_REQUEST['c']) == 1)
{
$request = $smcFunc['db_query']('', '
SELECT name
FROM {db_prefix}categories
WHERE id_cat = {int:id_cat}
LIMIT 1',
array(
'id_cat' => $_REQUEST['c'][0],
)
);
list ($name) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

if (empty($name))
fatal_lang_error('no_access', false);

$context['linktree'][] = array(
'url' => $scripturl . '#' . (int) $_REQUEST['c'],
'name' => $name
);
}

$request = $smcFunc['db_query']('', '
SELECT b.id_board
FROM {db_prefix}boards AS b
WHERE b.id_cat IN ({array_int:category_list})
AND {query_see_board}',
array(
'category_list' => $_REQUEST['c'],
)
);
$boards = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$boards[] = $row['id_board'];
$smcFunc['db_free_result']($request);

if (empty($boards))
fatal_lang_error('error_no_boards_selected');

$query_this_board = 'b.id_board IN ({array_int:boards})';
$query_parameters['boards'] = $boards;
}
elseif (!empty($_REQUEST['boards']))
{
$_REQUEST['boards'] = explode(',', $_REQUEST['boards']);
foreach ($_REQUEST['boards'] as $i => $b)
$_REQUEST['boards'][$i] = (int) $b;

$request = $smcFunc['db_query']('', '
SELECT b.id_board
FROM {db_prefix}boards AS b
WHERE b.id_board IN ({array_int:board_list})
AND {query_see_board}
LIMIT {int:limit}',
array(
'board_list' => $_REQUEST['boards'],
'limit' => count($_REQUEST['boards']),
)
);
$boards = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$boards[] = $row['id_board'];
$smcFunc['db_free_result']($request);

if (empty($boards))
fatal_lang_error('error_no_boards_selected');

$query_this_board = 'b.id_board IN ({array_int:boards})';
$query_parameters['boards'] = $boards;
}
elseif (!empty($board))
{
$query_this_board = 'b.id_board = {int:board}';
$query_parameters['board'] = $board;
}
else
{
$query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '');
$query_parameters['recycle_board'] = $modSettings['recycle_board'];
}

$latest_post = !empty($_REQUEST['latest']) ? 'AND m.poster_time > {int:latest}' : '';
if (!empty($latest_post))
$query_parameters['latest'] = (int) $_REQUEST['latest'];

$min_msg_id = $modSettings['maxMsgID'] - (int) (($modSettings['totalMessages'] / $modSettings['totalTopics']) * 10);  //Mesaj sayısı için 10 değerini değiştirin.

$context['topics'] = array();
$request = $smcFunc['db_query']('', '
SELECT
ms.poster_time as firstTime, m.poster_time as lastTime, ms.subject, m.id_topic, t.num_replies,
ms.id_member as id_first_poster, m.id_member as id_last_poster, m.id_msg, b.id_board, b.name AS bName,
IFNULL(mem2.real_name, ms.poster_name) AS firstPoster,
IFNULL(mem.real_name, m.poster_name) AS lastPoster
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
LEFT JOIN {db_prefix}members AS mem2 ON (mem2.id_member = t.id_member_started)
WHERE t.id_last_msg >= {int:min_msg_id}
AND ' . $query_this_board . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND m.approved = {int:is_approved}' : '') . '
' . $latest_post . '
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array_merge($query_parameters, array(
'min_msg_id' => $min_msg_id,
'is_approved' => 1,
'limit' => 10, //Mesaj sayısı için 10 değerini değiştirin.
))
);

while ($row = $smcFunc['db_fetch_assoc']($request))
{
$context['topics'][] = array(
'id' => $row['id_topic'],
'subject' => $row['subject'],
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['subject'] . '</a>',
'replies' => $row['num_replies'],
'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>'
),
'firstPoster' => array(
'id' => $row['id_first_poster'],
'name' => $row['firstPoster'],
'time' => (time() - $row['firstTime'] < 3600) ? round((time() - $row['firstTime'])/60, 0) . $txt['minutes_ago'] : timeformat($row['firstTime']),
'href' => $scripturl . '?action=profile;u=' . $row['id_first_poster'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_first_poster'] . '">' . $row['firstPoster'] . '</a>'
),
'lastPoster' => array(
'id' => $row['id_last_poster'],
'name' => $row['lastPoster'],
'time' => (time() - $row['lastTime'] < 3600) ? round((time() - $row['lastTime'])/60, 0) . $txt['minutes_ago'] : timeformat($row['lastTime']),
'href' => $scripturl . '?action=profile;u=' . $row['id_last_poster'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_last_poster'] . '">' . $row['lastPoster'] . '</a>'
),
'lastPost' => array(
'time' => $row['lastTime'],
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.new;topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.new;topicseen#new">' . $row['subject'] . '</a>'
),
);
}
$smcFunc['db_free_result']($request);
if (!empty($context['topics']))
$context['last_post_time'] = $context['topics'][0]['lastPost']['time'];

// If we have an XML request for latests posts, we need to reverse the array
if (!empty($latest_post))
$context['topics'] = array_reverse($context['topics']);

echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="0" cellpadding="4" class="bordercolor" id="topicTable">
<tr>';

// Are there actually any topics to show?
echo '
<td width="15%" class="catbg3"><strong>', $txt['board'], '</strong></td>
<td class="catbg3"><strong>', $txt['topic'], '</strong></td>
<td width="50" class="catbg3" align="center"><strong>', $txt['replies'], '</strong></td>
<td width="150" class="catbg3" align="center"><strong>', $txt['started_by'], '</strong></td>
<td width="150" class="catbg3" align="center"><strong>', $txt['last_post'], '</strong></td>
<td width="16" class="catbg3"></td>';

// No topics.... just say, "sorry bub".
if (empty($context['topics']))
echo '
</tr>
<tr id="no_topics">
<td class="windowbg2" width="100%" colspan="6"><strong>', $txt[151], '</strong></td>';

echo '
</tr>';

foreach ($context['topics'] as $topic)
{
echo '
<tr class="windowbg2" id="topic_', $topic['id'], '">
<td class="smalltext" style="padding-left: 10px; border-bottom: 1px solid rgb(204, 204, 204);">', $topic['board']['link'], '</td>
<td style="padding-left: 10px; border-bottom: 1px solid rgb(204, 204, 204);">', $topic['link'], '</td>
<td align="center" class="smalltext" style="border-bottom: 1px solid rgb(204, 204, 204);">', $topic['replies'], '</td>
<td align="center" class="smalltext" style="border-bottom: 1px solid rgb(204, 204, 204);">', $topic['firstPoster']['link'], '<br />', $topic['firstPoster']['time'], '</td>
<td align="center" class="smalltext" style="border-bottom: 1px solid rgb(204, 204, 204);">', $topic['lastPoster']['link'], '<br />', $topic['lastPoster']['time'], '</td>
<td align="center" style="border-bottom: 1px solid rgb(204, 204, 204);"><a href="', $topic['lastPost']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a></td>
</tr>';
}

echo '
</table>
</div>';
}

AJAXsizrecent()
my modsI don't reply support PMs. Please use support forums.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Son Konular Bloğunu düzenleme
« Reply #5 on: September 23, 2009, 12:49:05 PM »
Şu kodu kullanın:

Code: [Select]
$topics = ssi_recentTopics(10, null, null, 'array');

echo '
<div class="tborder">
<table cellpadding="4" cellspacing="0" style="width: 100%;">
<tr class="catbg">
<td>Bölüm</td>
<td>Konu</td>
<td>Yanıtlar</td>
<td>Son İleti</td>
</tr>';

foreach ($topics as $topic)
echo '
<tr class="windowbg">
<td style="border-bottom: 1px solid #AAA;">', $topic['board']['link'], '</td>
<td style="border-bottom: 1px solid #AAA;">', $topic['link'], '</td>
<td style="border-bottom: 1px solid #AAA;">', $topic['replies'], '</td>
<td style="border-bottom: 1px solid #AAA;">', $topic['poster']['link'], '<br />', $topic['time'], '</td>
</tr>';

echo '
</table>
</div>';

Başlatanı göstermek için sorguyu değiştirmelisiniz. Bunun için vaktim yok maalesef.
And slowly, you come to realize... It's all as it should be...

Offline karanima

  • Semi Newbie
  • *
  • Posts: 36
  • Gender: Male
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Son Konular Bloğunu düzenleme
« Reply #6 on: February 27, 2010, 07:48:25 AM »
forumun adı yerine yanıtlayanı göstersek olur mu acaba yapılabilir mi?

Offline grafitus

  • Board Moderators
  • *
  • Posts: 1554
  • Gender: Male
  • just looking for own old energy
  • SMF Version: None
  • SP Version: None
Re: Son Konular Bloğunu düzenleme
« Reply #7 on: February 27, 2010, 08:10:26 AM »
forumun adı yerine yanıtlayanı göstersek olur mu acaba yapılabilir mi?
Yanıtlayan zaten gösteriliyor. Eğer bölüm ismini kaldırmak isterseniz aşağıdaki kodu kullanın:

Code: [Select]
$topics = ssi_recentTopics(10, null, null, 'array');

echo '
<div class="tborder">
   <table cellpadding="4" cellspacing="0" style="width: 100%;">
      <tr class="catbg">
         <td>Konu</td>
         <td>Yanıtlar</td>
         <td>Son İleti</td>
      </tr>';

foreach ($topics as $topic)
   echo '
      <tr class="windowbg">
         <td style="border-bottom: 1px solid #AAA;">', $topic['link'], '</td>
         <td style="border-bottom: 1px solid #AAA;">', $topic['replies'], '</td>
         <td style="border-bottom: 1px solid #AAA;">', $topic['poster']['link'], '<br />', $topic['time'], '</td>
      </tr>';

echo '
   </table>
</div>';
my modsI don't reply support PMs. Please use support forums.

Offline yastreb

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
    • http://www.bulgaristanturkleri.com
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Son Konular Bloğunu düzenleme
« Reply #8 on: May 26, 2010, 01:34:40 PM »
son ileti kısmında sadece kullanıcı adı yazması için yani saat ve tarih yazmaması için nereyi kaldırmamaız gerekir yada nasıl bir kodlama yapılması lazm

Offline yastreb

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Male
    • http://www.bulgaristanturkleri.com
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Son Konular Bloğunu düzenleme
« Reply #9 on: May 28, 2010, 06:06:14 AM »
flood yapıyorum ama sorunu çözdüm değiştirmek isteyenler alltaki kodu değştirmeleri yeterli

Code: [Select]
<td style="border-bottom: 1px solid #AAA;">', $topic['poster']['link'], '<br />