1
Hotwire
PHPadsnew Code Insertion
  • 2004/6/27 1:18

  • Hotwire

  • Just popping in

  • Posts: 18

  • Since: 2004/6/10


I have 2 questions.

I created my own block, and called it advertisers. I then inserted the phpadsnew code. And i got a few problems. Here are my questions. I will post there code under them so you can see just what i did.

First one:
When I use the php insertion code it shows in the preview, but it wont work when i submit it to XOOPS. It wont even show the button. but the block title shows.

<table cellspacing="0">
<tr>
<td align=center id="mainmenu">
<!-- start module menu loop -->
<?php
if (@include(getenv('DOCUMENT_ROOT').'/banman/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:2', 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>
<!-- end module menu loop -->
</td>
</tr>
</table>

Second Question:
I then tried the java script insertion code. It worked, but i cant center the button on the block. here is my code.

<table cellspacing="0">
<tr>
<td align=center id="mainmenu">
<!-- start module menu loop -->
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.hercules-it.com/banman/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:2&block=1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referer)
document.write ("&referer=" + escape(document.referer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.hercules-it.com/banman/adclick.php?n=a733b878' target='_blank'><img src='http://www.hercules-it.com/banman/adview.php?what=zone:2&n=a733b878' border='0' alt=''></a></noscript>
<!-- end module menu loop -->
</td>
</tr>
</table>

If you can help me out at all that would be great.

Thanks.

2
jctsup1
Re: PHPadsnew Code Insertion
  • 2004/6/27 2:01

  • jctsup1

  • Not too shy to talk

  • Posts: 146

  • Since: 2002/5/23


Can't answer the 1st part of your question but you can use the DIV tag to center your button in the block

<div align=center>
Your Code
</div>

Please let me know how this goes as I am very intereted in this module.


3
Hotwire
Re: PHPadsnew Code Insertion
  • 2004/6/27 2:29

  • Hotwire

  • Just popping in

  • Posts: 18

  • Since: 2004/6/10


Thanks but it didnt work. The button still shows up with the java script, but its not centered at all. Ill try to play around with it, but im not too sure why its doing that.

4
evylrat
Re: PHPadsnew Code Insertion
  • 2004/7/3 11:09

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


It works on mine. Using Javascript for the Banner. Tried the IFrame option, which requires modding the THEME.HTML. Also tried putting the Javascript straight into THEME.HTML, all work!

<div align="center">
<
script language='JavaScript' type='text/javascript'>
<!--
   if (!
document.phpAds_useddocument.phpAds_used ',';
   
phpAds_random = new String (Math.random()); phpAds_random phpAds_random.substring(2,11);
   
   
document.write ("<" "script language='JavaScript' type='text/javascript' src='");
   
document.write ("http://ads.cheshair.homedns.org/adjs.php?n=" phpAds_random);
   
document.write ("&what=zone:5");
   
document.write ("&exclude=" document.phpAds_used);
   if (
document.referer)
      
document.write ("&referer=" escape(document.referer));
   
document.write ("'><" "/script>");
//-->
</script><noscript><a href='http://ads.cheshair.homedns.org/adclick.php?n=ab9d9926' target='_blank'>
<
img src='http://ads.cheshair.homedns.org/adview.php?what=zone:5&n=ab9d9926' border='0' alt=''></a></noscript>
<
BR>
Please support this website by visiting our affiliates</div>


Here is my block on www.cheshair.com for the banner.

Login

Who's Online

175 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 175


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits