Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Rondom reklamos kodo iterpimas.

Parašė Mandello· 2011 Bal. 22 18:04:24
#1

Sveiki. Niekaip nesuprantu kaip reikia įterpti kodą, kad kai perkraunu web rodytų kitą bannerį. Čia bandau įterpti per theme.php kadangi reklamos plotas headerye.


Čia vieta kur reikia įterpti:

<tr>
<td align='right' class='reklama'>ŠTAI ČIA</td>
</tr>
<tr>




Čia reklamos kodas:

openside("Reklama");
$arr = array("cs.dievas.xz.lt","nba-live.com","fssb.lt","modai.tk");
$bnr = array
("<img src='http://cs.dievas.xz.lt/2/Baneris468x60.gif' style='margin:5px;' align='left'>",
"<img src='http://img83.imageshack.us/img83/5784/nlscbannercw9.png' style='margin:5px;",
"<img src='http://img12.imageshack.us/img12/7931/ne1j.gif' style='margin:5px;",
"<img src='http://www.nba-live.lt/images/reklama/468x60.gif' style='margin:5px;");
$cc = count($arr);
$cl = $cc-1;
$rand = rand(0,$cl);
echo"<center><a href=\"http://$arr[$rand]\">$bnr[$rand]</a></center>";
closeside();



Už pagalbą +11

Parašė switz· 2011 Bal. 22 18:04:50
#2


<tr>
<td align='right' class='reklama'>
 
$arr = array("cs.dievas.xz.lt","nba-live.com","fssb.lt","modai.tk");
$bnr = array
("<img src='http://cs.dievas.xz.lt/2/Baneris468x60.gif' style='margin:5px;' align='left'>",
"<img src='http://img83.imageshack.us/img83/5784/nlscbannercw9.png' style='margin:5px;",
"<img src='http://img12.imageshack.us/img12/7931/ne1j.gif' style='margin:5px;",
"<img src='http://www.nba-live.lt/images/reklama/468x60.gif' style='margin:5px;");
$cc = count($arr);
$cl = $cc-1;
$rand = rand(0,$cl);
echo"<center><a href=\"http://$arr[$rand]\">$bnr[$rand]</a></center>";
 
</td>
</tr>
<tr>


Sitaip man atrodo :)

Parašė Mandello· 2011 Bal. 22 18:04:07
#3

Tai vat ir aš taip mečiau bet kai taip įmetu tada nerodo web. Baltas lapas.

Parašė MaFetas· 2011 Bal. 22 19:04:42
#4


echo "<tr>
 <td align='right' class='reklama'>";
 
$arr = array("cs.dievas.xz.lt","nba-live.com","fssb.lt","modai.tk");
 $bnr = array
 ("<img src='http://cs.dievas.xz.lt/2/Baneris468x60.gif' style='margin:5px;' align='left'>",
 "<img src='http://img83.imageshack.us/img83/5784/nlscbannercw9.png' style='margin:5px;",
 "<img src='http://img12.imageshack.us/img12/7931/ne1j.gif' style='margin:5px;",
 "<img src='http://www.nba-live.lt/images/reklama/468x60.gif' style='margin:5px;");
 $cc = count($arr);
 $cl = $cc-1;
 $rand = rand(0,$cl);
 echo"<center><a href=\"http://$arr[$rand]\">$bnr[$rand]</a></center>";
 
echo "</td></tr><tr>";

Redagavo MaFetas· 2011 Bal. 22 19:04:56

Parašė Mandello· 2011 Bal. 22 19:04:53
#5

Tas pats Š. nesuprantu.
Tas kodas suėjęs patikrinau jis visai neveikia.


openside("reklama");
?>
<html>
<body>
<script type="text/javascript">
var r=Math.random();
if (r>0.5)
{
document.write("<a href='http://cszone.lt'><img src='http://cszone.lt/images/468x60.gif' /></a>");
}
else
{
document.write("<br><a href='http://valve.ipp.lt' target='_blank'><img src='http://valve.ipp.lt/images/banner.gif'>");
}
</script>
 
</body>
</html>
<?
closeside();
naujas bet kaip dabar įterpti?

Redagavo Mandello· 2011 Bal. 22 19:04:32

Parašė MaFetas· 2011 Bal. 22 19:04:55
#6

