install ads on php_nuke

Xempttt

New Member
Messages
830
Reaction score
0
Points
0
heres how it goes since so many have trouble with it( i know i did).

1. go to cpanel.
2. go to file manager
3. click on the folder icon public_html
4. go to ur nuke folder(whatever u called the sub to it)
5. go to themes
6. click on the theme that u have for u site right now.
7. click on theme.php
8. look to the upper right and click edit file
9. open the folder of the ads that u download the code zip file in the support forum and find ur way to ad code.
10. copy the code according to the hosting u have. just the <script language to </noscript
11. go back to ur cpanel page and then paste the code directly above all the code.
*12. make sure there are no left over spaces like blank lines between the code for this will give errors. now ur done

there u go. my first tut. hope it helped u.

maybe u should sticky this. its very good tut and alot of people will ask how to. just a suggestion.
 

Tyler

Retired Staff
Messages
8,564
Reaction score
0
Points
0
I wonder who taught you all that in the first place, LoL
 

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
Very nice tutorial ....if you want the ad centered you can always put center tags around it

<center> </center>

not trying to ad to your tut just throwin this out there :)
 

Xempttt

New Member
Messages
830
Reaction score
0
Points
0
oh yeah i forgot that center code. and i would like to thank tyler for his help for teaching me the ways of file manager.
 

repusmod

New Member
Messages
502
Reaction score
0
Points
0
You have to put it in "header.php" and the add will apear on all pages you have and that people can see..


1-Go in your cpanel / http://yoursite.x10hosting.com/cpanel

2-Next click on "File Manager"
3-After that click on "www" forum (If you edit something in 'www' folder it will be also in 'public_ftp'
4-Now look for file called "header.php"
5-And to finish it is time to add the AD code in 'header.php
6-Copy the AD code and add it where you want by following bottom instructions

**The AD code has to be between phpnuke tags that mean, between "<?php" and "?>".**

Examples:
Site with AD on top

Site with AD in middle

AD Code
Code:
echo "<center><script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'> </script>\n"; echo "<script language='JavaScript' type='text/javascript'>\n"; echo "<!--\n"; echo "if (!document.phpAds_used) document.phpAds_used = ',';\n"; echo "phpAds_random = new String (Math.random());\n"; echo "phpAds_random = phpAds_random.substring(2,11);\n"; echo "document.write (\"<\" + \"script language='JavaScript' type='text/javascript' src='\");\n"; echo "document.write (\"http://x10hosting.com/advert/adjs.php?n=\" + phpAds_random);\n"; echo "document.write (\"&amp;what=zone:1&amp;target=_blank\");\n"; echo "document.write (\"&amp;exclude=\" + document.phpAds_used);\n"; echo "if (document.referrer)\n"; echo "document.write (\"&amp;referer=\" + escape(document.referrer));\n"; echo "document.write (\"'><\" + \"/script>\");\n"; echo "//-->\n"; echo "</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&amp;n=a7fb3e9d' border='0' alt=''></a> </noscript></center>\n";

AD on top of your site

Top part of "header.php" without AD
Code:
<?php

/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 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 (eregi("header.php", $_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}
require_once("mainfile.php");

##################################################
# Include some common header for HTML generation #
##################################################

Top part of "header.php" with AD
Code:
<?php
echo "<center><script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'> </script>\n"; echo "<script language='JavaScript' type='text/javascript'>\n"; echo "<!--\n"; echo "if (!document.phpAds_used) document.phpAds_used = ',';\n"; echo "phpAds_random = new String (Math.random());\n"; echo "phpAds_random = phpAds_random.substring(2,11);\n"; echo "document.write (\"<\" + \"script language='JavaScript' type='text/javascript' src='\");\n"; echo "document.write (\"http://x10hosting.com/advert/adjs.php?n=\" + phpAds_random);\n"; echo "document.write (\"&amp;what=zone:1&amp;target=_blank\");\n"; echo "document.write (\"&amp;exclude=\" + document.phpAds_used);\n"; echo "if (document.referrer)\n"; echo "document.write (\"&amp;referer=\" + escape(document.referrer));\n"; echo "document.write (\"'><\" + \"/script>\");\n"; echo "//-->\n"; echo "</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&amp;n=a7fb3e9d' border='0' alt=''></a> </noscript></center>\n";
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System                         */
/* ============================================                         */
/*                                                                      */
/* Copyright (c) 2002 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 (eregi("header.php", $_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}
require_once("mainfile.php");

##################################################
# Include some common header for HTML generation #
##################################################

AD in middle of your site, or over content block

Bottom part of "header.php" without AD
Code:
online();
head();
include("includes/counter.php");
global $home;
if ($home == 1) {
    message_box();
    blocks(Center);
}

?>

Bottom part of "header.php" with AD
Code:
online();
head();
include("includes/counter.php");
global $home;
if ($home == 1) {
    message_box();
    blocks(Center);
}
echo "<center><script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'> </script>\n"; echo "<script language='JavaScript' type='text/javascript'>\n"; echo "<!--\n"; echo "if (!document.phpAds_used) document.phpAds_used = ',';\n"; echo "phpAds_random = new String (Math.random());\n"; echo "phpAds_random = phpAds_random.substring(2,11);\n"; echo "document.write (\"<\" + \"script language='JavaScript' type='text/javascript' src='\");\n"; echo "document.write (\"http://x10hosting.com/advert/adjs.php?n=\" + phpAds_random);\n"; echo "document.write (\"&amp;what=zone:1&amp;target=_blank\");\n"; echo "document.write (\"&amp;exclude=\" + document.phpAds_used);\n"; echo "if (document.referrer)\n"; echo "document.write (\"&amp;referer=\" + escape(document.referrer));\n"; echo "document.write (\"'><\" + \"/script>\");\n"; echo "//-->\n"; echo "</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&amp;n=a7fb3e9d' border='0' alt=''></a> </noscript></center>\n";
?>


That is how you have to do... Good Luck.. This is my tutorial for how to add AD in PHP-Nuke
 

Xempttt

New Member
Messages
830
Reaction score
0
Points
0
hey repus. man. this was my first try but thanks for the suuggestions.
 

repusmod

New Member
Messages
502
Reaction score
0
Points
0
No problem, just wanted to tell that if you put the ad at the wrong place you'll screw your website..
 

oab

New Member
Messages
918
Reaction score
0
Points
0
umm guys, guys, guys, there is an easy solution to this, and you dont have to do it with all of your themes!! Just go to (your phpnuke root dir)/includes/my_header.php and place the code in the file and your done and it appears on all your pages!

you can see an example here, http://oab.x10hosting.com/phpnuke/ , but the server is always so slow you can probably just do it faster than it will take the page to load....

(you can also put the <center> tags around it)
 

bigguy

Retired
Messages
10,984
Reaction score
10
Points
38
I would imagine the server is slow because they are upgrading the php version they have
 

Aswin

New Member
Messages
12
Reaction score
0
Points
0
wow man cool i did as u told and it just did work!!! thx a lot :)
 
Top