Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: POP UNDER
Forum PHP.pl > Forum > Gotowe rozwiązania
Pyksel
:? Cześć !
Mam problem , chce do swojej strony wstawić POP UNDER i mam kod ( podam tutaj bez danych )
Cytat
<SCRIPT LANGUAGE="JavaScript"><!--function (){window.open("","","'toolbars=false,location=false,width=,height=,directories=false,status=false,menu
ar=false,scrollbars=false'");}//--></SCRIPT>


I nie wiedziałem gdzie go wkleic to wkleiłem go do THEME.php

Cytat
<?php

$bgcolor1 = "#555555";
$bgcolor2 = "#666666";
$bgcolor3 = "#333333";
$bgcolor4 = "#444444";
$textcolor1 = "#FFFFFF";
$textcolor2 = "#FFFFFF";

include("themes/Ti2k/tables.php");

/************************************************************/
/* Function themeheader()                                   */
/*                                                          */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks    */
/* function for left side with: blocks(left);               */
/************************************************************/

function themeheader() {
   global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi, $module_name;
   cookiedecode($user);
   $username = $cookie[1];
   if ($username == "") {
       $username = "Anonymous";
   }
   echo "<body onmouseover="window.status=' $sitename ';return true" bgcolor="#4F4F4F" ONLOAD="preloadImages();" text="#FFFFFF" link="#009999" vlink="#009999" alink="#FF6600" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">";
   if ($banners == 1) {
       include("banners.php");
   }
   $topics_list = "<select style="width: 100px; height: 15px; border-width: 0px;" name="new_topic" onChange='submit()'>n";
   $topics_list .= "<option value="">All Topics</option>n";
   $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi);
   while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) {
   if ($topicid==$topic) { $sel = "selected "; }
       $topics_list .= "<option $sel value="$topicid">$topics</option>n";
       $sel = "";
   }
   if ($username == "Anonymous") {
       $theuser = "&nbsp;&nbsp; <a href="modules.php?name=Your_Account&op=new_user" class="nav">Witaj! Kliknij tutaj aby załozyć konto";
   } else {
       $theuser = "&nbsp;&nbsp;Witaj $username ! na Stronie";
   }
   $public_msg = public_message();
   $tmpl_file = "themes/Ti2k/header.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = "$r_file="".$thefile."";";
   eval($thefile);
   print $r_file;
   if ($module_name != "Forums")
   {
   blocks(left);
   }
   $tmpl_file = "themes/Ti2k/left_center.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "$r_file="".$thefile."";";
   eval($thefile);
   print $r_file;
}

/************************************************************/
/* Function themefooter()                                   */
/*                                                          */
/* Control the footer for your site. You don't need to      */
/* close BODY and HTML tags at the end. In some part call   */
/* the function for right blocks with: blocks(right);       */
/* Also, $index variable need to be global and is used to   */
/* determine if the page your're viewing is the Homepage or */
/* and internal one.                                        */
/************************************************************/

function themefooter() {
   global $index, $foot1, $foot2, $foot3, $copyright, $totaltime;
   if ($index == 1) {
       $tmpl_file = "themes/Ti2k/center_right.html";
       $thefile = implode("", file($tmpl_file));
       $thefile = addslashes($thefile);
       $thefile = "$r_file="".$thefile."";";
       eval($thefile);
       print $r_file;
       blocks(right);
   }
   $footer_message = "$foot1<br>$foot2<br>$foot3<br>$copyright<br>$totaltime";
   $tmpl_file = "themes/Ti2k/footer.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = "$r_file="".$thefile."";";
   eval($thefile);
   print $r_file;
}

/************************************************************/
/* Function themeindex()                                    */
/*                                                          */
/* This function format the stories on the Homepage         */
/************************************************************/

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
   global $anonymous, $tipath;
   $ThemeSel = get_theme();
   if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
       $t_image = "themes/$ThemeSel/images/topics/$topicimage";
   } else {
       $t_image = "$tipath$topicimage";
   }
   if ($notes != "") {
       $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>n";
   } else {
       $notes = "";
   }
   if ("$aid" == "$informant") {
       $content = "$thetext$notesn";
   } else {
       if($informant != "") {
           $content = "<a class="nav" href="modules.php?name=Your_Account&amp;op=userinfo&amp;uname=$informant">$informant</a> ";
       } else {
           $content = "$anonymous ";
       }
       $content .= ""._WRITES." <i>"$thetext"</i>$notesn";
   }
   $posted = ""._POSTEDBY." ";
   $posted .= get_author($aid);
   $posted .= " "._ON." $time";
   $tmpl_file = "themes/Ti2k/story_home.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "$r_file="".$thefile."";";
   eval($thefile);
   print $r_file;
}

