Debt Consolidation - Reference And Education Articles - Debt Consolidation - Wordpress Theme - Wp themes

PDA

View Full Version : Can't Validate - Trying to set it up


yonnermark
Sep 8th 2004, 3:40 pm
I've created an account, created & uploaded the necessary files to my server. I've made sure the ad_network_ads.txt is set to CHMOD 777. My server is definately php friendly and is an up to date installation as far as I know. I've uploaded the .htaccess file.

However, my site will not validate and I don't see any ads appearing on my site's pages. If anyone can suggest where I might be going wrong, that would be great. If you PM me I will send you the url so you can check the files.

Thanks
Mark

digitalpoint
Sep 8th 2004, 3:46 pm
What's the URL?

joeychgo
Sep 8th 2004, 8:20 pm
same problem here

site in my sig


Screwing up my Archive (http://www.lincolnvscadillac.com/Lincoln-cadillac-archive/index.php)

digitalpoint
Sep 8th 2004, 8:32 pm
Not sure on that... but for whatever reason it's not being evaluated as PHP. Have you tried it on the default archive? (No idea on the modded one)

joeychgo
Sep 8th 2004, 8:36 pm
never mind, cause a database error on the site which through off all my users, including a deep crawl by google. other issues. forget it. Nothing personal........

yonnermark
Sep 9th 2004, 2:16 am
my url is:
www.smart-pianos.com

digitalpoint
Sep 9th 2004, 7:18 am
Everything looks like it's setup properly except for the part that includes the ad_network.php file. What's the exact PHP code you put in your page(s)?

yonnermark
Sep 9th 2004, 8:45 am
What's the exact PHP code you put in your page(s)?
I followed the setup instructions exactly. It didn't say anything about putting php code into my pages. I thought maybe the .htaccess file would insert it or something (!!)

So what do I do about that?
Do I have to convert all my .htm files to .php and then add some php code where I want the ads to appear?

The setup didn't really walk me through those stages :(

yonnermark
Sep 9th 2004, 8:49 am
here's the code contained within ad_network.php

<?php

$ad_file = 'ad_network_ads.txt';
for ($i = 0; $i <= 11; $i++) {
$p = substr ('../../../../../../../../../../', 0, $i * 3);
if (file_exists ($p . $ad_file)) {
$ad_file = $p . $ad_file;
break;
}
}

if (is_writable ($ad_file)) {
$ads = file_get_contents ($ad_file);
$ads = explode ('<ad_break>', $ads);

if (count ($ads) < 101 || $ads[0] + 3600 < time()) {
$ads[] = file_get_contents ('http://ads.digitalpoint.com/network.php?type=link');
$ads[0] = time();
if (count ($ads) > 101) unset ($ads[1]);
$file = fopen($ad_file, 'w');
fwrite ($file, implode ('<ad_break>', $ads));
fclose ($file);
$ad_network = end ($ads);
} else {
$ad_network = $ads[rand(1,count($ads))];
}
$ad_network .= '<!-- an-hl -->';
} else {
$ad_network = 'You must set the "ad_network_ads.txt" file to be writable.';
}
if (substr ($_SERVER['DOCUMENT_NAME'], -6) == '.shtml') {
ini_set ('zlib.output_compression', 0);
echo $ad_network;
}

?>

yonnermark
Sep 10th 2004, 1:00 am
A little help here people :)

yonnermark
Sep 10th 2004, 6:27 am
What code do I place into my html files?
Thanks
Mark

digitalpoint
Sep 10th 2004, 7:53 am
That's what I'm asking you... did you place the exact code in your files that is listed in the setup, or something else?

yonnermark
Sep 10th 2004, 9:33 am
I didn't put any code in my files because the setup didn't tell me to (as far as I could see). It told me to create a file ad_network.php and upload it to root directory but I don't remember being told to insert any code into my files.

I think the concept and principle of this network is great, don't get me wrong, I'm dieing to get on board but I do feel the setup could be more step-by-step.

thanks for the awesome service, I hope to onboard soon.

Regards,
Mark

digitalpoint
Sep 10th 2004, 9:51 am
What step did you get through in the setup instructions?

http://www.digitalpoint.com/tools/ad-network/setup.php?type=99

