vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Using PHPadsnew 2 with Vbulletin 3. (https://vborg.vbsupport.ru/showthread.php?t=75475)

SuperJETT 04-18-2006 01:54 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=100229" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=100229</a>
phpAdsNew Integration 1.0.3 for vBulletin 3.5.x

SLP LS1 08-17-2006 08:41 AM

Anyone know how to place phpadsnew banners in one zone and rotate like this forum www.ls1tech.com

I picked "Don't show a banner from the same campaign again on the same page"

And put my php generated local mode in global

and put my banner code in right_column
> $phpAds_raw2[html]
> $phpAds_raw3[html]
> $phpAds_raw4[html]
> $phpAds_raw5[html]
> $phpAds_raw6[html]
> $phpAds_raw7[html]
> $phpAds_raw8[html]
> $phpAds_raw9[html]
> $phpAds_raw10[html]
> $phpAds_raw11[html]
> $phpAds_raw12[html]

I'm getting doubles still of my banners, there must be a setting in phpadsnew to fix this so I don't get doubles, anyone know?

Here's my site www.sembmusclecarclub.com

Big Kahuna 09-04-2006 12:22 PM

When I was using 3.0.6 I had phpds working real well it it. When I upgraded to 3.6 -- they disappeared. I added the phpinclude_start template -- but that didn't help.

COde in the phpinclude_start
Code:

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



    if (@include(getenv('DOCUMENT_ROOT').'/phpad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw2 = view_raw ('zone:1', 0, 'new', '', '0', $phpAds_context);
        $phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw2['bannerid']);
    }


    if (@include(getenv('DOCUMENT_ROOT').'/phpad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw3 = view_raw ('zone:1', 0, 'new', '', '0', $phpAds_context);
        $phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_raw3['bannerid']);
    }
   


    if (@include(getenv('DOCUMENT_ROOT').'/phpad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw4 = view_raw ('zone:1', 0, 'new', '', '0', $phpAds_context);
    }
   

    if (@include(getenv('DOCUMENT_ROOT').'/phpad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw5 = view_raw ('zone:1', 0, 'new', '', '0', $phpAds_context);
    }



    if (@include(getenv('DOCUMENT_ROOT').'/phpad/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw6 = view_raw ('zone:1', 0, 'new', '', '0', $phpAds_context);
    }
   

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




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

code in the header template

Code:

<!-- Add three phpad banners -->
$phpAds_raw[html] $phpAds_raw2[html] $phpAds_raw3[html]

</td>
    </tr>
  </table>
  </center>
</div>
<!-- Endphpad banners-->

I looked at the addin for 3.5 -- and although I've used phpads for a couple of years, and have installed virtually every other hacek in the last 5 years without any promblems -- I must be too big of a dumbass as the instructions for the addin are not expicit enough. It also appear that coders much bettr than I are climing it is buggy.

Is there a was to use php invocation code in a 3.6 template -- more simular to the way I did in 3.0.6?

Quote:

Originally Posted by Pulsorock
That used to happen to me too. The fix is found goin to Settings > Main Settings > In Database optimisations, check the option that reads: "Use database compatibility mode"

Just tried that -- didn't cure the problem with phpadsnew no longer working after upgrade to 3.6

smoknz28 10-01-2006 05:29 PM

Sure hoping that someone gets this figured out for vB 3.6.x.

I'd hate to throw away phpAdsNew. :(

onliner7 10-04-2006 06:28 AM

anyone got a fix for 3.6 ?

onliner7 10-07-2006 03:32 PM

Hi i finally made it work by myself for vbulletin 3.6.0

1. Make a new plugin with the code phpAdsNew generates OMMITING the last echo command.

ex
PHP Code:

ob_start();

if (@include(
getenv('DOCUMENT_ROOT').'/ads/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_raw (''0'_blank''''0'$phpAds_context);
    }

ob_end_clean(); 

2. Set the hook to global start, execution 1, active YES
3. Save the plugin

Now find the template you want and add:

PHP Code:

{$phpAds_raw['html']} 

this was the actual error i was getting with other posts requiring to add this line of code without the {} .. i always got an error and got frustrated.. dont forget them !

Finished! it works ! (i tested it) (check www.pbzone.net)

if you want more info email me onliner AT pbzone.net

thanks

smoknz28 10-07-2006 04:40 PM

Quote:

Originally Posted by onliner7
Hi i finally made it work by myself for vbulletin 3.6.0

1. Make a new plugin with the code phpAdsNew generates OMMITING the last echo command.

ex
PHP Code:

ob_start();

if (@include(
getenv('DOCUMENT_ROOT').'/ads/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_raw (''0'_blank''''0'$phpAds_context);
    }

ob_end_clean(); 

2. Set the hook to global start, execution 1, active YES
3. Save the plugin

Now find the template you want and add:

PHP Code:

{$phpAds_raw['html']} 

this was the actual error i was getting with other posts requiring to add this line of code without the {} .. i always got an error and got frustrated.. dont forget them !

Finished! it works ! (i tested it) (check www.pbzone.net)

if you want more info email me onliner AT pbzone.net

thanks


I don't see this working on your site with the link you provided.

Also, I made my local mode code:

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

Integrated it into the code you put out:

ob_start();

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

ob_end_clean();

Added this code into my global_start.

Then, added:

{$phpAds_raw['html']}

Into my forumhome template.

Still not working, but then again, I'm using vB 3.6.1

Ideas?

Thanks

Thanks

onliner7 10-07-2006 06:11 PM

you need to delete the line

echo $phpAds_raw['html'];

from your plugin!!

check over the navbar http://www.pbzone.net/forum/index.php

smoknz28 10-07-2006 07:56 PM

Quote:

Originally Posted by onliner7
you need to delete the line

echo $phpAds_raw['html'];

from your plugin!!

check over the navbar http://www.pbzone.net/forum/index.php

Ahhhh, were definitely getting somewhere now! ;)

http://www.f-bodyhideout.com/forums/forum.php

The issue now is that it shows up in two different areas on the forumhome template......mmmm, when I click on any other forum or category....then it shows up only once, like it's suppose to do. Strange...

Thoughts?

Thanks,
Mark

onliner7 10-07-2006 08:25 PM

you prolly have the same code somewhere else too? do a search mate ;)


All times are GMT. The time now is 09:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01354 seconds
  • Memory Usage 1,763KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete