LiveZilla Live Help
 


Go Back   Chime Host - Web Hosting Forum > Web Hosting Section > Knowledge Base > Tutorials
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Tutorials Contribute only full How-To\'s and Tutorials here. Submit Tutorials, Guides and Hints. ALL TUTORIALS ARE MODERATED AND YOUR TUTORIAL WILL *NOT* BE *VISIBLE* UNTIL IT IS ACCEPTED.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2006, 10:30 PM
Junior Member
 
Join Date: Jan 2006
tvale is on a distinguished road
Default How To Add Ad Code To PHPNUKE Made Easy

Dear John.

I now know a much easier way to add the ad code to PHPNUKE sites.

1) in includes/custom_files/

Create a file called custom_header.php

In there place this code

PHP Code:
<?php
if (eregi("block-AdSense.php",$PHP_SELF)) {
  
Header("Location: index.php");
  die();
}
?>

<script language='JavaScript' type='text/javascript' src='http://ads2.psychz.net/adx.js'></script>
<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://ads2.psychz.net/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:8");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://ads2.psychz.net/adclick.php?n=a477094b' target='_blank'><img src='http://ads2.psychz.net/adview.php?what=zone:8&amp;n=a477094b' border='0' alt=''></a></noscript>

<?php
$content 
.= "<center><script language=\"JavaScript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">"
;
$content .= "</script></center>";
?>
Save and upload to includes/custom_files/

2) Footer ad

go to http://yournukesite.com/admin.php?op=Configure

go down to footer message and add
PHP Code:
Free Webhosting By <a href="http://www.profusehost.net" target="_blank">Profusehost.net</a
And that is it, this will place the ads at the top of every page on the PHPNUKE site as the header.php checks for a custom header and places it at the very top of the page and the footer message at the bottom of every page. To view a samlpe go to http://www.tvale.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-23-2006, 05:06 PM
Junior Member
 
Join Date: Jan 2006
tvale is on a distinguished road
Default

This now works, i find this easier has you dont have to add it to every module, or every theme. just one file needs to be created. Hope this helps a few people
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-25-2006, 12:06 AM
Administrator
 
Join Date: Sep 2005
John has disabled reputation
Default

thank you, i'll move this to tutorial section. :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-02-2007, 09:44 AM
Junior Member
 
Join Date: Jan 2006
tvale is on a distinguished road
Default New Way

You all should need to do is upload these to files to includes/custom_files/

thats it

*please do not that this was tested on PHP-NUKE Platinum 7.6 b 4 v 2

I would be very greatful if some was to tell me if it was working on my site as i have tried to disable ad blocking but it still doesnt show but i added a extra banner of my own to see if that worked the site is www.tvale.co.uk and just leave a message in the shout box please.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-05-2007, 06:00 PM
Administrator
 
Join Date: Sep 2005
John has disabled reputation
Default

I just visited your site and only saw ads in the header. The ad column on the right hand side is empty and is not displaying any ads. Php nuke is very hard to work with when it comes to embedding any extra code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-06-2007, 10:16 PM
Junior Member
 
Join Date: Jan 2006
tvale is on a distinguished road
Default

hi john it should now be fixed and showing ads on the top right hand side.

if this is true i would like to post a new thread saying how to do it containing the correct files but for a reason unknown to me i cant create new threads.

also just to clear up the ad rule as i think i was still under the old ad rule

Does the ads have to be displayed in the header only or the header and right/left side. and is it still Free webhosting provided by profusehost.net in the footer or the new ad code for the footer.

If this is the cass for the footer i will need a few more days to find a easy way to add the ad code in.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-14-2007, 04:41 AM
Junior Member
 
Join Date: Oct 2007
MoonShops is on a distinguished road
Default

These solutions posted here would not work for me so I just placed the javascript code in the advertising banner section and the free hosting link in the footer. It works just fine in the left advertising block I made just for profusehost.

I hope the footer is okay as I couldn't figure out how to put the javascript in the footer but could put the clickable link just fine.

If John approves the footer part I hope my solution helps someone.

moonshops.profusehost.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a video from html to wmv? unknown HTML/CSS/DHTML 2 02-13-2010 04:47 PM
Drupal menu settings are inactive? ..::Mr A::.. Programming / Scripting / Coding Forum 0 01-24-2010 04:40 AM
If PHP code redirects users to another page by echoing javascript, does the... RegNatarajan PHP 1 01-15-2010 12:08 PM
I forgot my wi-fi password? stephany Networking, Internet Access, Wireless, Mobile, Wi-Fi 2 01-07-2010 03:50 AM


All times are GMT +1. The time now is 09:24 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ChimeHost, a Profuse Solutions LLC company