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)

Chris 96 WS6 10-02-2005 10:48 PM

Quote:

Originally Posted by mikexxx
Just put $phpAds_raw2[html] in any template ;)

You're going to have to dumb it down for me more. Nowhere in the invocation code for zone 2 does "$phpAds_raw2[html]" show up, so the call for zone 1 and zone 2 are the same. When I put $phpAds_raw2[html] in the template, that call doesn't seem to reference anything in PAN.

I'm lost.

How does this site: www.gearchatter.com, generate the zone on the left to diplay all his ads?

Big Kahuna 10-06-2005 11:42 PM

I know whenever you help people with something like this -- you open a can of worms that keeps you busy putting out people's fires.

I followed your distructions and added 6 banners (six different invocation codes) to my 30+ styles at www.moparstyle.com -- and everything works great.

99.44% of the time when I use one of the hacks here -- everything works fine. When it doesn't -- I generally find a typo on my part when I reread.

This is long way of saying all is well -- and I appreciate your help. Much faster than having the server running all of that Java code.

jsharper 10-07-2005 02:36 AM

Quote:

Originally Posted by Chris 96 WS6
You're going to have to dumb it down for me more. Nowhere in the invocation code for zone 2 does "$phpAds_raw2[html]" show up, so the call for zone 1 and zone 2 are the same. When I put $phpAds_raw2[html] in the template, that call doesn't seem to reference anything in PAN.

I'm lost.

The invocation code given by phpadsnew is just a template or an example of how to display that particular zone. When you have more than one banner on a page, the invocation code for at least one of them will have to be modified so that you don't have conflicting variable names. If $phpAds_raw[html] is set to contain the html for one zone, then you aren't going to be able to reuse that same variable to store the html for the next zone -- you'll have to change that variable to something else both in the invocation code and where you use it. Some people choose to use $phpAds_raw2[html] for the 2nd zone.

Pulsorock 10-07-2005 04:09 AM

I'm trying to place more than one ad (different zones) on my templates. On the header template I placed the first one, then on the postbit template I want to place another. On other template, I want to place the last one. But I'm not able to display them. Just the first one displays. Here is the code I placed on the phpinclude_start template:

Code:

ob_start();

if (@include(getenv('DOCUMENT_ROOT').'/maxserver/phpadsnew.inc.php'))
{
        if (!isset($phpAds_context))
        {
  //LeaderBoard Banner
  $phpAds_context = array();
  $phpAds_raw = view_local ('', 5, 0, 0, '_blank', '', '0', $phpAds_context);

  //Medium Rectangle
  $phpAds_context2 = array();
  $phpAds_raw2 = view_local ('', 21, 0, 0, '_blank', '', '0', $phpAds_context2);
 
  //Wide Skyscraper
  $phpAds_context3 = array();
  $phpAds_raw3 = view_local ('', 37, 0, 0, '_blank', '', '0', $phpAds_context3);
        }
}

ob_end_clean();

On the header I place the code: $phpAds_raw[html]. And it shows the leaderboard banner. Then on the postbit template I place the code: $phpAds_raw2[html]. But it does not appear anything. I also tried placing on the postbit template: $phpAds_raw[html], but it does not show anything.

Note: I'm using MMM 0.1.x

SashaCPF 10-11-2005 02:51 AM

I have one spot in my header that I want to have 43 banners rotate in. I want them to rotate with each page change or refresh. I am using direct selection. I can get one banner to display... I can get two banners to display next to each other at the same time. How do I get them to rotate... one at a time? Code?

acorndomains.co 10-30-2005 11:16 PM

I cant get this to work even following the instructions on the first page of this thread.

Soes anyone have simple instructions to follow to get this running on VB 3.5.0??

Many thanks

NxTek 11-08-2005 06:20 PM

Does this work with vB 3.5.1?

MarkCSCS 11-25-2005 08:51 PM

Hey Guys and Gals, can you guys help me out.

I'm installing PHPadsnew and I appear to have everything working on my server and html site. I'm trying to finish the install/integration into my Vb 3.51 forums.

The instructions say to modify the PHPINCLUDE_start template. For the life of me, I cannot find this template. I've looked through the templates and either I'm blind or its not there. Is this a template in vB 3.51? If so, where is it if, because apparently I'm blind, and running search in templates is not showing it to me.

If it's not a template in 3.51; then what should I modify to get this hack to work?

Thanks!

jsharper 11-26-2005 04:14 AM

