Advertisement:

Zaman Ayarlı Reklam

Aloittaja jOkErGuEsT, elokuu 30, 2008, 10:06:56 AP

« edellinen - seuraava »

sn1907

Senin sorunun çözümü javascriptte..

ekteki reDirect.js dosyasını indir.. index.html dosyası yarat ve aşağıdaki kodları ekle..


<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<script type="text/javascript" src="reDirect.js"></script>
</HEAD>
<body>
10 saniye içerisinde yönlendirileceksiniz...
<center>
<a href="http://www.fotoogle.gen.tr"><img src="http://img133.imageshack.us/img133/8341/bostezo20aw0.jpg" border="0" alt="Fotoogle"/></center>
</BODY>
</HTML>


reDirect.js dosyasında http://www.arsalanadolu.dom/forum yazan adres yerine forumunun adresini yaz.

reDirect.js ve index.html dosyalarını forum dizinine yükle. Sanırım istediğin çözüm bu ;)

Problem smf ile alakalı değil aslında..

jOkErGuEsT

Sorunu çözdük arkadaşım, ama sağol...

[SiNaN]

Sanırım öyle bir dosya kullanmak istemediği için SMF'e entegre etmeye çalıştı.

Bu arada XHTML hataları oluşmaması için;

1) Kodları <body> tagından hemen sonra ekleyin.
2) Kodların içindeki <body> tagını kaldırın.
3) die(); kodundan önce  echo '</body></html>'; kodunu ekleyin.
Former SMF Core Developer | My Mods | SimplePortal

Evo™

Kodları direkt olarak boardindex.template php de globallardan sonra koydum index.template.php'ye koymadım aynı şekilde çalışıyor index.template.php ye de koymam gerekir mi ki.

[SiNaN]

Hayır. Ama eğer BoardIndex.template.php'de kullanıyorsanız die(); yerine return; kullanmalısınız sanırım.
Former SMF Core Developer | My Mods | SimplePortal

Evo™



