Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: I can add phpadsnew, and see the banner, but  (Read 8583 times)

0 Members and 1 Guest are viewing this topic.

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
I can add phpadsnew, and see the banner, but
« on: August 31, 2005, 01:08:22 pm »

I can add phpadsnew in theme.php, and see the banner in top of my blog, but give this error:

Code: [Select]
There was an error while processing a database query


when remove my phpadsnew code in theme.php my gallery was worked very good.
« Last Edit: September 01, 2005, 11:35:12 pm by GauGau »
Logged

Nibbler

  • Guest
Re: I can add phpadsnew, and see the banner, but
« Reply #1 on: August 31, 2005, 01:23:09 pm »

It's probably changing the database connection. Enable debug mode to get the mysql error message that is caused. Posting the code would also help. You may have to add some code after the ads to re-select the coppermine database.

Code: [Select]
mysql_select_db($CONFIG['dbname'])
It may also be helpful to keep the ads in the same database as coppermine.
Logged

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #2 on: August 31, 2005, 01:29:36 pm »


Code: [Select]

While executing query "SELECT count(*) FROM cpg134_albums as a WHERE category = '0'" on 0

mySQL error: Table 'adver.cpg134_albums' doesn't exist



thanks
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: I can add phpadsnew, and see the banner, but
« Reply #3 on: August 31, 2005, 01:46:14 pm »

switch from local mode to eg javascript invocation and all should be good

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #4 on: August 31, 2005, 01:57:31 pm »

switch from local mode to eg javascript invocation and all should be good


no, this isn't way for me. i want use bye PHP.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: I can add phpadsnew, and see the banner, but
« Reply #5 on: August 31, 2005, 06:05:32 pm »

Then you'll have to be a PHP coder to accomplish this.
Logged

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #6 on: August 31, 2005, 06:49:17 pm »


Code: [Select]

While executing query "SELECT count(*) FROM cpg134_albums as a WHERE category = '0'" on 0

mySQL error: Table 'adver.cpg134_albums' doesn't exist



thanks



Hi
I using as this code:

Code: [Select]
function banner() {

    if (@include(getenv('DOCUMENT_ROOT').'/ad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$return  = $phpAds_raw['html'];
mysql_select_db($CONFIG['gallery']);


    }
return $return;
}


but, still is conflict database
Logged

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #7 on: August 31, 2005, 06:50:55 pm »


Code: [Select]

While executing query "SELECT count(*) FROM cpg134_albums as a WHERE category = '0'" on 0

mySQL error: Table 'adver.cpg134_albums' doesn't exist



thanks



Hi
I using as this code:

Code: [Select]
function banner() {

    if (@include(getenv('DOCUMENT_ROOT').'/ad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
$return  = $phpAds_raw['html'];
mysql_select_db($CONFIG['gallery']);


    }
return $return;
}


but, still is conflict database
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: I can add phpadsnew, and see the banner, but
« Reply #8 on: August 31, 2005, 08:00:07 pm »

this will help you
php.net/global

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #9 on: September 01, 2005, 07:28:36 am »

Nibbler, please help me.
Logged

Nibbler

  • Guest
Re: I can add phpadsnew, and see the banner, but
« Reply #10 on: September 01, 2005, 12:27:21 pm »

Under

Code: [Select]
function banner() {
add

Code: [Select]
global $CONFIG;
Logged

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #11 on: September 01, 2005, 01:07:22 pm »

Under

Code: [Select]
function banner() {
add

Code: [Select]
global $CONFIG;

Hi, i put

Code: [Select]
global $CONFIG;
Quote

in

Code: [Select]
function banner() {but not worked
please see the my function.

Code: [Select]
mysql_select_db($CONFIG['gallery']);

is corect?
Logged

Nibbler

  • Guest
Re: I can add phpadsnew, and see the banner, but
« Reply #12 on: September 01, 2005, 01:10:53 pm »

No, use the code as I posted it.

Code: [Select]
mysql_select_db($CONFIG['dbname']);
Logged

mlsbv

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: I can add phpadsnew, and see the banner, but
« Reply #13 on: September 01, 2005, 01:23:06 pm »

No, use the code as I posted it.

Code: [Select]
mysql_select_db($CONFIG['dbname']);

Thanks man.  ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 22 queries.