ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: Tip: AdSenseRotator for asp  (อ่าน 1427 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
yesupdate
ก๊วนเสียว
*

พลังน้ำใจ: 10
ออฟไลน์ ออฟไลน์

กระทู้: 401



ดูรายละเอียด
« เมื่อ: 06 มิถุนายน 2007, 13:40:25 »


ได้ Code มาจากเว็บเมืองนอก หากใครรู้แล้วก็ผ่านเลย ขั้นตอนทำงานคือ จะตรวจสอบวันว่าเป็นวันไหน เช่น วันอาทิตย์ Ad สีแดง วันจันทร์ สีเหลือง เป็นต้น แต่ถ้าใครจะเอาไป ดัดแปลงสามารถผสมกับตัว Content ได้ เช่น วันอาทิตย์ ติดแบบ บน กลาง ล่าง  วันจันทร์ ติดแบบ ขาว ซ้าย บน วันอังคาร เล่นเฉพาะรูป เพิ่มความแปลกใหม่ ให้ผู้เข้าชมได้ ไอเดียสามารถดัดแปลงไปใช้กับโปรแกรมอื่นได้ อย่างมากมาย.. เอาเป็น Idea แบบขำๆ แก้เซ็งนะ  Tongue

<%
dim MyWeekDay,CodesToRotate,ShowDefault

'setting this value to true will cause showing default code from case else branch
ShowDefault=false

'up to seven codes to rotate one for each day of the week
'setting this value to lower than seven will cause code to repeat until the end of the week
'for example if you have 4 styles to rotate,on Friday will be code for Monday shown,on Saturday code for Tuesday,
'on Sunday code for Wendsday
CodesToRotate=3

MyWeekDay = Weekday(Date(),2)


if MyWeekDay>CodesToRotate then
do while MyWeekDay>CodesToRotate
MyWeekDay=MyWeekDay-CodesToRotate
loop
end if



if ShowDefault=true then
MyWeekDay=0
end if

Select Case MyWeekDay

'using adsense code creator tool create different ad styles with different colors of borders,background and text
'paste different style for each day of the week
'create a number of styles up to number set in CodesToRotate variable
'look for the style which brings the highest click through rate and set that style as default
'instead of pasting AdSense code here,include file statement can be used
case 1%>
insert Monday code here
<%case 2%>
insert Tuesday code here
<%case 3%>
insert Wendsday code here
<%case 4%>
insert Thursday code here
<%case 5%>
insert Friday code here
<%case 6%>
insert Saturday code here
<%case 7%>
insert Sunday code here
<%case else%>
insert default code here
<%End Select%>

 Huh?
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์