Ad code in phpAdsNew

Status
Not open for further replies.

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
I'm planning on using phpAdsNew as my banner rotator. The only problem I have is how to insert the x10hosting ad code. I used to do it by protecting a directory, but I can't remember which it was. Where would I put the codes? Thanks!
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
So are you asking if you can put the x10 ads in a rotator????
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
No. The ads have to be shown on every page. How would I put the advance ad codes in the footer on that script?
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Go into the page and post the code at the bottom.

Also in the settings I think you can include one, check it out.
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
What page should I go into? I need to get the ads in the phpadsnew script. Do I have to manually add it to every file?
 

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
It should only be /admin/index.php because after that everything else is password protected, im not exactly sure though.
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
Try looking for a file like header.php and footer.php - they are usually files which will be displayed everywhere and thus will make sure your ad code displays. I've never used phpAdsNew though - these are generic instructions.
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
well phpAdsNew only generates the code, it's not a CMS or anything, btw, did you just write all of your pages or what CMS are you using or w/e?
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
I'm using Joomla and SMF.
For the index.php in phpadsnew, where would I insert the code and how. I don't understand php very well.

Code:
<?php // $Revision: 2.0.2.3 $

/************************************************************************/
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2006 by the phpAdsNew developers                  */
/* For more information visit: http://www.phpadsnew.com                 */
/*                                                                      */
/* 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.       */
/************************************************************************/



// Include required files
require ("config.php");


// Security check
phpAds_checkAccess(phpAds_Admin+phpAds_Client+phpAds_Affiliate);



/*********************************************************/
/* Main code                                             */
/*********************************************************/

if (phpAds_isUser(phpAds_Admin))
{
	Header("Location: ".$phpAds_config['url_prefix']."/admin/client-index.php");
	exit;
}

if (phpAds_isUser(phpAds_Client))
{
	Header("Location: ".$phpAds_config['url_prefix']."/admin/stats-client-history.php?clientid=".phpAds_getUserID());
	exit;
}

if (phpAds_isUser(phpAds_Affiliate))
{
	Header("Location: ".$phpAds_config['url_prefix']."/admin/stats-affiliate-zones.php?affiliateid=".phpAds_getUserID());
	exit;
}
?>
index.php
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
well, since phpAdsNew is password protected, and i assume only you are using it, the only page you really would need it on would be "admin/index.php" but obvioulsy, if you have other users as clients or whatnot, you'd need to put the ads on there too, for SMF, i know there is an ad mod that you can get, as for Joomla!, i'd just start looking for a header.php file or footer.php file
 
Last edited:

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
I have the ads in joomla and smf. I just need to get them in phpadsnew. Would it be okay to just password protect the directories?
 
Last edited:

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
that's what i was thinking, but that probably would not work because it would prevent you from viewing the output of the code on the pages that you put the phpAdsNew code on...
 

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
As long as I don't password protect the main directory I think it will work.
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
ya, i guess that's probably true, but if there are any pages in the main directory that a user can see, they'll need to see the ads
 
Status
Not open for further replies.
Top