yonnermark
Sep 10th 2004, 10:14 am
I did step 1, 2 and 3
I skipped step 4 because it said "For a PHP based site..." and my site is not php based,
I skipped step 5 because it said "For a SHTML based site..." and my site is not shtml based

As a test I have just tried adding the following code to my site template but it still won't validate:
<!--#include virtual="/ad_network.php" -->

Feels like I'm nearly there now. What am I doing wrong?

digitalpoint
Sep 10th 2004, 10:38 am
If you did step 3, then you are PHP based, so do step 4. :)

yonnermark
Sep 11th 2004, 1:18 am
Awesome, I've just been validated.
Shawn, mate, those step-by-step instructions are not quite step-by-step imho :)
I'm very excited to be onboard the network.

So when do my ads start to show?
thanks
Mark

yonnermark
Sep 11th 2004, 2:13 am
Any idea why the ads aren't showing at the VERY bottom of this page:
http://www.bedroomtalent.com/guests/

thanks
Mark
p.s. bedroomtalent.com is 100% not adult

digitalpoint
Sep 11th 2004, 9:20 am
Hard to say... I see the site is already PHP, but for whatever reason that clip isn't be interpreted as PHP.

Is the code in a footer include file/template or something?

kepa
Sep 11th 2004, 12:34 pm
Also, check to see if the code was copied correctly. Your source code shows that it is missing the

echo $ad_network;

just before the closing
?>

yonnermark
Sep 11th 2004, 4:13 pm
Is the code in a footer include file/template or something?
The code is in a template.
It's strange because in the template the php code is complete but then when I view the output html file and then "view source code" the php code is incomplete. Strange !!!

digitalpoint
Sep 11th 2004, 9:22 pm
Is there any other PHP in the template?

yonnermark
Sep 12th 2004, 3:28 am
I'm sorry, I need to backtrack.
The ads are showing fine on my main pages at www.bedroomtalent.com
It is only on my PHP guestbook that the ads aren't showing up.

I've tried adding the code without the <?> tags but then it simply displays the php code unparsed.

Hope that helps you help me :)

digitalpoint
Sep 12th 2004, 9:02 am
You sure it's a PHP guestbook (or at least a PHP file you are adding it to)?

yonnermark
Sep 12th 2004, 2:56 pm
I think so.
The file I'm editing is called footer.php which is used to make up the whole of the page that you can see at www.bedroomtalent.com/guests

I appreciate your continued support with this Shawn

digitalpoint
Sep 12th 2004, 3:01 pm
To be honest, I'm not sure... without actually being able to see how your template system works it a bit hard to troubleshoot. :)

yonnermark
Sep 12th 2004, 3:52 pm
Can I PM you the password so you can go into the admin of my guestbook and view the files there? It's all laid out very simple.

Going to bed now but I'll pick up your reply tomorrow.

thanks again
Mark

digitalpoint
Sep 12th 2004, 4:25 pm
I would rather you didn't to be honest... I really don't want anyone's passwords. :)

yonnermark
Sep 13th 2004, 12:45 am
OK well I've just found out that the guestbook index page is indeed a php file. Here is the URL of the index page:

http://www.bedroomtalent.com/guests/index.php

So that's a PHP page right?
Does that help?

digitalpoint
Sep 13th 2004, 1:23 am
No, not really... not unless the code is in the index.php file.

yonnermark
Sep 13th 2004, 8:20 am
Well the footer.php code does make up part of the index.php page.
So..... any ideas for moving forward?

digitalpoint
Sep 13th 2004, 9:15 am
Sorry, I don't have any.

kepa
Sep 13th 2004, 8:47 pm
<?
ini_set ("include_path", ini_get ("include_path") . ':../:../../:../../../:../../../../');
include_once ('ad_network.php');
echo ;
?>
Well, the parsing is not happening. Your code is correct right? What version of php is you server running? Not to mention that (you probably know this already), but the php is missing, and the call after echo is missing.

digitalpoint
Sep 13th 2004, 9:41 pm
Well the fact that the variable is missing, makes me think the code itself is within a quote. For example an echo function. Variables will be evaluated within quotes, and everything else will be spit out literally.