PDA

View Full Version : In Need of Help


SeoGuy
November 25th, 2004, 23:28
:D I need somebody who can help me setup MaxAd with my VBulletin forum..I am not quiet sure how to present the Php code.. or where/how to place it.. Any help is very highly appreciated.


[syntax:c5128676da="php"]<?php
if (@include(getenv('DOCUMENT_ROOT').'/maxad/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_local ('', 0, 0, 0, '', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>[/syntax:c5128676da]

This is what maxad generates as the code to place on your website i believe.


Thanks

SeoGuy

Jamie
November 26th, 2004, 10:05
Could you explain to me what MaxAd is, at the moment I'm unsure of what it does therefore cannot help.

websterworld
November 26th, 2004, 12:32
I googled it and this is what I found:
http://max.awarez.net/articles.php?frmArticleID=2&staticId=1

SeoGuy is this a banner/ads script?
You need to have an area the size of the ads you want to push free in the area you want to place them. For example, the header.

Then you just copy paste that code there.
There should be a detailed manual for this. ;)


Eugene

Pauly
November 26th, 2004, 13:10
I've been reading up on this since you originally asked me, and it seems the best way to do this is to make a new file called ads.php(or whatever you want to call it) and insert your code above into that file and upload to your main directory with the forum files (index.php etc.).

Then use the code below in the phpinclude_start template;

[syntax:4ea750de1b="php"]ob_start();
require("ads.php");
$myads = ob_get_contents();
ob_end_clean();
[/syntax:4ea750de1b]

Then you would place $myads in the template (the header template I believe) where you want the ads to show :)

SeoGuy
November 26th, 2004, 19:53
I did what you said Paul, im afraid no luck

Pauly
November 27th, 2004, 04:05
This should work, did MAxAd give you anything else to include / do?

SeoGuy
November 28th, 2004, 18:58
Nope.. All i had i uploaded...

Pauly
November 28th, 2004, 20:38
I think you must of placed it into the wrong template or something, because it worked on my site (different .php page but same way). Has Matt had a look at it?

SeoGuy
November 29th, 2004, 00:09
Matt tried his best... No luck

Pauly
November 29th, 2004, 00:11
I'll talk him through it if he asks me about it :)

SeoGuy
November 29th, 2004, 18:47
Hey I installed now phpadsnew... What happens now is the banner appears way to centered.. and near to my logo.. Very weird.. and i cant get it to the right position where its ment to be at,

the_pm
November 29th, 2004, 18:50
Ok, that a good start. Can you post a link to the page in question? It seems from here it shouldn't be too hard to help you position the banner properly.

SeoGuy
November 29th, 2004, 20:43
Well i have temporarly Taken the banners offline.. Due to that i dont really want my members to be viewing a banner way out of place over-riding my initial logo. If you have any sort of IM i would love to talk to you, and maybe you could help me out ;-)

the_pm
November 29th, 2004, 21:14
Can you post them to a test page, or can they only be administered on the live page? Can you make a copy of the page and insert a spacer image in the place of the banner? We could work from that.

If none of these are options, just send me a PM :)

SeoGuy
November 30th, 2004, 19:27
Take a look now www.httppoint.com it is up there and active just that not alligned properly.. how do i go about that

the_pm
November 30th, 2004, 19:51
Ok, how are you trying to align it? Here's the code I'm seeing, and here's how I would alter it to make it work:

[syntax:107a8a9758="html"]<td align="left" valign="bottom" style="background-color: #FFFFFF;"><div align="center"><a href="index.php?"><img src="images/misc/httppoint_logo.gif" border="0" alt="HTTPPoint Web Talk" style="float: left;" /></a>

<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.httppoint.com/ads/ads2/ads2/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1&target=_blank");
document.write ("&exclude=" + document.phpAds_used);
if (document.referer)
document.write ("&referer=" + escape(document.referer));
document.write ("'><" + "/script>");

</script>
<noscript>
<a href="http://www.httppoint.com/ads/ads2/ads2/adclick.php?n=ae39d582" target="_blank"><img src="http://www.httppoint.com/ads/ads2/ads2/adview.php?what=zone:1&n=ae39d582" alt="" border="0" style="float: right;"></a>
</noscript>
</div></td>[/syntax:107a8a9758]

Considering you're already using tables, I'm wondering why you don't just place the logo and the banner in separate cells and use your normal HTML table cell attributes to position everything (for the banner, valign="middle" align="right"). That seems like it would do the job. But if you want to keep them both in the same cell, you'll need to float the logo on the outside of the div, apply text-align:right to the div containing the banner, and pad it appropriately to push it off the top of the cell. here's a quick example I mocked up: http://www.plhmedia.com/ex/httppoint/

The min-width statement is not recognized by IE, because IE is retarded, but there are other mechanisms you can use to force minimum width if need be. If this is an issue and you can't get past it, just ask!