duok theme.php pilną kodą pirmasis kodas kur davei kuo puikiausiai veikia, įdėsiu tvarkingai čia nieko sudėtingo

Parašė Mandello· 2011 Bal. 22 19:04:12
#7


<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
 
define("THEME_WIDTH", "956");
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");
 
require_once INCLUDES."theme_functions_include.php";
 
function render_page($license=false) {
 
	global $settings, $main_style;
 
	//Header
	echo "<table align='center' cellspacing='0' cellpadding='0' width='1004' class='full-header'>
	<tr>
	<td align='right' class='reklama'><a href='http://cszone.lt'><img src='http://cszone.lt/images/468x60.gif' alt='' style='border:0px;' /></a>
	</td>
	</tr>
	<tr>
	<td align='center' style='padding-top:10px;'>"; include THEME."login.php"; echo "</td>
	</tr></table>";
 
	echo "<table style='padding-right:4px;' align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."'><tr>
	<td><a href='".BASEDIR."index.php'><img src='".THEME."images/head_02.png' alt='' style='border:0px;' /></a></td>
	<td><a href='".BASEDIR."news.php'><img src='".THEME."images/head_03.png' alt='' style='border:0px;' /></a></td>
	<td><a href='".BASEDIR."forum/index.php'><img src='".THEME."images/head_04.png' alt='' style='border:0px;' /></a></td>
	<td><a href='".BASEDIR."viewpage.php?page_id=2'><img src='".THEME."images/head_05.png' alt='' style='border:0px;' /></a></td>
	<td><a href='".BASEDIR."downloads.php'><img src='".THEME."images/head_06.png' alt='' style='border:0px;' /></a></td>
	<td><a href='".BASEDIR."viewpage.php?page_id=3'><img src='".THEME."images/head_07.png' alt='' style='border:0px;' /></a></td>
	<td><a href='".BASEDIR."index.php'><img src='".THEME."images/head_08.png' alt='' style='border:0px;' /></a></td>
	</tr></table>";
 
	//Content
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='$main_style'><tr>";
	if (LEFT) { echo "<td class='side-border-left' valign='top'>"; include THEME."nauji.php"; echo "".LEFT."</td>"; }
	echo "<td class='main-bg' valign='top'><div class='slide-bg'>"; include THEME."slide/imagerotator.html"; echo "</div><br />".U_CENTER.CONTENT.L_CENTER."</td>";
	if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
	echo "</tr></table>";
 
	//Footer
	echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='footer'><tr>
	<td align='left'>
	<a href='".BASEDIR."index.php'><img src='".THEME."images/cszona.png' alt='' style='border:0px;' /></a></td>
	<td align='left'>Copyright 2011 CSzona.net
<br />Visos teises saugomos</td>
	<td align='right'>
	<a href='http://gy.ideart.info' target='_blank'><img src='".THEME."images/gy.png' alt='' style='border:0px;' /></a></td>
	</tr></table>";
 
}
 
function render_news($subject, $news, $info) {
 
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td align='left' class='capmain'>".$subject."</td><td align='left' class='info'>Autorius: <a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> [".showdate("shortdate", $info['news_date'])."]</td><td align=right' class='placiau'><a href='news.php?readmore=".$info['news_id']."'>Placiau</a></td>
	</tr>
	</table>
	<table cellspacing='0' cellpadding='0' width='100%'>
	<tr>
	<td class='main-body'>".$news."</td>
	</tr>
	</table>";
 
}
 
function render_article($subject, $article, $info) {
 
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td class='capmain'>".$subject."</td>
	</tr>
	<tr>
	<td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>
	</tr>
	<tr>
	<td align='center' class='news-footer'>"; 
	echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']); echo "</td>
	</tr>
	</table>";
 
}
 
function nauji($title) {
 
	echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>
	<td class='nauji'>".$title."</td>
	</tr>
	<tr>
	<td class='nauji-body'>";
 
}
 
function nauji_close() {
 
	echo "</td>
	</tr>
	</table>";
 
}
 
function opentable($title) {
 
	echo "<table cellspacing='0' cellpadding='0' width='496'><tr>
	<td class='capmain'>".$title."</td>
	</tr>
	<tr>
	<td class='main-body'>";
 
}
 
