Main Menu
Quick Links
Other Options
Information
NukeForums
Top10 Links
Site Visitors
Membership:
Latest: GiLli
Today: 2
Yesterday: 1
Overall: 15104
Visitation:
Guests: 506
Members: 1
Total: 507
You are Anonymous user. You can register for free by clicking here
Sponsor Links
NukeResources :: View topic - Help with block
Help with block
Posted: Sun Aug 20, 2006 9:34 am
Astroman
Resourceful
Joined: Apr 01, 2005
Posts: 71
I'm trying to make a block for some php ad script but I think I'm being a total spaz or something, I've tried all kinds of variations of this:
I'm trying to make a block for some php ad script but I think I'm being a total spaz or something, I've tried all kinds of variations of this:
<?php
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
ob_start();
include ("textLinkAds.php");
$tla_ads = ob_get_contents();
ob_end_clean();
$content = "<table border=1 bordercolor=#008040 cellpadding=5>";
$content .= "<tr><td align=center>";
$content .= $display1;
$content .= "</a></td></tr>";
$content .= "</table>";
?>
And I have this in a file called textLinkAds.php in my root folder:
Forums wont let me post the code...
http://www.terrypratchettbooks.org/texlinkads.txt
I just can't get it to work but I'm sure it's very simple. I read lots of other threads about it that were linked to in the php section but, like I said, I'm a bit of a spaz with this.
I just can't get it to work but I'm sure it's very simple. I read lots of other threads about it that were linked to in the php section but, like I said, I'm a bit of a spaz with this.
Posted: Thu Aug 24, 2006 1:51 pm
Evaders99
Resource Master
Joined: May 25, 2004
Posts: 1785
Well your file output is going to $tla_ads, but the block output wants to read $display1
Posted: Mon Aug 28, 2006 11:28 am
Astroman
Resourceful
Joined: Apr 01, 2005
Posts: 71
Sorry I don't really know what you mean, could you type it here for me, altering the code I posted?
Posted: Mon Aug 28, 2006 12:49 pm
Evaders99
Resource Master
Joined: May 25, 2004
Posts: 1785
I'm saying its reading the block input into $tla_ads
However the output is looking for the variable $display1
Posted: Mon Aug 28, 2006 1:29 pm
Astroman
Resourceful
Joined: Apr 01, 2005
Posts: 71
I still don't understand it though, I tried different ways of writing it but I don't really know what I'm doing _ i just copied thye code from other threads and tired to guess what goes where, without understanding what any of it means.
Posted: Mon Sep 11, 2006 12:30 pm
Dove
Resourceful
Joined: Mar 17, 2004
Posts: 140
Location: USA
Try replacing where it says:
Code: $content .= $display1;
to:
Code: $content .= $tla_ads;
and place your textLinkAds.php in your blocks folder
Posted: Mon Sep 11, 2006 2:07 pm
Astroman
Resourceful
Joined: Apr 01, 2005
Posts: 71
Thanks, I'm sure I tired that but it seems to work. It seems to work with the textlinkads.php in the root though, not in the blocks folder.
NukeResources Forum Index -> Random Thoughts
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All times are GMT - 4 Hours
Page 1 of 1
Powered by phpBB © 2001-2005 phpBB Group. Theme created by Vjacheslav Trushkin . There have been 132 unique hit(s) in the past 24 hours.
:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::