Home User CP Browse Members Calendar Register Today!  
Get New posts Faq / Help?
   

Not A Member Yet? Register today and become part of the community.

Go Back   Profuse Host Forum > Hosting Section > Knowledge Base > Tutorials

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, 03:30 PM
tvale
Status: Offline
Member
 
Join Date: Jan 2006
Posts: 12
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",)) {
  
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
 
.= "<center><script language=\"JavaScript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">"
;
 .= "</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
__________________
TVALE.TK Administrator

http://www.tvale.tk

http://www.tvale.co.nr

Last edited by tvale : 05-25-2006 at 09:52 AM. Reason: Script didnt work, but with this it does.
Reply With Quote

  #2 (permalink)  
Old 05-23-2006, 10:06 AM
tvale
Status: Offline
Member
 
Join Date: Jan 2006
Posts: 12
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
__________________
TVALE.TK Administrator

http://www.tvale.tk

http://www.tvale.co.nr

Last edited by tvale : 05-23-2006 at 11:36 AM.
Reply With Quote

  #3 (permalink)  
Old 05-24-2006, 05:06 PM
John
Status: Offline
Administrator
 
Join Date: Sep 2005
Posts: 439
John has disabled reputation
Default

thank you, i'll move this to tutorial section. :-)
Reply With Quote

  #4 (permalink)  
Old 09-02-2007, 02:44 AM
tvale
Status: Offline
Member
 
Join Date: Jan 2006
Posts: 12
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.
Attached Files
File Type: php adcode.php (1.0 KB, 118 views)
File Type: php custom_header.php (2.2 KB, 29 views)
__________________
TVALE.TK Administrator

http://www.tvale.tk

http://www.tvale.co.nr
Reply With Quote

  #5 (permalink)  
Old 09-05-2007, 11:00 AM
John
Status: Offline
Administrator
 
Join Date: Sep 2005
Posts: 439
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.
Reply With Quote

  #6 (permalink)  
Old 09-06-2007, 03:16 PM
tvale
Status: Offline
Member
 
Join Date: Jan 2006
Posts: 12
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.
__________________
TVALE.TK Administrator

http://www.tvale.tk

http://www.tvale.co.nr
Reply With Quote

  #7 (permalink)  
Old 10-13-2007, 09:41 PM
MoonShops
Status: Offline
Junior Member
 
Join Date: Oct 2007
Posts: 5
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
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
getting a new fone? easy best answer!? hunbun General Mobile Phone Discussion 2 07-21-2008 09:38 AM
made a mistake and have a request rabidxero Free Web Hosting Support 2 06-19-2008 01:30 PM
Easy and fast ad code in PHPNUKE (all versions) caki Tutorials 0 12-29-2007 05:37 AM
Google Checkout, easy for... Bobo K Google 2 07-14-2007 02:54 PM
Ads code problems with PHPNuke EAGarcia Free Web Hosting Support 4 04-03-2007 08:23 PM


All times are GMT -7. The time now is 07:45 PM.

Skin Design By vBSkinworks



Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Sponsored by Web Hosting


Profuse Solutions LLC

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80