Mark,
The phpinclude_start template is gone starting with 3.5. It is replaced with the plugins system. Try adding a new plugin with a hook location of global_start and put the phpAdsNew code in there.

Masiello 12-22-2005 01:41 PM

I have create a new plug-in (globalstart hook) and insert the code of the first post
in header the raw html, and just set the schedule task righ, but when I active the plug-in and try to open my page, it dont be able to connect to the database, why?

my vbulletin version is 3.5.2 and using vba index in the root dir with forum in /forum dir

3dfusion 01-24-2006 01:33 PM

I have the same problem. The error message is:

Code:

Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:
SELECT pageid, title, name, parentid, userperms FROM vb3_adv_pages WHERE active = 1 ORDER BY displayorder;

MySQL-Fehler : Table '3df_adserv.vb3_adv_pages' doesn't exist
Fehler-Nr.  : 1146
Datum        : Tuesday, January 24th 2006 @ 04:32:31 PM
Skript      : http://3dfusion.de/
Referrer    :
IP-Adresse  : 84.190.244.97
Benutzername : Boris
Klassenname  : vB_Database

And this one:

Code:

Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:

                                        UPDATE vb3_session
                                        SET lastactivity = 1138116751, location = '/', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
                                        WHERE sessionhash = 'c716a84e4d16708bb047ada984f3ef92';

MySQL-Fehler : Table '3df_adserv.vb3_session' doesn't exist
Fehler-Nr.  : 1146
Datum        : Tuesday, January 24th 2006 @ 04:32:31 PM
Skript      : http://3dfusion.de/
Referrer    :
IP-Adresse  : 84.190.244.97
Benutzername : Boris
Klassenname  : vB_Database


tgmorris 01-24-2006 02:00 PM

Quote:

Originally Posted by 3dfusion
I have the same problem. The error message is:

Code:

Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:
SELECT pageid, title, name, parentid, userperms FROM vb3_adv_pages WHERE active = 1 ORDER BY displayorder;

MySQL-Fehler : Table '3df_adserv.vb3_adv_pages' doesn't exist
Fehler-Nr.  : 1146
Datum        : Tuesday, January 24th 2006 @ 04:32:31 PM
Skript      : http://3dfusion.de/
Referrer    :
IP-Adresse  : 84.190.244.97
Benutzername : Boris
Klassenname  : vB_Database

And this one:

Code:

Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:

                                        UPDATE vb3_session
                                        SET lastactivity = 1138116751, location = '/', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
                                        WHERE sessionhash = 'c716a84e4d16708bb047ada984f3ef92';

MySQL-Fehler : Table '3df_adserv.vb3_session' doesn't exist
Fehler-Nr.  : 1146
Datum        : Tuesday, January 24th 2006 @ 04:32:31 PM
Skript      : http://3dfusion.de/
Referrer    :
IP-Adresse  : 84.190.244.97
Benutzername : Boris
Klassenname  : vB_Database


Not sure if it will solve your problem or not but you might try turning on 'compatibility mode' in phpAdsNew.

3dfusion 01-24-2006 02:18 PM

Yes, great! With the 'compatibility mode (database)' it works flawlessly :)

The Realist 02-28-2006 08:55 PM

Looking for help in setting up Phpadsnew with VB 3.5.4 so banners show in the header template.

Tried all ways and so far had no luck.

HELP :)

marcopolo 03-12-2006 06:19 PM

Quote:

Originally Posted by The Realist
Looking for help in setting up Phpadsnew with VB 3.5.4 so banners show in the header template.

Tried all ways and so far had no luck.

HELP :)

I'm having exactly the same problem

I'm running locally to test and having no luck whatsoever. I'm also running 3.5.4

Warlock40 03-14-2006 02:03 AM

I have my phpadsnew on a seperate database. None of the local code would work until I used remote jscript. Seems to be working at the moment.

Found that the manuals are not very specific to vb at all. I'm not sure if I'm going to keep using this or not.

I'm now having problems getting my header banner to center. It may not be worth all the trouble.

kurtbarker 03-19-2006 11:13 PM

k guyz, I got this working on 3.5.1 [woot]

I am using "$phpAds_raw" in my header template, what would I need to add to that code to have the banner centered, coz at the moment it is left aligned by default

WhyDoesItMatter 04-16-2006 06:27 PM

Brain fart here :(.. Where's the PHPINCLUDE_START template?... lol...

Zachery 04-18-2006 02:49 AM

There is no phpinclude_start template in vB 3.5

WhyDoesItMatter 04-18-2006 12:10 PM

That explains why I couldn't find it, hahaha.. Thanks Zachery. :(

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 ;)

