The theme is under construction, please let us know any bugs you see in the meantime.
The theme is under construction, please let us know any bugs you see in the meantime.

Smf Kategorinin Üzerine Reklam Ekleme

orhan

Moderator
ea2kc5.png


Bu modifikasyon forum anasayfasında istediğiniz bir kategorinin üstüne reklam eklemek için yapılmıştır.
Anlatım sıfır default temaya göredir. Editli temalarda ve diğer temalarda anlatım değişiklik arz edebilir.

Manuel Kurulum:
BoardIndex.template.php
Bul:
Kod:
/* Each category in categories is made up of:
 id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
 new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
 and boards. (see below.) */
 foreach ($context['categories'] as $category)
 {
 // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
 if (empty($category['boards']) && !$category['is_collapsed'])
 continue;

 echo '
 <tbody class="header" id="category_', $category['id'], '">
 <tr>
 <td colspan="4">
 <div class="cat_bar">
 <h3 class="catbg">';

 // If this category even can collapse, show a link to collapse it.

Değiştir:
Kod:
/* Each category in categories is made up of:
 id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
 new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
 and boards. (see below.) */
 foreach ($context['categories'] as $category)
 {
 // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)

 if($category['id'] == "1")
 echo '
 <tbody class="header" id="category_', $category['id'], '">
 <tr>
 <td colspan="4">
 <div class="cat_bar">
 <h3 class="catbg">
                            ', $txt['kategori-reklam'], '
 </h3>
 </div>
 <span class="clear upperframe"><span></span></span>
 <div class="kategori-reklam">
 
 
 
 SPONSOR REKLAM KODLARI BURAYA YAZILACAK
 
 
 
 </div>
 <span class="lowerframe"><span></span></span>

 </td>
 </tr>
 </tbody>';
 echo '
 <tbody class="header" id="category_', $category['id'], '">
 <tr>
 <td colspan="4">
 <div class="cat_bar">
 <h3 class="catbg">';

 // If this category even can collapse, show a link to collapse it.

index.css
En alta ekle:
Kod:
.kategori-reklam
{
 padding: 0 10px;
 background: #f5f5f5;
 border-left: 1px solid #c5c5c5;
 border-right: 1px solid #c5c5c5;
 text-align: center; 
 color: #0000ff;
}

index.turkish.php
En altaki kodun üstüne ekle:
Kod:
$txt['kategori-reklam'] = 'Sponsor Reklam';

Daha sonra reklamı hangi kategorinin üzerinde göstermek istiyorsanız ona göre aşağıdaki kodu BoardIndex.template dosyasında değiştiriniz. Koddaki 1 rakamı kategori idsidir. Örneğin 3 idli kategorinin üzerinde göstermek istiyorsanız 1 rakamını silip 3 yazınız.
Kod:
if($category['id'] == "1")

Reklam eklemek için de SPONSOR REKLAM KODLARI BURAYA YAZILACAK yazan yeri silip reklam kodlarınızı ekleyin.

Admin panelden reklam eklemeli sürümü için kurulum aşağıdaki şekildedir:
Bu modifikasyon istediğiniz bir kategorinin üzerine admin panelden reklam eklemeye yarar.
Paket yöneticisinden kurabilirsiniz.
Reklam kodları admin panelde kullanılan tema bölümünden eklenir.
Modifikasyon sıfır default temaya göre hazırlanmıştır. Editli temalarda ve diğer temalarda anlatım değişiklik arz edebilir.

Kurulum tamamlandıktan sonra reklamın hangi kategorinin üzerinde çıkmasını istiyorsanız aşağıdaki kodu BoardIndex.template dosyasında bulup kategori idsini değiştiriniz. Verilen kodda kategori idsi 1 dir.
Kod:
if($category['id'] == "1")

Manuel Kurulum:
BoardIndex.template.php
Bul:
Kod:
/* Each category in categories is made up of:
 id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
 new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
 and boards. (see below.) */
 foreach ($context['categories'] as $category)
 {
 // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
 if (empty($category['boards']) && !$category['is_collapsed'])
 continue;

 echo '
 <tbody class="header" id="category_', $category['id'], '">
 <tr>
 <td colspan="4">
 <div class="cat_bar">
 <h3 class="catbg">';

 // If this category even can collapse, show a link to collapse it.

Değiştir:
Kod:
/* Each category in categories is made up of:
 id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
 new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
 and boards. (see below.) */
 foreach ($context['categories'] as $category)
 {
 // If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)

 if($category['id'] == "1")
 echo '
 <tbody class="header" id="category_', $category['id'], '">
 <tr>
 <td colspan="4">
 <div class="cat_bar">
 <h3 class="catbg">
                            ', $txt['CategoryOnAd'], '
 </h3>
 </div>
 <span class="clear upperframe"><span></span></span>
 <div class="CategoryOnAd">'. $settings['CategoryOnAd'] . '</div>
      <span class="lowerframe"><span></span></span>

 </td>
 </tr>
 </tbody>';
 echo '
 <tbody class="header" id="category_', $category['id'], '">
 <tr>
 <td colspan="4">
 <div class="cat_bar">
 <h3 class="catbg">';

 // If this category even can collapse, show a link to collapse it.

Modifications.english.php
Bul:
Kod:
?>

Üstüne ekle:
Kod:
$txt['CategoryOnAd'] = 'Sponsor Ad';

Modifications.turkish.php
Bul:
Kod:
?>

Üstüne ekle:

Üstüne ekle:
Kod:
$txt['CategoryOnAd'] = 'Sponsor Reklam';

index.css
En alta ekle:
Kod:
.CategoryOnAd
{
 padding: 0 10px;
 background: #f5f5f5;
 border-left: 1px solid #c5c5c5;
 border-right: 1px solid #c5c5c5;
 text-align: center; 
 color: #0000ff;
}

Settings.template.php
Bul:
Kod:
function template_settings()
{
 global $context, $settings, $options, $scripturl, $txt;

 $context['theme_settings'] = array(

Değiştir:
Kod:
function template_settings()
{
 global $context, $settings, $options, $scripturl, $txt;

 $context['theme_settings'] = array(
    array(
            'id' => 'CategoryOnAd',
            'label' => $txt['CategoryOnAd'],
            'description' => $txt['CategoryOnAd'],
            'type' => 'text',
),

Alinti Bolubeyi
 

Notice

According to Article 8 of Law No. 5651 and Article 125 of the Turkish Republic Law, all our members are responsible for their posts. Content that you think is against the law and legislation FROM HERE You can report. I will try to get back to you as soon as possible.
Geri
Üst