广告联盟网

 找回密码
 注册
查看: 462|回复: 2
打印 上一主题 下一主题

发现GG代码已做了小改进 增加渠道名称注释行

[复制链接]
跳转到指定楼层
1#
发表于 2006-9-25 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
GG代码做了小改进,已加上注释行,标明生成日期及渠道名称,例如:
//2006-09-25: 渠道名称

虽然改进了,但还是不满足,最好能公开一下渠道代码的算法.知道算法的请说一下.
3#
 楼主| 发表于 2006-9-25 | 只看该作者
我的渠道名一般以文件所在目录名或不含扩展名的文件名取名,GG代码用函数生成,这样在asp页中可比较灵活控制 广告大小\颜色\是否显示等等,生成静态HTML页时也可根据字段控制并随时根据标识符用代码修改.渠道一多,老是得到后台查看代码.只能自己一个个渠道收集到本地文件,用的时候再查找,增加出错的机会.如果知道算法,便可直接传入文件名或目录名生成渠道代码.代码参考一下,有需要用的拿去用用呵.

function getGGAds(nwidth,nheight,adtype,adchannel,cborder,cbg,clink,curl,ctext)
if not isnumeric(nwidth) or not isnumeric(nheight) then
  getGGAds = ""
  exit function
end if
if adtype="" then adtype="text_image"
if adchannel="" then adchannel="xxxxxxxxxx"
if cborder="" then cborder="FFFFFF"
if cbg="" then cbg="FFFFFF"
if clink="" then clink="0000FF"
if curl="" then curl="000000"
if ctext="" then ctext="000000"
getGGAds=""
&quot;<script type=&quot;&quot;text/javascript&quot;&quot;><!--&quot;&vbcrlf&_
&quot;google_ad_client = &quot;&quot;pub-XXXXXXXXXXXXXX&quot;&quot;;&quot;&vbcrlf&_
&quot;google_ad_width = &quot;&nwidth&&quot;;&quot;&vbcrlf&_
&quot;google_ad_height = &quot;&nheight&&quot;;&quot;&vbcrlf&_
&quot;google_ad_format = &quot;&quot;&quot;&nwidth&&quot;x&quot;&nheight&&quot;_as&quot;&quot;;&quot;&vbcrlf&_
&quot;google_ad_type = &quot;&quot;&quot;&adtype&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;google_ad_channel =&quot;&quot;&quot;&adchannel&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;google_color_border = &quot;&quot;&quot;&cborder&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;google_color_bg = &quot;&quot;&quot;&cbg&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;google_color_link = &quot;&quot;&quot;&clink&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;google_color_url = &quot;&quot;&quot;&curl&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;google_color_text = &quot;&quot;&quot;&ctext&&quot;&quot;&quot;;&quot;&vbcrlf&_
&quot;//--></script>&quot;&vbcrlf&_
&quot;<script type=&quot;&quot;text/javascript&quot;&quot;&quot;&vbcrlf&_
&quot;  src=&quot;&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&quot;>&quot;&vbcrlf&_
&quot;</script>&quot;
end function
2#
发表于 2006-9-25 | 只看该作者
知道算法有什么用?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|广告联盟网  

GMT, 2024-9-29 , Processed in 0.058228 second(s), 20 queries .

Powered by Discuz! X3.2

© 2005-2021 www.ggads.com GGADS 广告联盟网

快速回复 返回顶部 返回列表