if(empty($_REQUEST['reklam']) && empty($_SESSION['reklam']))
{

echo'
     <script type="text/javascript">
var secs = 8;
var delay = 800;
function yonlen() {
   var strUrl = "http://www.turkishsharing.com/forum";
   window.location=strUrl;
}
function startTimer() {
    if (secs == 0) {
        document.location.href="http://www.turkishsharing.com/forum";
    } else {
        document.getElementById("timer").innerHTML = secs;
        secs = secs - 1;
        self.setTimeout("startTimer()", delay);
    }
}
//startTimer();
</script>

</head>
<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor="#000000" onload="startTimer()">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="800" align="center">
<tr>
    <td width=50% align=left><font style="font-size:12;color:#FFFFFF;font-weight:bold;"><div id="timerText"><span id="timer"></span>&nbsp;saniye içinde yönlendirileceksiniz...</div></font></td>
    <td width=50% height="25" align="right"><a href="http://www.turkishsharing.com/forum"><b><font color="#FFFFFF" size="2">Reklamı Geç</font></b></a></td>
</tr>
<tr>
    <td colspan=2>
    <SCRIPT language="JavaScript" type="text/javascript">
    document.write(\'<SCR\'+\'IPT src="http://ads.maksimum.net/advertpro/servlet/view/banner/javascript/zone?zid=406&pid=9&random=\'+Math.floor(89999999*Math.random()+10000000)+\'" language="JavaScript" type="text/javascript"></SCR\'+\'IPT>\');
    </SCRIPT>
    </td>
</tr>
</table>
</body>
';
      $_SESSION['reklam'] = true;

      die();
}


Böyle koydum sorunsuz çalıştı.

[SiNaN]

Değişiklikleri index.template.php'de yapmanız daha uygun olacak, şimdi farkettim. Çünkü body tagına onload ekleniyormuş. XHTML hataları oluşmaması için aşağıdaki kodu <body> tagından hemen önce eklemeniz yeterli:

if(empty($_REQUEST['reklam']) && empty($_SESSION['reklam']))
{

echo'
     <script type="text/javascript">
var secs = 8;
var delay = 800;
function yonlen() {
   var strUrl = "http://www.turkishsharing.com/forum";
   window.location=strUrl;
}
function startTimer() {
    if (secs == 0) {
        document.location.href="http://www.turkishsharing.com/forum";
    } else {
        document.getElementById("timer").innerHTML = secs;
        secs = secs - 1;
        self.setTimeout("startTimer()", delay);
    }
}
//startTimer();
</script>

<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor="#000000" onload="startTimer()">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="800" align="center">
<tr>
    <td width=50% align=left><font style="font-size:12;color:#FFFFFF;font-weight:bold;"><div id="timerText"><span id="timer"></span>&nbsp;saniye içinde yönlendirileceksiniz...</div></font></td>
    <td width=50% height="25" align="right"><a href="http://www.turkishsharing.com/forum"><b><font color="#FFFFFF" size="2">Reklamı Geç</font></b></a></td>
</tr>
<tr>
    <td colspan=2>
    <SCRIPT language="JavaScript" type="text/javascript">
    document.write(\'<SCR\'+\'IPT src="http://ads.maksimum.net/advertpro/servlet/view/banner/javascript/zone?zid=406&pid=9&random=\'+Math.floor(89999999*Math.random()+10000000)+\'" language="JavaScript" type="text/javascript"></SCR\'+\'IPT>\');
    </SCRIPT>
    </td>
</tr>
</table>
</body>
</html>
';
      $_SESSION['reklam'] = true;

      die();
}


Eğer forumun ortasında göstermek istiyorsanız.

</head>
<body>';


Değiştir:

';

if(empty($_REQUEST['reklam']) && empty($_SESSION['reklam']))
{

echo'
     <script type="text/javascript">
var secs = 8;
var delay = 800;
function yonlen() {
   var strUrl = "http://www.turkishsharing.com/forum";
   window.location=strUrl;
}
function startTimer() {
    if (secs == 0) {
        document.location.href="http://www.turkishsharing.com/forum";
    } else {
        document.getElementById("timer").innerHTML = secs;
        secs = secs - 1;
        self.setTimeout("startTimer()", delay);
    }
}
//startTimer();
</script>
</head>
<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor="#000000" onload="startTimer()">';
      $_SESSION['reklam'] = true;
}
else
echo '
</head>
<body>';


BoardIndex.template.php

Bul:

// Show some statistics next to the link tree if SP1 info is off.

Değiştir:

if(empty($_REQUEST['reklam']) && empty($_SESSION['reklam']))
{

echo'
<table border="0" cellpadding="0" cellspacing="0" align="center" width="800" align="center">
<tr>
    <td width=50% align=left><font style="font-size:12;color:#FFFFFF;font-weight:bold;"><div id="timerText"><span id="timer"></span>&nbsp;saniye içinde yönlendirileceksiniz...</div></font></td>
    <td width=50% height="25" align="right"><a href="http://www.turkishsharing.com/forum"><b><font color="#FFFFFF" size="2">Reklamı Geç</font></b></a></td>
</tr>
<tr>
    <td colspan=2>
    <SCRIPT language="JavaScript" type="text/javascript">
    document.write(\'<SCR\'+\'IPT src="http://ads.maksimum.net/advertpro/servlet/view/banner/javascript/zone?zid=406&pid=9&random=\'+Math.floor(89999999*Math.random()+10000000)+\'" language="JavaScript" type="text/javascript"></SCR\'+\'IPT>\');
    </SCRIPT>
    </td>
</tr>
</table>
';

$_SESSION['reklam'] = true;

return;
}

// Show some statistics next to the link tree if SP1 info is off.


Hiçbir XHTML hatasına sebep olmaz bu şekilde.
Former SMF Core Developer | My Mods | SimplePortal

piran

yapamadım denilenleri hata verdi template parse hatası offff

Advertisement: