Problem whit ads

Status
Not open for further replies.

Bahrudin

New Member
Messages
23
Reaction score
0
Points
0
I can't install ads on PHP-Nuke I open header.php and when I enter ads my web dont work....
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (stristr(htmlentities($_SERVER['PHP_SELF']), "header.php")) {
Header("Location: index.php");
die();
}
define('NUKE_HEADER', true);
require_once("mainfile.php");
##################################################
# Include some common header for HTML generation #
##################################################

function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include_once("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>$sitename $pagetitle</title>\n";
include("includes/meta.php");
include("includes/javascript.php");
if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n";
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
if (file_exists("includes/custom_files/custom_head.php")) {
include_once("includes/custom_files/custom_head.php");
}
echo "\n\n\n</head>\n\n";
if (file_exists("includes/custom_files/custom_header.php")) {
include_once("includes/custom_files/custom_header.php");
}
themeheader();
}
online();
head();
include("includes/counter.php");
if(defined('HOME_FILE')) {
message_box();
blocks("Center");
}
?>

Were I must put ads
 

cetutnx1

New Member
Messages
510
Reaction score
0
Points
0
You sould put them here:

PHP:
<?php
/************************************************** **********************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************** **********************/
if (stristr(htmlentities($_SERVER['PHP_SELF']), "header.php")) {
Header("Location: index.php");
die();
}
define('NUKE_HEADER', true);
require_once("mainfile.php");
##################################################
# Include some common header for HTML generation #
##################################################

function head() {
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
$ThemeSel = get_theme();
include_once("themes/$ThemeSel/theme.php");
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
echo "<html>\n";
echo "<head>\n";
echo "<title>$sitename $pagetitle</title>\n";
include("includes/meta.php");
include("includes/javascript.php");
if (file_exists("themes/$ThemeSel/images/favicon.ico")) {
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
}
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n";
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n";
if (file_exists("includes/custom_files/custom_head.php")) {
include_once("includes/custom_files/custom_head.php");
}
echo "\n\n\n</head>\n\n";
?>
<!--
HERE!!!!
-->
<?php
if (file_exists("includes/custom_files/custom_header.php")) {
include_once("includes/custom_files/custom_header.php");
}
themeheader();
?>
<!--
OR HERE!!!!!
-->
<?php
}
online();
head();
include("includes/counter.php");
if(defined('HOME_FILE')) {
message_box();
blocks("Center");
}
?>

Edited: I forgot one thing delete <!-- and --> before you save changes on header.php
 
Last edited:

Bahrudin

New Member
Messages
23
Reaction score
0
Points
0
I still have problem :( my header.php is but ads dont show .. www.bahrudin.exofire.net look
PHP:
<?php 
/************************************************** **********************/ 
/* PHP-NUKE: Advanced Content Management System */ 
/* ============================================ */ 
/* */ 
/* Copyright (c) 2005 by Francisco Burzi */ 
/* http://phpnuke.org */ 
/* */ 
/* This program is free software. You can redistribute it and/or modify */ 
/* it under the terms of the GNU General Public License as published by */ 
/* the Free Software Foundation; either version 2 of the License. */ 
/************************************************** **********************/ 
if (stristr(htmlentities($_SERVER['PHP_SELF']), "header.php")) { 
Header("Location: index.php"); 
die(); 
} 
define('NUKE_HEADER', true); 
require_once("mainfile.php"); 
################################################## 
# Include some common header for HTML generation # 
################################################## 
function head() { 
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle; 
$ThemeSel = get_theme(); 
include_once("themes/$ThemeSel/theme.php"); 
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"; 
echo "<html>\n"; 
echo "<head>\n"; 
echo "<title>$sitename $pagetitle</title>\n"; 
include("includes/meta.php"); 
include("includes/javascript.php"); 
if (file_exists("themes/$ThemeSel/images/favicon.ico")) { 
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n"; 
} 
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n"; 
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n"; 
if (file_exists("includes/custom_files/custom_head.php")) { 
include_once("includes/custom_files/custom_head.php"); 
} 
echo "\n\n\n</head>\n\n"; 
?> 
<!-- 
<? include("http://staff.x10hosting.com/adCode.php?ad=corporate"); ?>--> 
<?php 
if (file_exists("includes/custom_files/custom_header.php")) { 
include_once("includes/custom_files/custom_header.php"); 
} 
themeheader(); 
?> 
<!-- 
<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://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:1&target=_blank");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&n=a7fb3e9d' border='0' alt=''></a></noscript>
--> 
<?php 
} 
online(); 
head(); 
include("includes/counter.php"); 
if(defined('HOME_FILE')) { 
message_box(); 
blocks("Center"); 
} 
?>
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
This is it: You forgot to remove the comment tags

PHP:
<?php 
/************************************************** **********************/ 
/* PHP-NUKE: Advanced Content Management System */ 
/* ============================================ */ 
/* */ 
/* Copyright (c) 2005 by Francisco Burzi */ 
/* http://phpnuke.org */ 
/* */ 
/* This program is free software. You can redistribute it and/or modify */ 
/* it under the terms of the GNU General Public License as published by */ 
/* the Free Software Foundation; either version 2 of the License. */ 
/************************************************** **********************/ 
if (stristr(htmlentities($_SERVER['PHP_SELF']), "header.php")) { 
Header("Location: index.php"); 
die(); 
} 
define('NUKE_HEADER', true); 
require_once("mainfile.php"); 
################################################## 
# Include some common header for HTML generation # 
################################################## 
function head() { 
global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle; 
$ThemeSel = get_theme(); 
include_once("themes/$ThemeSel/theme.php"); 
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"; 
echo "<html>\n"; 
echo "<head>\n"; 
echo "<title>$sitename $pagetitle</title>\n"; 
include("includes/meta.php"); 
include("includes/javascript.php"); 
if (file_exists("themes/$ThemeSel/images/favicon.ico")) { 
echo "<link REL=\"shortcut icon\" HREF=\"themes/$ThemeSel/images/favicon.ico\" TYPE=\"image/x-icon\">\n"; 
} 
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n"; 
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/$ThemeSel/style/style.css\" TYPE=\"text/css\">\n\n\n"; 
if (file_exists("includes/custom_files/custom_head.php")) { 
include_once("includes/custom_files/custom_head.php"); 
} 
echo "\n\n\n</head>\n\n"; 
?> 

<? include("http://staff.x10hosting.com/adCode.php?ad=corporate"); ?>
<?php 
if (file_exists("includes/custom_files/custom_header.php")) { 
include_once("includes/custom_files/custom_header.php"); 
} 
themeheader(); 
?> 
 
<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://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:1&target=_blank");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&n=a7fb3e9d' border='0' alt=''></a></noscript>

<?php 
} 
online(); 
head(); 
include("includes/counter.php"); 
if(defined('HOME_FILE')) { 
message_box(); 
blocks("Center"); 
} 
?>
 

ArNoX

Member
Messages
414
Reaction score
0
Points
16
Thanks for the info fedlerner..i am looking too a long time for help how insert ads in PHP-Nuke ;)
 

Fedlerner

Former Adm & Team Manager
Community Support
Messages
12,934
Reaction score
6
Points
38
I see you were able to put the ads in your website.
You can center the ad to look nicer by putting:
Code:
<div align="center">AD CODE HERE</div>

*Closed*
 
Status
Not open for further replies.
Top