Has anyone been successfully integrating phpAdsNew & Drupal?
Please I need help integrating phpAdsNew & Drupal

Comments

ericg’s picture

I am in the middle of setting up two drupal sites using phpAdsNew.

it seems rather simple.

set up your "zones" in phpAdsNew, and copy the display code it generates for those zones to a block in drupal and set that block to show up where you want it.

what issues are you having getting it all working?

Gman’s picture

Yes, this is exactly how I did it on a testbed I have. It was rather straight foward, more so than I thought it would be.

I am trying to figure out it there is a better way to do this than just giving PHP writes to my admin. I want them to be able to use the phpAdsNew invocation codes, but I am nervous about giving them PHP writing abilities (since it is sitewide).

Have you thought about this concern, or found a better way to tackle it?

-Gman

ericg’s picture

I'm not giving the site admins access to the php code input filter. It works with the full html filter and for the site I'm working on they needed to have access to already.

I'm thinking that you could create a new input filter with a limited set of tags (including the script tag) if you wanted to control things a bit more.

you could also go as far as to modify things in the template layer and only show the options on blocks that have a certain term in their title. this would only show the extra input types for certain blocks for certain user roles.

Gman’s picture

Ahh, you are using the Remote Innvocation with JavaScript. I was just using the local innvocation, which outputs PHP.

Will those settings work for visitors who do not have Java enables browsers?

But I must admit that is easier than worrying about giving out PHP permissions.

Thanks
-Gman

ericg’s picture

I thought about using the local innvocation but went for remote for security and organizational process issues. As you point out in your earlier question, it is a bit scarry to give inexperienced site admins php permissions.

I discussed it with my client, and they don't care if ads are only shown to those with javascript enabled. In fact this will keep googlebot and other such spiders from creating false impressions/display of ads and will be more fair for those paying for advertising.

robertoguzman’s picture

there is already an integration with joomla, it has 2 modules, one is for the pop ups banners, the other is for the regular banners, they work w/o any problem when the phpAdsNew is in the same hosting
I have working phpAdsNew with joomla like that.
If anyone would like to download it, this is the link http://mamboxchange.com/frs/?group_id=629&release_id=2761
this is the code for the poups in joomal

/**
* @version $Id: mod_phpads_raw.php,v 1.1 2004/11/11 20:18:02 Messenlien $
* @package Mambo_4.5.1
* @copyright (C) 2000 - 2004 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$invocationcode =  $params->get( 'invocationcode' );
echo $invocationcode;

here is the code for the other one in joomla

/**
* @version $Id: mod_phpads.php,v 1.1 2004/11/11 20:18:02 Messenlien $
* @package Mambo_4.5.1
* @copyright (C) 2000 - 2004 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

$placement =  $params->get( 'placement' );
$zone =  $params->get( 'zone' );
$serverroot =  $params->get( 'serverroot' );
$target =  $params->get( 'target' );
$prestype = $params->get( 'prestype' );
$textbelow = $params->get( 'textbelow' );
$bannersource = $params->get( 'bannersource' );
$bannerselect = $params->get( 'bannerselect' );
echo '<div align="'. $placement .'"> ';
    if (@include(getenv('DOCUMENT_ROOT').$serverroot.'/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        if ($prestype=='1')
		$phpAds_raw = view_raw ('zone:'.$zone.'', 0, ''.$target.'', ''.$bannersource.'', $textbelow,$phpAds_context);
		if ($prestype=='2')
		$phpAds_raw = view_raw (''.$bannerselect.'', ''.$zone.'', ''.$target.'', ''.$bannersource.'', $textbelow, $phpAds_context);
      	echo $phpAds_raw['html'];
    }
echo "</div>\n";

i xpect this code can help anyone to integrate phpAdsNew with drupal

Thank you

ericg’s picture

phpAdsNew provides nice and simple ways of generating different zones that you can then get different display code for and then put that in drupal blocks.

This keeps it clean and clear to me and the client what system is doing what. I like there being two systems that I can have them interact with differently.

Not everthing has to be, or should be fully "integrated" with the CMS (from a workflow, security or ease of maintaining/upgrading code perspective).

I'm not sure what use a phpAdsNew drupal integration module would be, other than to add in yet another potential spot for bugs and security holes.

Making two distinct and differently maintianed codebases interact can be tricky. In my opinion they work well enough together when they are separate.

Gman’s picture

I completely agree. There is no real need to integrate them.

A very few number of drupal users should even be allowed near the ad server, so there is no general need to integrate the users, and since blocks already exist (and the ad codes can easily be placed in the theming templates as well), all the needed drupal hooks already exist.

With the new 4.7 zones, you can get banners and text ads to display just about anywhere that you want; in between the node and its comments, floating next to the content on the top, dual colums on the right.....

I just wish there was a way to place a block between the teaser and the rest of the node (but I think you need to hack the node.module to do that).

-Gman

icebullet’s picture

anyone knowhow to get my phpadsnew codes to popup on the vbdrupal

if i make a block and stick in my invocation code, nothing appears, if i edit
the VBDRUPAL template with a regular html it works, but if i try to invocate it via javascript it doesnt work, i cant invoke it any other method so any assistance will be greatly appreciated!
Edit/Delete Message

Gman’s picture

If you are using the Remote Invocation with Javascript, then you need to choose the Full HTML filter when you create the block. If you are using the remote invocation, then you need the PHP Code filter.

I have not tried popups, but I would think that they need to be placed the template files (since the popup is not displaying inside the block).

I have vbdrupal also installed and regular text and banner ads work perfectly. -Gman

cookiesunshinex’s picture

When I generate my invocation code, I use Remote invocation with javascript, and full HTML but I get a

Forbidden
You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

when I click submit.

Any idea why this might be happening?

alganesh’s picture

Phpadsnew and Drupal should be integrated in such a way that there is an interface providing precise targeting based on parameters like age, gender etc.

This option is not available in the native openads s/w. I wish Drupal developers can note this.