function closetable() {
 
	echo "</td>
	</tr>
	</table>";
 
}
 
function openside($title) {
 
global $p_data;
 
if ($p_data['panel_side'] == 1) {
 
  echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='scapmain'>$title</td>
</tr>
<tr>
<td class='side-body'>\n";
 
} else {
 
  echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='scapmain-right'>$title</td>
</tr>
<tr>
<td class='side-body-right'>\n";
}
}
 
function closeside() {
 
global $p_data;
 
if ($p_data['panel_side'] == 1) {
echo "</td>
</tr>
</table>\n";
tablebreak();
 
} else {
 
echo "</td>
</tr>
</table>\n";
tablebreak();
 
 
}
tablebreak();
 
}
?>

Parašė MaFetas· 2011 Bal. 22 19:04:49
#8

Bandyk turi veikti:
<?php

if (!defined("IN_FUSION")) { die("Access Denied"); }

 

define("THEME_WIDTH", "956");

define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt='' style='border:0' />");

 

require_once INCLUDES."theme_functions_include.php";

 

function render_page($license=false) {

 

   global $settings, $main_style;

 

   //Header

   echo "<table align='center' cellspacing='0' cellpadding='0' width='1004' class='full-header'>

   <tr>

   <td align='right' class='reklama'>";
$arr = array("cs.dievas.xz.lt","nba-live.com","fssb.lt","modai.tk");
 $bnr = array
 ("<img src='http://cs.dievas.xz.lt/2/Baneris468x60.gif' style='margin:5px;' align='left'>",
 "<img src='http://img83.imageshack.us/img83/5784/nlscbannercw9.png' style='margin:5px;",
 "<img src='http://img12.imageshack.us/img12/7931/ne1j.gif' style='margin:5px;",
 "<img src='http://www.nba-live.lt/images/reklama/468x60.gif' style='margin:5px;");
 $cc = count($arr);
 $cl = $cc-1;
 $rand = rand(0,$cl);
 echo"<center><a href=\"http://$arr[$rand]\">$bnr[$rand]</a></center>";
   echo "</td>

   </tr>

   <tr>

   <td align='center' style='padding-top:10px;'>"; include THEME."login.php"; echo "</td>

   </tr></table>";

 

   echo "<table style='padding-right:4px;' align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."'><tr>

   <td><a href='".BASEDIR."index.php'><img src='".THEME."images/head_02.png' alt='' style='border:0px;' /></a></td>

   <td><a href='".BASEDIR."news.php'><img src='".THEME."images/head_03.png' alt='' style='border:0px;' /></a></td>

   <td><a href='".BASEDIR."forum/index.php'><img src='".THEME."images/head_04.png' alt='' style='border:0px;' /></a></td>

   <td><a href='".BASEDIR."viewpage.php?page_id=2'><img src='".THEME."images/head_05.png' alt='' style='border:0px;' /></a></td>

   <td><a href='".BASEDIR."downloads.php'><img src='".THEME."images/head_06.png' alt='' style='border:0px;' /></a></td>

   <td><a href='".BASEDIR."viewpage.php?page_id=3'><img src='".THEME."images/head_07.png' alt='' style='border:0px;' /></a></td>

   <td><a href='".BASEDIR."index.php'><img src='".THEME."images/head_08.png' alt='' style='border:0px;' /></a></td>

   </tr></table>";

 

   //Content

   echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='$main_style'><tr>";

   if (LEFT) { echo "<td class='side-border-left' valign='top'>"; include THEME."nauji.php"; echo "".LEFT."</td>"; }

   echo "<td class='main-bg' valign='top'><div class='slide-bg'>"; include THEME."slide/imagerotator.html"; echo "</div><br />".U_CENTER.CONTENT.L_CENTER."</td>";

   if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }

   echo "</tr></table>";

 

   //Footer

   echo "<table align='center' cellspacing='0' cellpadding='0' width='".THEME_WIDTH."' class='footer'><tr>

   <td align='left'>

   <a href='".BASEDIR."index.php'><img src='".THEME."images/cszona.png' alt='' style='border:0px;' /></a></td>

   <td align='left'>Copyright 2011 CSzona.net

<br />Visos teises saugomos</td>

   <td align='right'>

   <a href='http://gy.ideart.info' target='_blank'><img src='".THEME."images/gy.png' alt='' style='border:0px;' /></a></td>

   </tr></table>";

 

}

 

