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)

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 08:55 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.01386 seconds
  • Memory Usage 1,748KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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