เทคโนโลยี่ » วิธีการติด Google AdS. ใต้ post ใน SMF บอร์ด

วิธีการติด Google AdS. ใต้ post ใน SMF บอร์ด

5 มิถุนายน 2018
1883   0

 

.

วิธีการติด AdSense ใน SMF บอร์ด ให้อยู่ใต้ post นั้นมีวิธีการตั้งนี้..

1.เปิดไฟล์ Display.template.ph p ขึ้นมา (เราใช้ theme อะไร ก็เปิดใน theme นั้น)2. ค้นหาบรรทัด <div class=”signature”>’, $message[‘member’][‘signature’],

‘</div>’;

3. เมื่อเจอแล้ว ก็ให้แทรกโค๊ดข้างล่างนี้ลงไป
if ($message[‘id’] == $context[‘first_message’])echo’ <hr width=”100%” size=”1″ class=”hrcolor” />ใส่ code AdSense ของเรา’;
เช่น
—————–

โค๊ด: [Select]
 if ($message['id'] == $context['first_message'])

echo' <hr width="100%" size="1" class="hrcolor" />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxx";
/*post*/
google_ad_slot = "xxxxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>';   

—————-

4. ปกติ code Adsense เริ่มต้นด้วย <script และจบด้วย </script> ซึ่งในการติด AdSense ในที่นี่ อย่าลืมเครื่องหมาย ‘; หลัง </script> นะครับ

5. upload ขึ้นไปแทนไฟล์เดิมได้เลยครับ หรือหากแก้ไขใน host โดยตรงก็ save ได้เลยครับ.