Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
Domainmaster
New Member
New Member


Joined: Feb 26, 2006
Posts: 4
Location: Michigan

PostPosted: Sun Feb 26, 2006 8:01 am Reply with quote

Hello all,
I linked to Raven awhile back but never got around to registering. I used the php code I think I found here or at the nuke site to put adsense in a nuke block. I just did one 486x60 with two ads on the front page center up, news module loaded in home page.
I would like to put the Google search the web bar in a block on my first page also. So far I have been unable to get it working. Shocked Google already gave me some problems about "modifying their code" which I had to explain needed to be done in order to use adsense in Php Nuke. I just used the standard code since I'm not a wizard yet Shocked Quite the opposite but trying to learn more about php, html, and nuke. After that no problems with Goog or Adsense. Even their Googlebot seems to like my Nuke site so far. Very Happy
I thought I remembered reading about only using one script per page somewhere. Is it okay to run more than one script per page, thus allowing multiple ads(within Google limits), Firefox button, and Google search on the same page. Or is their any easier way, I read about the "includes" for running ads in multiple places, but didn't see anything about implementing Google Search on the front page. Any ideas would be appreciated. Very nice site you have here btw. Cool

_________________
MichiganElectricians.org 
View user's profile Send private message Send e-mail Visit poster's website
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Sun Feb 26, 2006 9:07 am Reply with quote

Quote:
Google already gave me some problems about "modifying their code" which I had to explain needed to be done in order to use adsense in Php Nuke.



what did you have to alter? I had to alter nothing in my google code to use it in a block.

google has limits on how many google adds you can run each page. You should check with them on that before making too many changes.

as far as the google search is concerned. you can simply make a nuke block and place the code in there. Then impliment that block through your site admin. It is pretty basic. You need not alter any of the google code.

_________________
Themes BB Skins Only registered users can see links on this board! Get registered or login!
Graphic Tees Only registered users can see links on this board! Get registered or login!
Paranormal Tees Only registered users can see links on this board! Get registered or login!
Ghost Stories & More Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Domainmaster
PostPosted: Sun Feb 26, 2006 10:15 am Reply with quote

Yeah I thought it was pretty basic too until I tried to do it. I can make blocks with just html code and links, like image ads. The problem starts I think with Java and when the link has to fetch something like ads. But when I tried to put adsense in html mode of a new block it didn't work. Then after some research I found on Phpnuke.org the php code that has to be put in a file along with the Google code and then activated in the blocks section of admin. I didn't alter the Google code but I had to add php to make it work. I have a hosting reseller account at Hostgator for personal use, not sure what version of Nuke they are using. But according to the nuke website Sect 20.7, the php before the google code is this:
<php
if (eregi ("block-AdSense.php",$PHP_SELF)) {
Header ("Location: index.php");
die ();
}
?>
<script language="JavaScript">
<--
Then google adsense code

There is also some code after the google code but it can be found on phpnuke.org and I thought was standard. Your saying you can just put in adsense code, google search, or firefox button in a block without the php? That would be great. Do you do this from the admin section on the site of do you create block files on the server then activate them in the block section of admin?
I am pretty new at all this and appreciate any help you can provide. I have found the open source community a great bunch of people so far and appreciate all the help I have already found.
 
jaded
PostPosted: Sun Feb 26, 2006 11:58 am Reply with quote

no, I am saying. That you need to place the google code inside the php code for a block. You have to make the block in the blocks folder of your ftp and activate it in your blocks admin. You cannot add javascript to your blocks in your blocks admin the way that you do with html.

If you are having trouble with it use a block creator. There is one on my website under webmaster tools. I am not sure if Raven has one here on his site.
 
Domainmaster
PostPosted: Sun Feb 26, 2006 2:02 pm Reply with quote

Thanks for the quick reply and info. I will check out your site and the block creator. I think I have a handle on that now that I know to make the block file first then activate it. I tried the same php code that I use for adsense blocks but it doesn't seem to work for google search unless I did something wrong. Is it a different code or technique? I know about Google ad limits but when making blocks is it okay to have a couple google adsense blocks showing as long as I stay within their limits. Or I may try the includes route eventually. Thanks again.
 
semperaye
Worker
Worker


Joined: Oct 31, 2011
Posts: 100
Location: North Carolina

PostPosted: Thu Jun 14, 2012 9:54 am Reply with quote

Someone should make a youtube of how to do this im totally confused...
 
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6793
Location: Ha Noi, Viet Nam

PostPosted: Sun Jun 17, 2012 2:52 pm Reply with quote

I'm not suprised, since this topic is over 6 years old.
 
View user's profile Send private message Send e-mail
semperaye
PostPosted: Sun Jun 17, 2012 7:06 pm Reply with quote

Guardian2003 wrote:
I'm not suprised, since this topic is over 6 years old.


And still I cant seem to find out how its done Razz
 
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sun Jun 17, 2012 7:33 pm Reply with quote

What are you trying to accomplish? Are you trying to use google adsense in the Advertising module, trying to add it to a block, or trying to add a Google Search Bar, whatever that is?

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
semperaye
PostPosted: Mon Jun 18, 2012 6:05 am Reply with quote

nuken wrote:
What are you trying to accomplish? Are you trying to use google adsense in the Advertising module, trying to add it to a block, or trying to add a Google Search Bar, whatever that is?


Ya I'm trying to add it to a block...I click source then paste in the code but nothing appears.
 
nuken
PostPosted: Mon Jun 18, 2012 8:25 am Reply with quote

The editor is going to strip the javascript due to security concerns. The best way to do it would be to make a block or use the advertising module as a block. If you want to create a block and upload it to your blocks folder and activate it in your blocks admin, the code would look something like this:

Code:


<?php

if ( !defined('BLOCK_FILE') ) {
    Header('Location: ../index.php');
    die();
}

echo 'Adsense Code Here';

?>

You will need to make sure the adsense code does not use single quotes in it or you will get an error.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©