function render_news($subject, $news, $info) {

 

   echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>

   <td align='left' class='capmain'>".$subject."</td><td align='left' class='info'>Autorius: <a href='profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> [".showdate("shortdate", $info['news_date'])."]</td><td align=right' class='placiau'><a href='news.php?readmore=".$info['news_id']."'>Placiau</a></td>

   </tr>

   </table>

   <table cellspacing='0' cellpadding='0' width='100%'>

   <tr>

   <td class='main-body'>".$news."</td>

   </tr>

   </table>";

 

}

 

function render_article($subject, $article, $info) {

 

   echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>

   <td class='capmain'>".$subject."</td>

   </tr>

   <tr>

   <td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>

   </tr>

   <tr>

   <td align='center' class='news-footer'>";

   echo articleposter($info," &middot;").articleopts($info,"&middot;").itemoptions("A",$info['article_id']); echo "</td>

   </tr>

   </table>";

 

}

 

function nauji($title) {

 

   echo "<table cellspacing='0' cellpadding='0' width='100%'><tr>

   <td class='nauji'>".$title."</td>

   </tr>

   <tr>

   <td class='nauji-body'>";

 

}

 

function nauji_close() {

 

   echo "</td>

   </tr>

   </table>";

 

}

 

function opentable($title) {

 

   echo "<table cellspacing='0' cellpadding='0' width='496'><tr>

   <td class='capmain'>".$title."</td>

   </tr>

   <tr>

   <td class='main-body'>";

 

}

 

function closetable() {

 

   echo "</td>

   </tr>

   </table>";

 

}

 

function openside($title) {

 

global $p_data;

 

if ($p_data['panel_side'] == 1) {

 

  echo "<table cellpadding='0' cellspacing='0' width='100%'>

<tr>

<td class='scapmain'>$title</td>

</tr>

<tr>

<td class='side-body'>\n";

 

} else {

 

  echo "<table cellpadding='0' cellspacing='0' width='100%'>

<tr>

<td class='scapmain-right'>$title</td>

</tr>

<tr>

<td class='side-body-right'>\n";

}

}

 

function closeside() {

 

global $p_data;

 

if ($p_data['panel_side'] == 1) {

echo "</td>

</tr>

</table>\n";

tablebreak();

 

} else {

 

echo "</td>

</tr>

</table>\n";

tablebreak();

 

 

}

tablebreak();

 

}

?>



Parašė Mandello· 2011 Bal. 22 19:04:25
#9



Va kas atsitinka kai pakeiciu koda.

Parašė MaFetas· 2011 Bal. 22 19:04:59
#10

Tai jau žiūrėkis visus lygiavimus centravimus ir t.t.

Parašė Karolis· 2011 Bal. 22 19:04:38
#11

Keris parašė:


Va kas atsitinka kai pakeiciu koda.


"Nusivairuok" į reikiamą vietą.

Parašė Mandello· 2011 Bal. 22 19:04:46
#12

Reiks prašyt jaunėlio bet neatrašo, jis sukodavo dizainą tai turėtų žinot, nes aš nelabai kertu kode. ?|

Parašė Karolis· 2011 Bal. 22 19:04:18
#13

Keris parašė:
Reiks prašyt jaunėlio bet neatrašo, jis sukodavo dizainą tai turėtų žinot, nes aš nelabai kertu kode. ?|


Nesunku taigi ten skaičiukus pakeitelioti ir žiūrėtis, be to gi reikiamoje vietoje jis yra. Bent jau atsijungus žiūrint. Beje, geriau theme.php išimk iš čia, o tai sugalvos dar kas nusiripinti dizainą. :)

Redagavo Karolis· 2011 Bal. 22 19:04:11

Parašė Mandello· 2011 Bal. 22 19:04:13
#14

Tai aš atkeičiau kodą atgal. Skaičiukai skaičiukais geriau nekišiu pirštų, nes pridirbsiu.

Parašė 1dEo· 2011 Bal. 22 21:04:21
#15

css panaudok padding ir margin savybes ir ziurekis ;).

ten pavyzdziui

.reklama {margin-left: 20px; }

Taciau patarciau ten kode vietoj td naudoti div savybes ;).