09 Eylül 2010, 15:18:58
*
Google Tagged - Tagged'leri Ana Sayfada Göstermek

SMFPlus SMF Destek /Google Tagged - Tagged'leri Ana Sayfada Göstermek => Google Tagged modunun ne işe yaradığını biliyoruz. Bu kodlamayı yaparak tagların ana sayfada da görünmesini sağlıyoruz. 50 adet tag gözüküyor ve

Sayfa: [1]   Aşağı git
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
Site Kurucusu
*
Rep: 520
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 3.145
SoleKinG ;)
Profili Görüntüle SoleKinG
Google Tagged modunun ne işe yaradığını biliyoruz.
Bu kodlamayı yaparak tagların ana sayfada da görünmesini sağlıyoruz.
50 adet tag gözüküyor ve her sayfa değiştiğinde otomatik olarak değişiyor taggedler.



BoardIndex.php'de bulun:

Kod: [Seç]
// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.

Öncesine ekleyin:

Kod: [Seç]
// Prepare tag cloud.
$query = db_query("
SELECT g.tag, g.ID_TAG, g.hits, g.status, g.ID_TOPIC, t.ID_TOPIC
FROM {$db_prefix}googletagged as g, {$db_prefix}topics as t
WHERE g.ID_TOPIC = t.ID_TOPIC
AND g.status != 0
GROUP BY g.tag
ORDER BY RAND()
LIMIT 50", __FILE__, __LINE__);

loadLanguage('GoogleTagged');

// FOUND SOME TAGS?
if(mysql_num_rows($query) != 0)
{
$context['googletagged'] = array();
$highest = 1 ;
$lowest = 999999999999 ; // SO IT FORCES THE FIRST ROW TO BE THE LOWEST
while($row = mysql_fetch_assoc($query))
{
$context['googletagged'][] = $row;
$highest = ($row['hits'] > $highest) ? $row['hits'] : $highest ;
$lowest = ($row['hits'] < $lowest) ? $row['hits'] : $lowest ;
}
unset($row);
$maxsize = 200;
$minsize = 100;
$diff = ($highest - $lowest == 0) ? 1 : ($highest - $lowest);
$steps = ($maxsize - $minsize)/$diff;

foreach ($context['googletagged'] as $key => $row)
{
$context['googletagged'][$key]['size'] = ceil($minsize + ($steps * ($row['hits'] - $lowest)));
$context['googletagged'][$key]['text'] = str_replace("+", " ", $context['googletagged'][$key]['tag']);
}
unset($key,$row,$steps,$highest,$lowest,$maxsize,$minsize);
mysql_free_result($query);
}


BoardIndex.template.php'de bulun:

Kod: [Seç]
}

?>


Öncesine ekleyin:

Kod: [Seç]
echo '
<table border="0" cellpadding="4" cellspacing="0" align="center" width="80%" class="tborder">
<tr class="titlebg">
<td align="center">
', $txt['googletagged_random50'], '
</td>
</tr>
<tr>
<td align="center" class="windowbg2">';

if(isset($context['googletagged']))
{
$i = 1 ;
foreach($context['googletagged'] as $key => $row)
{
echo '  <a href="', $scripturl , '?action=tagged;id=', $row['ID_TAG'] ,';tag=', $row['tag'] ,'" style="font-size: '.$row['size'].'%;" title="', $row['text'] ,'">', $row['text'] ,'</a>';
echo (($i % 10) == 0) ? '<br/>' : '';
$i++;
}
unset($i,$key,$row);
}
else
{
echo $txt['googletagged_empty'];
}
echo '
</td>
</tr>
  </table>';




Alıntı : Simple Machines Forum
Yönetici
*
Rep: 82
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 2.037
<? echo "$cevap"; ?>
Profili Görüntüle SmfPlus
Teşekkürler Mustafa Ab....   :)
Silver Üye
*
Rep: 9
Çevrimdışı Çevrimdışı
İleti: 261
Profili Görüntüle
GüzeL Paylasım Sağolasın



Alayına İsyan Ölümüne SMF

MSN'Den Destek Yok
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 9
Profili Görüntüle
teşekkürler
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 142
Profili Görüntüle Dostperest
Kod: [Seç]
// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.
Bu kod benim Boardİndex te yok .. Normal bi şekilde yerleştirmeye çalıştım fakat bu seferde veritabanı hatası verdi..




Yeni Üye
*
Rep: 2
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 115
Profili Görüntüle KURULUM HOSTİNG
Kod: [Seç]
// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.
Bu kod benim Boardİndex te yok .. Normal bi şekilde yerleştirmeye çalıştım fakat bu seferde veritabanı hatası verdi..
aynen katılıyorum kod default board da yok



| KURULUMHOSTİNG | İnternet ve Bilişim Hizmetleri |
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 10
Profili Görüntüle
Arkadaşlar acaba  " BU " Sitede nasıl google taggedları gösterebilirim ya :(

Yapmaya calıstım ama sadece bir tablo felan cıktı :(
Yeni Üye
*
Rep: 0
Çevrimdışı Çevrimdışı
İleti: 34
Profili Görüntüle Uyku Sersemi
evet yok :D
Silver Üye
*
Rep: 12
Çevrimdışı Çevrimdışı
Cinsiyet: Bay
İleti: 466
Profili Görüntüle Dizi,Film İndir Ve İzle
kod yok boardindex te



Sayfa: [1]   Yukarı git

Google Etiketleri

 

Benzer Konular

  Konu / Başlatan Yanıt Son İleti
9 Yanıt
1346 Gösterim
Son İleti 16 Nisan 2009, 22:18:39
Gönderen: limanli34
2 Yanıt
412 Gösterim
Son İleti 06 Aralık 2008, 16:40:28
Gönderen: cincihoca
3 Yanıt
349 Gösterim
Son İleti 05 Ocak 2009, 15:08:59
Gönderen: SoleKinG
0 Yanıt
226 Gösterim
Son İleti 13 Şubat 2009, 15:00:57
Gönderen: Uluşah
0 Yanıt
314 Gösterim
Son İleti 24 Mayıs 2009, 19:23:53
Gönderen: мεяτ2407™