SimplePortal

Support => International Support => Turkish (Türkçe) => Topic started by: Paragaya on February 28, 2009, 02:16:54 AM

Title: Konu ?conu ?
Post by: Paragaya on February 28, 2009, 02:16:54 AM
Code: [Select]
// Check that this message icon is there...
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';

censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['ID_MEMBER']] = $row['ID_MEMBER'];

$return[] = array(
'id' => $row['ID_TOPIC'],
'message_id' => $row['ID_MSG'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'subject' => $row['subject'],
'time' => timeformat($row['posterTime']),
'timestamp' => forum_time(true, $row['posterTime']),
'body' => $row['body'],
'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['numReplies'] . ' ' . ($row['numReplies'] == 1 ? $txt['smf_news_1'] : $txt['smf_news_2']) . '</a>',
'replies' => $row['numReplies'],
'comment_href' => !empty($row['locked']) ? '' : $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'],
'comment_link' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . ';num_replies=' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'new_comment' => !empty($row['locked']) ? '' : '<a href="' . $scripturl . '?action=post;topic=' . $row['ID_TOPIC'] . '.' . $row['numReplies'] . '">' . $txt['smf_news_3'] . '</a>',
'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']) ? '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>' : $row['posterName']
),
'locked' => !empty($row['locked']),
'is_last' => false,
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
),
);
}
mysql_free_result($request);

if (empty($return))
return $return;

$return[count($return) - 1]['is_last'] = true;



if ($output_method != 'echo')
return $return;

foreach ($return as $news)
{
echo '
<div>
<a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>
<div class="smaller">', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '</div>

<div class="post" style="padding: 2ex 0;">', $news['body'], '</div>

', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '
</div>';

if (!$news['is_last'])
echo '
<hr style="margin: 2ex 0;" width="100%" />';
}
}


Bu kodu bir yerde gördüm konu , mesaj ile ilgili konu iconu mu acaba bloka okuttum

Heralde ç?kt?s?n? alamad???mdan d?r :)

böyle bir hata geldi

Quote
PHP Syntax Error. Please check the code.
Title: Re: Konu İconu ?
Post by: [SiNaN] on March 01, 2009, 12:24:12 PM
Üzgünüm ama ne yapmak istediğinizi ve sorunun ne olduğunu anlayamadım.
Title: Re: Konu İconu ?
Post by: grafitus on March 03, 2009, 08:31:45 AM
Üzgünüm ama ne yapmak istediğinizi ve sorunun ne olduğunu anlayamadım.

Sanırım kodla son mesajlar kısmına değişik (avatar,konu ikonu,vs) özellikler eklemek için kullanmak istiyor..
Title: Re: Konu İconu ?
Post by: Paragaya on March 03, 2009, 11:58:05 AM
Ewet ama çıktısını alamadım o yüzden işe yaramıyor :(

Çıktısını nasıl alırım diye soruyorum bir yerde görmüştüm ama :S
Title: Re: Konu İconu ?
Post by: Yağız... on March 05, 2009, 05:43:58 AM
Burada bir veritabanı sorgusu bulunmadığından çıktıyı alamazsın zaten.
Title: Re: Konu İconu ?
Post by: grafitus on March 05, 2009, 08:41:19 AM
Doğruya :D

Arkadaşım şey sen bunu nerden buldun merak ettim.Yada yarım almışsın aldığın yerden kodu.
Title: Re: Konu İconu ?
Post by: Paragaya on March 05, 2009, 01:30:19 PM
Yok yarım değildir bi portal dan değişik değişki sitelerden :D
Title: Re: Konu İconu ?
Post by: Yağız... on March 05, 2009, 02:14:11 PM
Önceki mesajımda söylediğim gibi veritabanı sorgusu yok. O yüzden yarım oluyor ;)
Title: Re: Konu İconu ?
Post by: [SiNaN] on April 28, 2009, 03:46:34 AM
Bunun ile ilgili hala yardıma ihtiyacınız var mı?
Title: Re: Konu İconu ?
Post by: Paragaya on April 29, 2009, 02:57:36 AM
Yok tpic Solved.
SimplePortal 2.3.8 © 2008-2024, SimplePortal