/************************************************************/
/* Function themearticle()                                  */
/*                                                          */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home        */
/************************************************************/

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
   global $admin, $sid, $tipath;
   $ThemeSel = get_theme();
   if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
       $t_image = "themes/$ThemeSel/images/topics/$topicimage";
   } else {
       $t_image = "$tipath$topicimage";
   }
   $posted = ""._POSTEDON." $datetime "._BY." ";
   $posted .= get_author($aid);
   if ($notes != "") {
       $notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>n";
   } else {
       $notes = "";
   }
   if ("$aid" == "$informant") {
       $content = "$thetext$notesn";
   } else {
       if($informant != "") {
           $content = "<a class="nav" href="modules.php?name=Your_Account&amp;op=userinfo&amp;uname=$informant">$informant</a> ";
       } else {
           $content = "$anonymous ";
       }
       $content .= ""._WRITES." <i>"$thetext"</i>$notesn";
   }
   $tmpl_file = "themes/Ti2k/story_page.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "$r_file="".$thefile."";";
   eval($thefile);
   print $r_file;
}

/************************************************************/
/* Function themesidebox()                                  */
/*                                                          */
/* Control look of your blocks. Just simple.                */
/************************************************************/

function themesidebox($title, $content) {
   $tmpl_file = "themes/Ti2k/blocks.html";
   $thefile = implode("", file($tmpl_file));
   $thefile = addslashes($thefile);
   $thefile = "$r_file="".$thefile."";";
   eval($thefile);
   print $r_file;
}

?>


I dodalem tam na koncu :
Cytat
/************************************************************/
/* POP UNDERY I POPUP ()                                                                 */
/*                                                                                                     */
/* .                                                                                                   */
/************************************************************/

}
   echo "KOD POPUNDERA"

}

?>

I NIE DZIAŁA sad.gif CO JESYT GRANE WIE KTOS ?
JEST TO php-NUKE THEMES
tsharek
niestety nie pomogę - nie używam phpnuka, ale zwrucę uwagę tylko na fajnie zredagowany post:) nie ma to jak kod pszedstawiać jako cytat:)
Paul
cytat bo to nie jego kod winksmiley.jpg
Pyksel
Poco ta gadka??
Chce tylko zeby mi ktos pomógl !!
Paul
[php:1:82202e04f8]<?php
echo "<body onmouseover="window.status=' $sitename ';return true" bgcolor="#4F4F4F" text="#FFFFFF" link="#009999" vlink="#009999" alink="#FF6600" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="preloadImages(); ---- nazwy funkcji np: funkcja();">

------ tu skrypt popundera -------

";
?>[/php:1:82202e04f8]
Pyksel
Twoj sposob niestety nie działa sad.gif
Paul
Ciekawe snitch.gif To inaczej - to jest moja funkcja popundera (w tym wypadku swojej nie musisz):
[xml:1:e937e34be9]<html>
<body>
<script type="text/javascript">
function popunder(adres,szer,wys) {
okno = window.open(adres,'', 'width='+szer+',height='+wys);
okno.blur();
}
popunder('jakis_adres.htm',350,350)
</script>
</body>
</html>
[/xml:1:e937e34be9]


A tu jej zastosowanie:
[php:1:e937e34be9]<?php
echo "<body onmouseover="window.status=' $sitename ';return true" bgcolor="#4F4F4F" ONLOAD="preloadImages();" text="#FFFFFF" link="#009999" vlink="#009999" alink="#FF6600" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script type="text/javascript">

function popunder(adres,szer,wys) {
okno = window.open(adres,'', 'width='+szer+',height='+wys);
okno.blur();
}
popunder('jakis_adres.htm',350,350)
</script>";
?>[/php:1:e937e34be9]
Pyksel
Dzieki ale nie działa :
Zrobiłem to tak:
[php:1:d818b71af2]<?php

$bgcolor1 = "#555555";
$bgcolor2 = "#666666";
$bgcolor3 = "#333333";
$bgcolor4 = "#444444";
$textcolor1 = "#FFFFFF";
$textcolor2 = "#FFFFFF";

include("themes/Ti2k/tables.php");

/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/

