Jump to content

simple php issue


verano

Recommended Posts

<script type="text/javascript">
/* <![CDATA[ */
var loadingTag = "{lang mkey='loading'}";
var modeRewrite = "{$config.enable_mod_rewrite}";
var docRoot = "{$smarty.const.DOC_ROOT}";
var alphanumeric_chars = "{lang mkey='alphanumeric'}";
var alphanum_chars = "{lang mkey='alphanum'}";
var text_chars = "{lang mkey='text'}";
var full_chars = "{lang mkey='full_chars'}";

{if $config.use_popups == 'N'}
var use_popups = false;
{else}
var use_popups = true;
{/if}
<!-- Begin: AdBrite -->
<script type="text/javascript">
   var AdBrite_Title_Color = '0000FF';
   var AdBrite_Text_Color = '000000';
   var AdBrite_Background_Color = 'FFFFFF';
   var AdBrite_Border_Color = 'CCCCCC';
   var AdBrite_URL_Color = '008000';
</script>
<span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=" type="text/javascript"></script><!--
--><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid="><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
<!-- End: AdBrite -->

 

 

 

How do i center this???

 

Thanks!

by the looks of it all your code is bunched together so the html comments are commenting out <center>

 

<script type="text/javascript">/* <![CDATA[ */var loadingTag = "Loading..";var modeRewrite = "N";var docRoot = "/";var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'";var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'";var use_popups = true;
<!-- Begin: AdBrite --><center><script type="text/javascript">var AdBrite_Title_Color = '0000FF';var AdBrite_Text_Color = '000000';var AdBrite_Background_Color = 'FFFFFF';var AdBrite_Border_Color = 'CCCCCC';var AdBrite_URL_Color = '008000';</script><span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!----><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span></center><!-- End: AdBrite -->

 

try spacing it out like this

 

<script type="text/javascript">
/* <![CDATA[ */
var loadingTag = "Loading..";
var modeRewrite = "N";
var docRoot = "/";
var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";
var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'";
var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'";
var use_popups = true;
<!-- Begin: AdBrite -->
<center><script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
</script><span style="white-space:nowrap;">
<script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script>
<!---->
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
</center>
<!-- End: AdBrite -->

by the looks of it all your code is bunched together so the html comments are commenting out <center>

 

<script type="text/javascript">/* <![CDATA[ */var loadingTag = "Loading..";var modeRewrite = "N";var docRoot = "/";var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'";var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'";var use_popups = true;
<!-- Begin: AdBrite --><center><script type="text/javascript">var AdBrite_Title_Color = '0000FF';var AdBrite_Text_Color = '000000';var AdBrite_Background_Color = 'FFFFFF';var AdBrite_Border_Color = 'CCCCCC';var AdBrite_URL_Color = '008000';</script><span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!----><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span></center><!-- End: AdBrite -->

 

try spacing it out like this

 

<script type="text/javascript">
/* <![CDATA[ */
var loadingTag = "Loading..";
var modeRewrite = "N";
var docRoot = "/";
var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";
var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'";
var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'";
var use_popups = true;
<!-- Begin: AdBrite -->
<center><script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
</script><span style="white-space:nowrap;">
<script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script>
<!---->
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
</center>
<!-- End: AdBrite -->

 

 

no luck

@nuttycoder: HTML comment have ending delimiters, they aren't "end of line" comments.

 

@verano:  Add this CSS style to it:

 

#adbrite {
   margin: 0 auto 0 auto;
}

 

You might have to play around with the top and bottom margins so it doesn't like, collapse.

@nuttycoder: HTML comment have ending delimiters, they aren't "end of line" comments.

 

@verano:  Add this CSS style to it:

 

#adbrite {
   margin: 0 auto 0 auto;
}

 

You might have to play around with the top and bottom margins so it doesn't like, collapse.

 

where at in the code?  sorry

ok so the external file is callled default css  in which i will put the coding for the CSS that you previously provided,

 

now as far as the code to put the other page

 

how do i do that?

 

somethign liek this?

 

<div id="adbrite">
<!--Adbrite Stuff Here  -->
<script type="text/javascript">
/* <![CDATA[ */
var loadingTag = "{lang mkey='loading'}";
var modeRewrite = "{$config.enable_mod_rewrite}";
var docRoot = "{$smarty.const.DOC_ROOT}";
var alphanumeric_chars = "{lang mkey='alphanumeric'}";
var alphanum_chars = "{lang mkey='alphanum'}";
var text_chars = "{lang mkey='text'}";
var full_chars = "{lang mkey='full_chars'}";

{if $config.use_popups == 'N'}
var use_popups = false;
{else}
var use_popups = true;
{/if}
<!-- Begin: AdBrite -->
<script type="text/javascript">
   var AdBrite_Title_Color = '0000FF';
   var AdBrite_Text_Color = '000000';
   var AdBrite_Background_Color = 'FFFFFF';
   var AdBrite_Border_Color = 'CCCCCC';
   var AdBrite_URL_Color = '008000';
</script>
<span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!--
--><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
<!-- End: AdBrite -->
</div>

for the stylesheet to be associated with yout html page the page needs to know where to find it you give the path via a link like

 

<link href="default.css" rel="stylesheet" type="text/css" />

 

if your stylesheet is in the root of your site this will work otherwise include the path to the stylesheet like

 

<link href="path to stylesheet default.css" rel="stylesheet" type="text/css" />
e.g <link href="style/default.css" rel="stylesheet" type="text/css" />

 

** EDIT ** Beat me to it lol

<!-- Begin: AdBrite -->
<script type="text/javascript">
   var AdBrite_Title_Color = '0000FF';
   var AdBrite_Text_Color = '000000';
   var AdBrite_Background_Color = 'FFFFFF';
   var AdBrite_Border_Color = 'CCCCCC';
   var AdBrite_URL_Color = '008000';
</script>
<span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!--
--><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
<!-- End: AdBrite -->
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2548612-6");
pageTracker._initData();
pageTracker._trackPageview();
</script>
{if $config.use_profilepopups == 'N'}
var use_profilepopups = false;
{else}
var use_profilepopups = true;
{/if}
/* ]]> */
</script>
<link href="{$css_path}default.css" rel="stylesheet" type="text/css" />

 

still nothing

your calling a var inside html needs to be inside php

 

yours:

 

<link href="{$css_path}default.css" rel="stylesheet" type="text/css" />

 

use

 

<link href="<?php echo $css_path;?>default.css" rel="stylesheet" type="text/css" />

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.