SimplePortal
Support => Turkish (Türkçe) => International Support => Ki?iselle?tirme => Topic started by: regal on August 16, 2010, 10:28:35 AM
-
Siteye baktım , varsa da göremedim.
Portaldaki haberlerin altına ziyaretçilerin yorum eklemesi için bir yorum ekleme bölümü yapabilirmiyiz.
-
Portalda bulunan haberler, forumdaki konuların sadece bir görüntüsü diyebiliriz. Yani bunlara konuların yorumları dışında ayrıca bir yorum ekleme özelliği eklemek mantıksız olur. Ama bir hızlı yanıt özelliği ekleyebiliriz. :nervous-happy:
Not: Sadece Bölüm Haberleri bloğunda çalışır!
./Sources/PortalBlocks.php
global $scripturl, $txt, $settings, $modSettings, $context, $smcFunc, $color_profile
global $scripturl, $txt, $settings, $modSettings, $context, $smcFunc, $color_profile, $options, $user_info, $language;
'new_comment' => !empty($row['locked']) ? '' : '| <a href="' . $scripturl . '?action=post;topic=' . $row['id_topic'] . '.' . $row['num_replies'] . '">' . $txt['ssi_write_comment'] . '</a>',
'new_comment' => !empty($row['locked']) ? '' : '| <a href="#" id="QuickReply" onclick="displayQuickReply(\'QuickReply' . $row['id_topic'] . '\'); return false;" >' . $txt['ssi_write_comment'] . '</a>',
if (empty($return))
if (!isset($context['response_prefix']) && !($context['response_prefix'] = cache_get_data('response_prefix', 600)))
{
if ($language === $user_info['language'])
$context['response_prefix'] = $txt['response_prefix'];
else
{
loadLanguage('index', $language, false);
$context['response_prefix'] = $txt['response_prefix'];
loadLanguage('index');
}
cache_put_data('response_prefix', $context['response_prefix'], 600);
}
if (empty($return))
foreach ($return as $news)
{
echo '
<h3 class="catbg"><span class="left"></span>
<span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a> | ', $news['timeyear'], '
</h3>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">';
if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
echo '
<img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" class="sp_float_right" />
<div class="middletext">', $news['timeday'], ' ', $txt['by'], ' ', $news['poster']['link'], '<br />', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';
else
echo '
<div class="middletext">', $news['timeday'], ' ', $txt['by'], ' ', $news['poster']['link'], ' | ', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';
echo '
<div class="post"><hr />', $news['body'], '</div>
<div class="sp_right">', $news['link'], ' ', $news['new_comment'], '</div>
</div>
<span class="botslice"><span></span></span>
</div>
<br />';
}
foreach ($return as $news)
{
echo '
<h3 class="catbg"><span class="left"></span>
<span class="sp_float_left sp_article_icon">', $news['icon'], '</span><a href="', $news['href'], '" >', $news['subject'], '</a> | ', $news['timeyear'], '
</h3>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="sp_content_padding">';
if ($avatars && $news['avatar']['name'] !== null && !empty($news['avatar']['href']))
echo '
<img src="', $news['avatar']['href'], '" alt="', $news['poster']['name'], '" width="30" class="sp_float_right" />
<div class="middletext">', $news['timeday'], ' ', $txt['by'], ' ', $news['poster']['link'], '<br />', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';
else
echo '
<div class="middletext">', $news['timeday'], ' ', $txt['by'], ' ', $news['poster']['link'], ' | ', $txt['sp-articlesViews'], ': ', $news['views'], ' | ', $txt['sp-articlesComments'], ': ', $news['replies'], '</div>';
echo '
<div class="post"><hr />', $news['body'], '</div>
<div class="sp_right">', $news['link'], ' ', $news['new_comment'], '</div>
<form id="QuickReply', $news['id'], '" style="display: none;" action="', $scripturl, '?action=post2', empty($context['current_board']) ? '' : ';board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);" style="margin: 0;">
<input type="hidden" name="topic" value="', $news['id'], '" />
<input type="hidden" name="subject" value="', $context['response_prefix'], $news['subject'], '" />
<input type="hidden" name="icon" value="xx" />
<input type="hidden" name="from_qr" value="1" />
<input type="hidden" name="notify" value="', !empty($context['is_marked_notify']) || !empty($options['auto_notify']) ? '1' : '0', '" />
<input type="hidden" name="goback" value="', empty($options['return_to_post']) ? '0' : '1', '" />
<input type="hidden" name="num_replies" value="', $news['replies'], '" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />';
// Guests just need more.
if ($context['user']['is_guest'])
echo '
<strong>', $txt['name'], ':</strong> <input type="text" name="guestname" value="', $context['name'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" />
<strong>', $txt['email'], ':</strong> <input type="text" name="email" value="', $context['email'], '" size="25" class="input_text" tabindex="', $context['tabindex']++, '" /><br />';
// Is visual verification enabled?
if (!empty($context['require_verification']))
echo '
<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
echo '
<div class="quickReplyContent">
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea>
</div>
<div class="righttext padding">
<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="', $context['tabindex']++, '" class="button_submit" />
<input type="submit" name="preview" value="', $txt['preview'], '" onclick="return submitThisOnce(this);" accesskey="p" tabindex="', $context['tabindex']++, '" class="button_submit" />
</div>
</form>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function displayQuickReply(div)
{
var current = document.getElementById(div).style.display == \'none\' ? 1 : 0;
document.getElementById(div).style.display = current ? \'\' : \'none\';
}
// ]]></script>
</div>
<span class="botslice"><span></span></span>
</div>
<br />';
}
-
Bunuda istiyordum. ÇoK İYİ Oldu. Teşekkür ederim. Sanırım benim anlatımımdan kaynaklanan bir yanlış anlaşılma oldu. Tabiki üyeler için böyle bir şeye gerek yok.
Benim isteğim üye olmayan kişilerinde portalda bulunan yazılara, adı soyadı ve mailini yazarak yada sadece adını yazarak yorum ekleyebilsinler istiyorum.
örneğin, haberci24.com ün kullandığı gibi bir şey.
-
Forumunuzda ziyaretçilere yazma izni verirseniz bu da mümkün olur.
-
Sources/PortalBlocks.php
de ilk satır olan
global $scripturl, $txt, $settings, $modSettings, $context, $smcFunc, $color_profile
bulunmuyor
-
SMF 1.1.x kullanıyorsunuz sanırım? Bunu bulun:
global $scripturl, $db_prefix, $txt, $settings, $user_info, $modSettings, $context, $color_profile, $func;
global $scripturl, $db_prefix, $txt, $settings, $user_info, $modSettings, $context, $color_profile, $func, $options, $user_info, $language;
-
smf 1.1.11 kullanıyorum ikinci koduda bulamadım :S