function themeheader() {
global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi, $module_name;
cookiedecode($user);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body onmouseover="window.status=' $sitename ';return true" bgcolor="#4F4F4F" ONLOAD="preloadImages();" text="#FFFFFF" link="#009999" vlink="#009999" alink="#FF6600" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script type="text/javascript">
function popunder(adres,szer,wys) {
okno = window.open(adres,'http://www.wp.pl', 'width='600',height='500');
okno.blur();
}
popunder('http://www.wp.pl',350,350)
</script>";
?>
if ($banners == 1) {
include("banners.php");
}

[/php:1:d818b71af2]

Pop up poprostu nie wyskakuje !! ( nie wyswietla sie )
Paul
Co ty z tym zrobiles :? ...

[php:1:460756553b]<?php
echo "<body onmouseover="window.status=' $sitename ';return true"
bgcolor="#4F4F4F" ONLOAD="preloadImages();" text="#FFFFFF" link="#009999"
vlink="#009999" alink="#FF6600" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0">
<script type="text/javascript">

function popunder(adres,szer,wys) {
okno = window.open(adres,'', 'width='+szer+',height='+wys);
okno.blur();
}
popunder('jakis_adres.htm',350,350);
</script>";
// zmieniasz tylko i wylacznie tutaj (linia 12) i nigdzie wiecej - adres, szerokosc, wysokosc - taka kolejnosc snitch.gif
?>[/php:1:460756553b]
Pyksel
mam takie pytanie raczej poza tematem.
Czy jest mozliwosc takiego czegos zeby pop up danej strony dla jednego IP dziennie wyswietlal sie tylko RAZ.
chodzi oto ze: jesli np. dziisaj wejde na strone to wyskoczy mi pop up a punziej za 5 godzin znowu wejde to juz mi nie wykoczy.

istnieje cos takiego?
Paul
Najprosciej bedzie zrobic to ciastkiem:

:arrow: Wyswietlasz popup i wysylasz ciasteczko
:arrow: Jesli ciasteczko jest to nic nie robisz, jak nie ma po pkt 1 smile.gif
zielar
Dodaj sobie pop under w pliku index.php i po prostu zawsze przy wejściu na stronę będzie się on pojawiał
Paul
Cytat
po prostu zawsze przy wejściu na stronę będzie się on pojawiał

Cytat
dziennie wyswietlal sie tylko RAZ

...
Pyksel
A jak zrobic takie cos?? ( z cisteczkiem ) smile.gif
Paul
Poszukaj w sieci i na forum. Zaloze sie, ze bylo smile.gif ... W ostatecznosci ci napisze.
XeqtR
tak jak poprzednicy lub ew. na bazie danych zrobic tabele do której zostaną wpisane adresy odwiedzających a następnie poprzez odpowiednie zapytanie do bazy pop sie pojawi albo nie. Najlepiej zastosować to i to, bo niektorzy maja wylaczona obsluge cookies
Pyksel
czesc ! aarambo.gif

znalazlem :

  1. <script language="javascript" type="text/javascript">
  2. <!--
  3. var tresc="pop=1"; // tresc ciasteczka
  4. var godzin=24; // czas waznosci
  5.  
  6. if (document.cookie.indexOf(tresc,0)<0) {
  7. var wygasa=new Date();
  8. wygasa=new Date(wygasa.getTime()+60*60*1000*godzin);
  9. document.cookie=tresc+"; expires="+wygasa.toGMTString();
  10.  
  11. okienko=open("reklama.html","okno",
  12. "width=300,height=300,scrollbars=no,menubar=no");
  13.  
  14. }
  15. // -->


I znalezlem tez inny sposob aby zrobic to w index.php , ale to dziala tylko ze stary kodem pop upa a z tym nowym co podalem o gury to niestety nie działa sad.gif.
KOD:

  1. <?php
  2. echo &#092;"<script language=\"javascript\" type=\"text/javascript\">
  3. <!--
  4. var tresc=&#092;"pop=1\"; // tresc ciasteczka
  5. var godzin=25;      // czas waznosci
  6.  
  7. if (document.cookie.indexOf(tresc,0)<0) {
  8.   var wygasa=new Date();
  9.   wygasa=new Date(wygasa.getTime()+60*60*1000*godzin);
  10.   document.cookie=tresc+&#092;"; expires=\"+wygasa.toGMTString();
  11.  
  12.   okienko=open(&#092;"http://www.WWW.pl\",\"okno\",
  13.   &#092;"width=600,height=600,scrollbars=yes,menubar=yes\");
  14. }
  15. // --> 
  16. </script>\";
  17.  
  18. ?>


I dalej nie bede calego podawal smile.gif. Noi cos nie dziala wyskakuje blad ze cos jest nie tak w 14 LINI i cos tam mu chodzi o " ' "

probowalem to dac tez w theme.php ale to samo.
Prosze pomozcie sad.gif tiredsmiley.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.