Kako dodati toboads v php nuke
 
PowerNight 18. jul 2008 15:51:31 Pridružen od:
6. sep 2006
356 objav
15 54 8
#1

Najlažje je dodati reklame v php nuke preko iframe. Vendar bi rad dodal kodo za toboads, ki pa razložijo na svoji strani, da ni priporočljivo uporabljati iframe, ker oglasi ne delujejo potem pravilno.



Kodo bi dodal v header.html, ki ga theme.php potem prikaže.


$tmpl_file = "themes/Terayon/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;

Če odstranim funkcijo addslashes pa se stran ne prikazuje več pravilno...



Prosim za pomoč!


všeč(0) ni všeč(0) spam(0)
 
PowerNight 19. jul 2008 08:36:09 Pridružen od:
6. sep 2006
356 objav
15 54 8
#2

Rešitev je spodaj. header.html sem razbil na dva dela in vmes includal file s toboads kodo.



$tmplfile = "themes/Terayon/header.html";

$thefile = implode("", file($tmpl
file));

$thefile = addslashes($thefile);

$thefile = "\$rfile=\"".$thefile."\";";

eval($thefile);

print $r
file;


include("includes/toboads.php");

$tmpl_file = "themes/Terayon/header1.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
všeč(0) ni všeč(0) spam(0)
 
Vini 19. jul 2008 10:49:47 Pridružen od:
1. sep 2006
6612 objav
5234 611 56
#3

WTF? phpNuke dela templating z eval() funkcijo?


všeč(0) ni všeč(0) spam(0)
 
HeXeR 19. jul 2008 11:57:27 Pridružen od:
13. dec 2006
3268 objav
122 22 5
#4

Vini:

WTF? phpNuke dela templating z eval() funkcijo?




Hehe, 2 krat ni za rečt da je res tako .. :D


všeč(0) ni všeč(0) spam(0)
First rule of business, protect your investment.
 
 

🔒 Za odgovor na to temo se moraš prijaviti.

Prijavi se