Webmaster Forumu - WebForumlari.Net  
WF üyeleri ve ziyaretçileri Facebook Sayfamıza katılabilirsiniz. Facebook Sayfamız
WF Reklam Alanı
Go Back   Webmaster Forumu - WebForumlari.Net > Genel Programlama > Web Tabanlı Hazır Sistemler > SMF

Cevapla
 
LinkBack Seçenekler Arama Stil
  #1 (permalink)  
Alt 28-11-2009, 23:20
 
İstanbul Anadolu Şubesi
Mesajlar: 934
e-Ticaret: (0)
iTrader Feedback: (0%)
Tecrübe Puanı: 3
Rep Puanı: 10
Rep Derecesi : Webforumlari is on a distinguished road
Standart SMF forum indexlenmesi çok pratik.[Test edildi]


Kod:
100000 ? "
AND ID_MSG >= " . ($modSettings['maxMsgID'] * 0.5) : '') . "
ORDER BY ID_MSG DESC
LIMIT 10", __FILE__, __LINE__);
$board_post_times = array(time());
while ($row2 = mysql_fetch_assoc($request2))
$board_post_times[] = $row2['posterTime'];
mysql_free_result($request2);

$boards[] = array(
'id' => $row['ID_BOARD'],
'times' => $board_post_times,
);
}
mysql_free_result($request);

$request = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}topics
ORDER BY numViews + numReplies DESC
LIMIT 1000", __FILE__, __LINE__);
$topics = array();
while ($row = mysql_fetch_assoc($request))
{
$request2 = db_query("
SELECT posterTime
FROM {$db_prefix}messages
WHERE ID_TOPIC = $row[ID_TOPIC]
ORDER BY ID_MSG DESC
LIMIT 10", __FILE__, __LINE__);
$topic_post_times = array(time());
while ($row2 = mysql_fetch_assoc($request2))
$topic_post_times[] = $row2['posterTime'];
mysql_free_result($request2);

$topics[] = array(
'id' => $row['ID_TOPIC'],
'times' => $topic_post_times,
);
}
mysql_free_result($request);

$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
ORDER BY totalTimeLoggedIn DESC
LIMIT 20", __FILE__, __LINE__);
$members = array();
while ($row = mysql_fetch_assoc($request))
{
$request2 = db_query("
SELECT posterTime
FROM {$db_prefix}messages
WHERE ID_MEMBER = $row[ID_MEMBER]" . ($modSettings['totalMessages'] > 100000 ? "
AND ID_MSG >= " . ($modSettings['maxMsgID'] * 0.5) : '') . "
ORDER BY ID_MSG DESC
LIMIT 10", __FILE__, __LINE__);
$member_post_times = array(time());
while ($row2 = mysql_fetch_assoc($request2))
$member_post_times[] = $row2['posterTime'];
mysql_free_result($request2);

$members[] = array(
'id' => $row['ID_MEMBER'],
'times' => $member_post_times,
);
}
mysql_free_result($request);

// First, the forum URL. Highest priority!
echo '

', $scripturl, '
', posts_max_time($latest_post_times), '
', posts_to_freq($latest_post_times), '
1.0
';

// Now the boards!
foreach ($boards as $board)
{
echo '

', $scripturl, '?board=', $board['id'], '.0
', posts_max_time($board['times']), '
', posts_to_freq($board['times']), '
', posts_to_priority(0.8, $board['times']), '
';
}

// Popular topics too...
foreach ($topics as $topic)
{
echo '

', $scripturl, '?topic=', $topic['id'], '.0
', posts_max_time($topic['times']), '
', posts_to_freq($topic['times']), '
', posts_to_priority(0.7, $board['times']), '
';
}

// Most active members?
foreach ($members as $member)
{
echo '

', $scripturl, '?action=profile;u=', $member['id'], '
', posts_max_time($member['times']), '
', posts_to_freq($member['times']), '
', posts_to_priority(0.5, $board['times']), '
';
}

echo '
';

function posts_max_time($post_times)
{
if (empty($post_times) || count($post_times) == 1)
return gmstrftime('%Y-%m-%dT%H:%M:%S+00:00', time() - 3600 * 24 * 10);

return gmstrftime('%Y-%m-%dT%H:%M:%S+00:00', max($post_times));
}

function posts_to_priority($base, $post_times)
{
if (empty($post_times) || count($post_times) == 1)
return sprintf('%1.1f', $base);

$s = (max($post_times) - min($post_times)) / count($post_times);

if ($s < 3600 * 24)
$mod = 0.1;
else
$mod = 0;

return sprintf('%1.1f', $base + $mod);
}

function posts_to_freq($post_times)
{
if (empty($post_times) || count($post_times) == 1)
return 'yearly';

$s = (max($post_times) - min($post_times)) / count($post_times);

// Changes more often than every hour.
if ($s < 3600)
return 'always';
elseif ($s < 3600 * 12)
return 'hourly';
elseif ($s < 3600 * 24 * 4)
return 'daily';
else
return 'monthly';
}

?>
İlkinin değeri konu sayısını belirler.Bunu da konu sayının biraz daha üstüne ayarlarsan sorun olmaz. İkinci kırmızı da kullanıcı profilleri. kaç tane istersen ayarlayabilirsiniz.





SMF kullanan bir sürü arkadaş forum indexlenmiyor diye dert yanmıştı bende çok sıkıntı çekiyordum bu konuda bir sürü program denedim fakat çok uzun sürdüğü için hep yarıda bıraktım üssteki code ise herşeyi kolaşlaştırıyor.



yukardaki kodu boş tane .php dosyası oluşturun içine atın codeleri ve kaydettikten sonra ftp forum ana dizine atın .php dosyasını ondan sonra

siteadi.com/forum/xxx.php açın ve bekleyin size herşeyi hazırlıcak sitemap hazırlama işi bittikten sonra sitemap.xml diye dosya yaratın ve xxx.php deki tüm linkleri sitemap.xml içine aktarın gerisi biliyorsun google.com/webmasters/sitemap sitemap kaydedin 2 önce yaptım ve bugun kontrol ettim forum daki konular indexlenmiş



örnek:

[Bu Linki Görüntüleyebilmeniz İçin Üye Olmanız Gerekiyor. Üye olmak için Tıklayın...]
Alıntı ile Cevapla
Sponsor Reklam

Cevapla

Etiketler
çok, edildi, forum, indexlenmesi, pratiktest, smf


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 

Paylaş
Seçenekler Arama
Stil

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık

Hizli Erisim


Tüm Zamanlar GMT +2 Olarak Ayarlanmış. Şuanki Zaman: 07:31.


Powered by vBulletin® Version 3.8.4
Telif hakkı ©2000 - 2012, Jelsoft Enterprises Ltd.
Webmaster Forumu

Yasal Uyarı : 5651 sayılı kanun'un 8. maddesine ve T.C.K'nın 125. maddesine göre paylaşımlardan paylaşımı yapan üyeler sorumludur. WebForumlari.Net hakkında yapılacak tüm hukuksal şikayetler, webmaster@webforumlari.net adresi ile iletişime geçilmesi halinde, ilgili kanunlar ve yönetmelikler çerçevesinde en geç bir hafta içerisinde tarafımızca gereken işlemler yapılacaktır.
Copyright © 2009 - 2012 WebForumlari.Net