DISCUSSION: How to use phpAdsNew with Joomla!

Discuss the FAQ's here, and get in touch with the FAQ Team.
Pixelate
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Sun Oct 16, 2005 12:34 am

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by Pixelate » Fri Feb 16, 2007 3:52 am

I've installed phpAdsNew and joomla on same server in separate folders.
I followed the instructions provided here

Code: Select all

http://forum.joomla.org/index.php/topic,37225.0/wap2.html


This is invocation code that I inserted in the Advert no1 ( or the  kl_evalphp module  copy )

Code: Select all

<?php
    if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
        echo $phpAds_raw['html'];
    }
?>
I'm getting a parsing error on the published page.

Code: Select all

Parse error: parse error, unexpected $, expecting T_VARIABLE or '$' in /home/developd1234/public_html/jcms2/mambots/content/kl_php.php(65) : eval()'d code on line 1
I'm wondering

footstep
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jul 20, 2006 4:55 am

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by footstep » Sun Mar 04, 2007 9:58 am

Remove the PHP tags, so that all which shows in the text box is this:

if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
        echo $phpAds_raw['html'];
    }

AhmedLFC
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Tue Jun 13, 2006 1:59 pm

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by AhmedLFC » Thu May 31, 2007 1:29 am

Hi,

I am trying to use the solution you have mentioned with regards to using the kl_php module.

I am using a dedicated server on one domain and trying to use the Innvocation using XML-RPC option.

I have tried 2 solutions but keep running into varitions of what appears to be the same problem and i am wondering if anybody can help.

1. Using Remote Server using the mod_openads
Using this i am able to display 1 advert on the site fine, but as soon as i copy the module, additional modules do not appear, they just appear as blank boxes.
(i would appreciate if someone has a solution to this if they could share it)

From here i went to the solution i found on this board:

2. Using kl_php module/mambot
Using this method again if i enter the invocation code created removing the at the end as described i can get 1 advert to work, however i needed to copy the lib-xmlrpc.inc.php and lib-xmlrpc.class.inc.php into the module directory and this would then show 1 advert remotely correctly using the remote XML-RPC code

Again here now when i copied the module and modify it to show a 2nd advert i recieve the following error message:

Fatal error: Cannot redeclare xmlrpc_entity_decode() (previously declared in /home/sitename/public_html/modules/lib-xmlrpc.inc.php:213) in /home/sitename/public_html/modules/lib-xmlrpc.inc.php on line 213

if i remove the :
   

Code: Select all

require('lib-xmlrpc-class.inc.php');     [b]<<<<<<<<remove this line[/b]    $xmlrpcbanner = new phpAds_XmlRpc('www.mosque-online.com', '/Ads');
    $xmlrpcbanner->view('zone:12', 0, '', '', '0');
then the error message changes to:

Parse error: syntax error, unexpected '<' in /home/sitename/public_html/modules/mod_kl_evalphp.php(27) : eval()'d code on line 1

unfortunately im not a coder and cannot seem to decifier further on how to get this working.

Any help would be appreciated.

Thanks

xgipper
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 223
Joined: Fri Aug 26, 2005 8:59 am

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by xgipper » Thu Jun 07, 2007 10:50 am

Hi
I have phpAdsNew successfully working with a Mambo site, both on the same server, using the mod_phpads module.
On another server I have a Joomla site I'm building . I've installed the  KL evalPHP mod, which I've published and can see the 'hello world' test message on the page.
In time I will convert the Mambo site to Joomla and migrate it, and the ad server, to the second server so it's all in one place - but for now I'm trying to understand whether it's possible for the new Joomla site to be served ads from phpadsnew on first other server, and how to do it. I'm pretty confused about all the talk of cookies and php tags, to be honest, although I'm sure I've read in the manual it is possible to serve ads across sites from one phpAdsNew.
So I created a publisher/zone for the second Joomla site in phpAdsNew, but it only gives me the option to generate invocation code as javascript. Is this right? And when I paste this in to the KL evalPHP mod and publish it I get a "Parse error: syntax error, unexpected '<' in line 1......blah blah"
I have also tried the mod_phpads module which doesn't serve the ads on the Joomla site either.
So I'd like to know, is what I'm trying to do possible, and if so, what do I need to do to make it work?
Otherwise I guess I'll just install another phpAdsNew on the second server.
Many thanks in advance for any assistance.
Cheers

eetu
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Fri Jan 27, 2006 10:59 pm

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by eetu » Tue Jun 19, 2007 10:25 pm

I followed the instructions and everything seemed to worked fine. Banner is displayed, but the link does not work. I get a 500 error. You can test it at http://www.freemagazine.fi with the top banner. I'm user openads 2.0

User avatar
thingwarbler
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Fri Mar 17, 2006 4:24 am
Location: Norwich, VT

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by thingwarbler » Wed Aug 15, 2007 7:41 pm

Anybody have any insights into why copies of the mod_kl_evalphp module fail to work with a remote invocation of a phpadsnew banner? The first module that joomla encounters works fine, but any subsequent calls with different zones are ignored.

each of my script invocations look as follows:

Code: Select all

$xmlrpcbanner = new phpAds_XmlRpc('www.myadserverhere.com', '/openads');
$xmlrpcbanner->view('zone:16', 0, '', '', '0');
with a different zone set for each. At the top of my index.php I've dropped the xmlrpc include:

Code: Select all

require_once('ads/misc/samples/xmlrpc/php/lib-xmlrpc-class.inc.php');
Again, it all works fine with one module, but a second module fails. Can anyone explain why?

renesm
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Oct 30, 2006 9:50 am

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by renesm » Mon Sep 17, 2007 12:24 pm

I'm getting the same problem and no-one knows what to do!!!

Please help!

www.absolutegadget.com

jazure
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 25, 2007 10:15 pm

Re: DISCUSSION: How to use phpAdsNew with Joomla!

Post by jazure » Wed Sep 26, 2007 4:23 pm

renesm wrote: I'm getting the same problem and no-one knows what to do!!!

Please help!

www.absolutegadget.com

I had this problem.  then changed the

Code: Select all

require 'openads-xmlrpc.inc.php';
to

Code: Select all

require_once 'openads-xmlrpc.inc.php';


Locked

Return to “FAQ Discussion Board”