smoknz28 10-07-2006 08:29 PM

Quote:

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

Should I be searching for: echo $phpAds_raw['html'];

Been looking in my forumhome template and only found one instance with phpAds in it and that was the code that I just added.

Also, if I'd like to add more than one banner, would I just add the code from phpAdsNew into the plugin code just as I did to make the initial one appear?

onliner7 10-07-2006 09:56 PM

if you want to add a new banner you will probably have to make a new variable

for example.. a new plugin with the code

PHP Code:


ob_start
();

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

ob_end_clean(); 

notice the new variable name (it was phpAds_raw but now i made a new one called aNewVariable

then anywhere in your template

{$aNewVariable['html']}


i havent tested this but i think it should work OK

Jason

onliner7 10-12-2006 06:16 AM

In addition to the code i've posted here

https://vborg.vbsupport.ru/showpost....&postcount=106

I would like to add something else for the peeps that want it to work with vbAdvanced

go to Admin CP -> vBA CMPS -> Default Settings -> Portal Output Global Variables

and add

PHP Code:

phpAds_raw 

to that textbox..

This will work with the latest phpAdsNew 2.0.8 and vBulletin 3.6.x

if you have more than one ads then you need to externalize (ie write all variables into this textbox without the $ in front) all variables you have in your hooks.. but the above will work with one ad just fine

as always check www.pbzone.net to see it working

A big thanks to this community it keeps me learning new things all the time

p.s. if anyone has benefited from this or has problems please email me :)

smoknz28 11-05-2006 04:14 AM

Will this work for multiple banners?

myplacidcasual 11-06-2006 12:52 PM

having some difficulty here. if I were to put the code:

{$phpAds_raw['html']}

into my header, would i place it inside a <td> or outside of it.

OH MY GOD!

So yeah I just took the javascript invocation code and plugged it into the bottom of the header. Everythign is fine now.

God da$#$n't that was a lotta time wasted.

Am I the only one who feels like an idiot at least 90 percent of the work day thanks to vbulletin?

smoknz28 11-07-2006 12:29 PM

Quote:

Originally Posted by myplacidcasual
OH MY GOD!

So yeah I just took the javascript invocation code and plugged it into the bottom of the header. Everythign is fine now.

God da$#$n't that was a lotta time wasted.

Exactly....did you read my other posts that talked about doing this?

Man, I had no idea that it was that simple until I started thinking about what I did with ubb Threads. After trying about 3 different hacks.... I had just tested out the Java invocation code....and whalla. ;)

What I'd like to do however, is insert a table where I can put the java code to the right of my banner. Here's what my header currently looks like: www.f-bodyhideout.com/forums

If someone knows how to do it....please PM me or post up here.

Thanks...

Glad you're up and running myplacidcasual.

imported_infitech 11-10-2006 04:41 AM

i dont have PHPINCLUDE_START

Quote:

Originally Posted by onliner7
In addition to the code i've posted here

https://vborg.vbsupport.ru/showpost....&postcount=106

I would like to add something else for the peeps that want it to work with vbAdvanced

go to Admin CP -> vBA CMPS -> Default Settings -> Portal Output Global Variables

and add

PHP Code:

phpAds_raw 

to that textbox..

This will work with the latest phpAdsNew 2.0.8 and vBulletin 3.6.x

if you have more than one ads then you need to externalize (ie write all variables into this textbox without the $ in front) all variables you have in your hooks.. but the above will work with one ad just fine

as always check www.pbzone.net to see it working

A big thanks to this community it keeps me learning new things all the time

p.s. if anyone has benefited from this or has problems please email me :)

ur the man!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

voteforbird 11-10-2006 03:09 PM

I tried the instructions above, but it isn't working with my 3.6.2. When I add the plugin, I get a MySQL error:
Quote:

MySQL Error : Table 'volconvo_phpadsnew.blogs' doesn't exist
Table blogs is in my vBulletin table, but it's trying to fetch it from my ads table.

imported_infitech 11-12-2006 08:00 AM

this has helped me a great deal - thank u so much.....
****installs****

burntire 02-26-2007 06:46 PM

Has anyone got this working without using the Java invocation code?

I am trying to get this to work with the local invocation code with 3.6.4.


All times are GMT. The time now is 09:00 AM.

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.01766 seconds
  • Memory Usage 1,879KB
  • 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
  • (7)bbcode_code_printable
  • (7)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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