Praat mee over van alles en nog wat!
Forumregels
Dit forum is voor alle zinnige gesprekken buiten phpBB om. Discussies en gesprekken over interessante onderwerpen.
Een nieuw onderwerp moet..:
- uiteraard voldoen aan de algemene voorwaarden
- niet passen in de gewone supportfora
- interessante zijn voor het overgrote deel van onze gebruikers
- een neutrale of positieve ondertoon hebben
- anders zijn dan bestaande onderwerpen
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 03:28
Hallo mensen, ik zit met een probleem.
Ik wil graag via een simpel iframe wat advertenties includen onder de streams van de media, nu is het probleem dat in firefox het frame de goeie kleur geeft en in IE weer niet gewoon blank wit. Kan iemand even de php code nalopen kijken wat er fout is?
alvast bedankt.
Voorbeeld image:
http://img87.imageshack.us/img87/6338/v ... eemba7.jpg
Code: Selecteer alles
<?php
$ad = file('2link'); //get the ads
$count = file_get_contents('1count'); //get the current ad to display
//just put them in their own vars for simplicity
//two ads for 468x60 banner - $a to $d for ad1 and $f to $i for ad2
if (isset($ad[$count+0]))
$a = $ad[$count+0]; //title
if (isset($ad[$count+1]))
$b = $ad[$count+1]; //description line 1
if (isset($ad[$count+2]))
$c = $ad[$count+2]; //description line 3
if (isset($ad[$count+3]))
$d = $ad[$count+3]; //URL
if (isset($ad[$count+5]))
$f = $ad[$count+5]; //title ad 2
if (isset($ad[$count+6]))
$g = $ad[$count+6]; //description line 1
if (isset($ad[$count+7]))
$h = $ad[$count+7]; //description line 3
if (isset($ad[$count+8]))
$i = $ad[$count+8]; //URL
if (isset($ad[$count+10]))
$k = $ad[$count+10]; //title ad 3
if (isset($ad[$count+11]))
$l = $ad[$count+11]; //description line 1
if (isset($ad[$count+12]))
$m = $ad[$count+12]; //description line 3
if (isset($ad[$count+13]))
$n = $ad[$count+13]; //URL
if (isset($ad[$count+15]))
$p = $ad[$count+15]; //title ad 4
if (isset($ad[$count+16]))
$q = $ad[$count+16]; //description line 1
if (isset($ad[$count+17]))
$r = $ad[$count+17]; //description line 3
if (isset($ad[$count+18]))
$s = $ad[$count+18]; //URL
?>
<style type="text/css">
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<?
//display the banner
echo "<table><tr><td width=\"25%\">";
if (isset($a) && isset($b) && isset($c) && isset($d)) {
echo '<a href="'.$d.'" target="_blank"><b>'.$a.'</b></a><br />';
echo $b.' ';
echo $c;
}
echo "</td><td width=\"25%\">";
if (isset($f) && isset($g) && isset($h) && isset($i)) {
echo '<a href="'.$i.'" target="_blank"><b>'.$f.'</b></a><br />';
echo $g.' ';
echo $h;
}
echo "</td><td width=\"25%\">";
if (isset($k) && isset($l) && isset($m) && isset($n)) {
echo '<a href="'.$n.'" target="_blank"><b>'.$k.'</b></a><br />';
echo $l.' ';
echo $m;
}
echo "</td><td width=\"25%\">";
if (isset($p) && isset($q) && isset($r) && isset($s)) {
echo '<a href="'.$s.'" target="_blank"><b>'.$p.'</b></a><br />';
echo $q.' ';
echo $r;
}
echo "</td></tr><tr><td colspan=\"2\" class=\"foot\">
<a class=\"foot\" href=\"javascript:location.reload(true)\">Refresh Links</a></td>
<td colspan=\"2\" class=\"foot\" align=\"right\">
<a class=\"foot\" href=\"http://www.seolinkexchange.com\">rss-wiki Link Exchange</a> </td>
</tr></table>";
//update the count file so we get new ads each time the page loads
if (count($ad) <= $count+20)
file_put_contents('1count', 0); //end of list reset back to start, not randon sequence
else
file_put_contents('1count', $count+20);
/* Note the file format of 2link is paramount or data will not be in sync
really did not want to have to create a database to show a few links */
?>
Laatst gewijzigd door
special18 op 09 jun 2007, 18:05, 1 keer totaal gewijzigd.
-
ElbertF
- Berichten: 5803
- Lid geworden op: 12 okt 2004, 08:34
-
Contacteer:
Bericht
door ElbertF » 09 jun 2007, 08:59
Je kan de iframe zelf nog een achtergrondkleur geven, ik kan uit de code niet opmaken of je dat hebt gedaan. Zou moeten werken in alle browsers.
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 16:37
Hm I see nee dat heb ik dus niet, kan iemand mij die code overhandiger waarmee ik het ertussen kan gooien?
Code: Selecteer alles
<CENTER><IFRAME WIDTH="760" VSPACE="100" SCROLLING="no" FRAMEBORDER="0" HEIGHT="120" SRC="http://animeresource.eu/advertising/4ad.php"> </IFRAME> <CENTER>
-
Salomon
- Berichten: 3878
- Lid geworden op: 14 feb 2006, 16:15
Bericht
door Salomon » 09 jun 2007, 16:39
Zet er gewoon style="background-color: red;"
bij?
-
ElbertF
- Berichten: 5803
- Lid geworden op: 12 okt 2004, 08:34
-
Contacteer:
Bericht
door ElbertF » 09 jun 2007, 16:45
Jup, zo dus: <IFRAME [color=#00BF00]style="background-color: red;"[/color] WIDTH="760"
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 16:53
zeer bedankt, kon die code zo 123 effe nie vinden
EDIT:
Dit zie ik dus ook alleen in firefox <_<
-
ElbertF
- Berichten: 5803
- Lid geworden op: 12 okt 2004, 08:34
-
Contacteer:
Bericht
door ElbertF » 09 jun 2007, 17:02
Als je een linkje geeft kan ik 't waarschijnlijk wel oplossen.
-
Salomon
- Berichten: 3878
- Lid geworden op: 14 feb 2006, 16:15
Bericht
door Salomon » 09 jun 2007, 17:15
Wat dacht je er trouwens van om je iframe IN de html te zetten?
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 17:21
k naja correct coderen is niet zo van belang maar die kleur wel, moet het php bestandje gewoon niet grijs worden zou dat niet een oplossing zijn kan iemand me daarvoor anders de background code voor geven?
-
ElbertF
- Berichten: 5803
- Lid geworden op: 12 okt 2004, 08:34
-
Contacteer:
Bericht
door ElbertF » 09 jun 2007, 17:21
De HTML van pagina in de iframe klopt niet. Deze moet ook html en body tags hebben, de body kun je op dezelfde manier een andere achtergrondkleur geven zodat IE het ook goed weergeeft.
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 17:30
Ik volg het totaal niet meer, en snap niet wat je bedoelt. Html van het iframe is fout dus dat regeltje code wat is dan wel de goeie code? En als de achtergrond verandert kan worden van de php pagina naar dezelfde achtergrond van de pagina waar hij in gaat zou probleem toch opgelost zijn ?
Maar als ik een achtergrond code invoeg in de 4ad.php weergeeft hij hem alleen in firefox zou iemand het willen corrigeren aub
Code: Selecteer alles
<?php
$ad = file('2link'); //get the ads
$count = file_get_contents('1count'); //get the current ad to display
//just put them in their own vars for simplicity
//two ads for 468x60 banner - $a to $d for ad1 and $f to $i for ad2
if (isset($ad[$count+0]))
$a = $ad[$count+0]; //title
if (isset($ad[$count+1]))
$b = $ad[$count+1]; //description line 1
if (isset($ad[$count+2]))
$c = $ad[$count+2]; //description line 3
if (isset($ad[$count+3]))
$d = $ad[$count+3]; //URL
if (isset($ad[$count+5]))
$f = $ad[$count+5]; //title ad 2
if (isset($ad[$count+6]))
$g = $ad[$count+6]; //description line 1
if (isset($ad[$count+7]))
$h = $ad[$count+7]; //description line 3
if (isset($ad[$count+8]))
$i = $ad[$count+8]; //URL
if (isset($ad[$count+10]))
$k = $ad[$count+10]; //title ad 3
if (isset($ad[$count+11]))
$l = $ad[$count+11]; //description line 1
if (isset($ad[$count+12]))
$m = $ad[$count+12]; //description line 3
if (isset($ad[$count+13]))
$n = $ad[$count+13]; //URL
if (isset($ad[$count+15]))
$p = $ad[$count+15]; //title ad 4
if (isset($ad[$count+16]))
$q = $ad[$count+16]; //description line 1
if (isset($ad[$count+17]))
$r = $ad[$count+17]; //description line 3
if (isset($ad[$count+18]))
$s = $ad[$count+18]; //URL
?>
<style type="text/css">
<body bgcolor="#C0C0C0">
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<?
//display the banner
echo "<table><tr><td width=\"25%\">";
if (isset($a) && isset($b) && isset($c) && isset($d)) {
echo '<a href="'.$d.'" target="_blank"><b>'.$a.'</b></a><br />';
echo $b.' ';
echo $c;
}
echo "</td><td width=\"25%\">";
if (isset($f) && isset($g) && isset($h) && isset($i)) {
echo '<a href="'.$i.'" target="_blank"><b>'.$f.'</b></a><br />';
echo $g.' ';
echo $h;
}
echo "</td><td width=\"25%\">";
if (isset($k) && isset($l) && isset($m) && isset($n)) {
echo '<a href="'.$n.'" target="_blank"><b>'.$k.'</b></a><br />';
echo $l.' ';
echo $m;
}
echo "</td><td width=\"25%\">";
if (isset($p) && isset($q) && isset($r) && isset($s)) {
echo '<a href="'.$s.'" target="_blank"><b>'.$p.'</b></a><br />';
echo $q.' ';
echo $r;
}
echo "</td></tr><tr><td colspan=\"2\" class=\"foot\">
<a class=\"foot\" href=\"javascript:location.reload(true)\">Refresh Links</a></td>
<td colspan=\"2\" class=\"foot\" align=\"right\">
<a class=\"foot\" href=\"http://www.seolinkexchange.com\">rss-wiki Link Exchange</a> </td>
</tr></table>";
//update the count file so we get new ads each time the page loads
if (count($ad) <= $count+20)
file_put_contents('1count', 0); //end of list reset back to start, not randon sequence
else
file_put_contents('1count', $count+20);
/* Note the file format of 2link is paramount or data will not be in sync
really did not want to have to create a database to show a few links */
?>
-
ElbertF
- Berichten: 5803
- Lid geworden op: 12 okt 2004, 08:34
-
Contacteer:
Bericht
door ElbertF » 09 jun 2007, 17:34
Het gaat om deze pagina:
http://animeresource.eu/advertising/4ad.php
Dit is de broncode:
- Spoiler: bekijk
Code: Selecteer alles
<style type="text/css">
<body bgcolor="#C0C0C0">
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<table><tr><td width="25%"><a href="http://www.animeresource.org/test" target="_blank"><b>Advertise here
</b></a><br />people will watch 30min long
at your add, for 25 euro a month.
</td><td width="25%"></td><td width="25%"></td><td width="25%"></td></tr><tr><td colspan="2" class="foot">
<a class="foot" href="javascript:location.reload(true)">Refresh Links</a></td>
<td colspan="2" class="foot" align="right">
<a class="foot" href="http://www.seolinkexchange.com">rss-wiki Link Exchange</a> </td>
</tr></table>
Zoals je ziet begint het met een style-tag, vervolgens een body en dan CSS code. Daar moet je even een fatsoenlijke HTML pagina van maken, en de body een achtergrondkleur geven met CSS.
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 17:41
ja die heb ik net hierboven gedumpt

-
ElbertF
- Berichten: 5803
- Lid geworden op: 12 okt 2004, 08:34
-
Contacteer:
Bericht
door ElbertF » 09 jun 2007, 17:58
Ik heb niet alles nagelopen, maar dit zou moeten werken:
- Spoiler: bekijk
Code: Selecteer alles
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body style="background-color: red;">
<?php
$ad = file('2link'); //get the ads
$count = file_get_contents('1count'); //get the current ad to display
//just put them in their own vars for simplicity
//two ads for 468x60 banner - $a to $d for ad1 and $f to $i for ad2
if (isset($ad[$count+0]))
$a = $ad[$count+0]; //title
if (isset($ad[$count+1]))
$b = $ad[$count+1]; //description line 1
if (isset($ad[$count+2]))
$c = $ad[$count+2]; //description line 3
if (isset($ad[$count+3]))
$d = $ad[$count+3]; //URL
if (isset($ad[$count+5]))
$f = $ad[$count+5]; //title ad 2
if (isset($ad[$count+6]))
$g = $ad[$count+6]; //description line 1
if (isset($ad[$count+7]))
$h = $ad[$count+7]; //description line 3
if (isset($ad[$count+8]))
$i = $ad[$count+8]; //URL
if (isset($ad[$count+10]))
$k = $ad[$count+10]; //title ad 3
if (isset($ad[$count+11]))
$l = $ad[$count+11]; //description line 1
if (isset($ad[$count+12]))
$m = $ad[$count+12]; //description line 3
if (isset($ad[$count+13]))
$n = $ad[$count+13]; //URL
if (isset($ad[$count+15]))
$p = $ad[$count+15]; //title ad 4
if (isset($ad[$count+16]))
$q = $ad[$count+16]; //description line 1
if (isset($ad[$count+17]))
$r = $ad[$count+17]; //description line 3
if (isset($ad[$count+18]))
$s = $ad[$count+18]; //URL
?>
<style type="text/css">
body {
background-color: red;
}
a.foot {
color: #000;
text-decoration: none;
}
b {
font-size: 13px;
font-family: arial,geneva,helvetica,sans-serif;
text-decoration: none;
}
table {
background: #efefef;
font-family: arial,geneva,helvetica,sans-serif;
font-size: 12px;
width: 728px;
height: 90px;
border: 0px solid color:#fff;
}
td {
vertical-align: top;
border: 0px solid color: #fff;
}
td.foot {
background: #efefef;
font-size: 10px;
font-weight : bolder;
color: #000;
height: 1px;
text-decoration : none;
text-indent : 0px;
line-height : 10px;
}
</style>
<?
//display the banner
echo "<table><tr><td width=\"25%\">";
if (isset($a) && isset($b) && isset($c) && isset($d)) {
echo '<a href="'.$d.'" target="_blank"><b>'.$a.'</b></a><br />';
echo $b.' ';
echo $c;
}
echo "</td><td width=\"25%\">";
if (isset($f) && isset($g) && isset($h) && isset($i)) {
echo '<a href="'.$i.'" target="_blank"><b>'.$f.'</b></a><br />';
echo $g.' ';
echo $h;
}
echo "</td><td width=\"25%\">";
if (isset($k) && isset($l) && isset($m) && isset($n)) {
echo '<a href="'.$n.'" target="_blank"><b>'.$k.'</b></a><br />';
echo $l.' ';
echo $m;
}
echo "</td><td width=\"25%\">";
if (isset($p) && isset($q) && isset($r) && isset($s)) {
echo '<a href="'.$s.'" target="_blank"><b>'.$p.'</b></a><br />';
echo $q.' ';
echo $r;
}
echo "</td></tr><tr><td colspan=\"2\" class=\"foot\">
<a class=\"foot\" href=\"javascript:location.reload(true)\">Refresh Links</a></td>
<td colspan=\"2\" class=\"foot\" align=\"right\">
<a class=\"foot\" href=\"http://www.seolinkexchange.com\">rss-wiki Link Exchange</a> </td>
</tr></table>";
//update the count file so we get new ads each time the page loads
if (count($ad) <= $count+20)
file_put_contents('1count', 0); //end of list reset back to start, not randon sequence
else
file_put_contents('1count', $count+20);
/* Note the file format of 2link is paramount or data will not be in sync
really did not want to have to create a database to show a few links */
?>
</body>
</html>
-
special18
- Berichten: 700
- Lid geworden op: 29 jan 2007, 16:31
- Locatie: Lelystad
-
Contacteer:
Bericht
door special18 » 09 jun 2007, 18:04
Yup nu is hij rood, geweldig elbert onzettend bedankt.