网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   vBulletin技术交流 (https://www.0058.net/forumdisplay.php?f=6)
-   -   如何在首页加入不同的内容? (https://www.0058.net/showthread.php?t=3973)

topvip 2009-08-10 05:41 PM

如何在首页加入不同的内容?
 
比如,在首页多加一组adsense广告代码,可这么操作:

Code:


<if condition="THIS_SCRIPT == 'index'">
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 160x600, vbb */
google_ad_slot = "xxxxxxxxxxxxxxxx";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 160x600, vbb */
google_ad_slot = "xxxxxxxxxxxxxxxx";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<else />
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
/* 160x600, vbb */
google_ad_slot = "xxxxxxxxxxxxxxxx";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</if>

即可这么写:

Code:

<if condition="THIS_SCRIPT == 'index'">
{banner for index here}
<else />
{banner for all other pages here}
</if>



All times are GMT +8. The time now is 10:38 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.