vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Randomly positioned ad in between postbits in showthread (https://vborg.vbsupport.ru/showthread.php?t=98057)

UK Jimbo 03-30-2006 01:47 PM

@Marv

Try replacing the plugin code with this (untested)

edit: removed, that's not going to work. Have a meeting to go to now but will look at it a bit later

UK Jimbo 03-30-2006 01:50 PM

Took less time than I thought - give this a try:

Code:

// only for non-threaded display
if($threadedmode == 0) {

        // only need to do the calculation once
        if( $counter == 2 && empty($GLOBALS['adsense_position'] && $totalposts >= 3 ) ) {

                $_min = $postcount;
                $_max = min($totalposts,$_min+$perpage-1) - 1;

                $GLOBALS['adsense_position'] = rand($_min,$_max);
        }

}


EyeCrave 03-30-2006 11:59 PM

I get this error with that code above:

Parse error: parse error, unexpected T_BOOLEAN_AND, expecting ')' in /pathto/showthread.php(1031) : eval()'d code on line 5

BTW - awesome plugin.

UK Jimbo 03-31-2006 06:38 AM

OOps - that's what happens when you do things in a hurry. Try this for size:

Code:

// only for non-threaded display
if($threadedmode == 0) {

        // only need to do the calculation once
        if( $counter == 2 && empty($GLOBALS['adsense_position']) && $totalposts >= 3 ) {

                $_min = $postcount;
                $_max = min($totalposts,$_min+$perpage-1) - 1;

                $GLOBALS['adsense_position'] = rand($_min,$_max);
        }

}


EyeCrave 03-31-2006 08:02 PM

Works. Thank you!

Marv 04-01-2006 08:46 AM

Quote:

Originally Posted by UK Jimbo
OOps - that's what happens when you do things in a hurry.

Thx UK-Jimbo,

I?ll give it a try and report back to you asap.

The Chief 04-05-2006 04:23 PM

installed and works great!!

UK Jimbo 04-06-2006 02:38 AM

Quote:

Originally Posted by Marv
Thx UK-Jimbo,

I?ll give it a try and report back to you asap.

Any luck?

GrendelKhan{TSU 04-06-2006 11:17 AM

I don't know if cause I installed this wrong or the Googlebot just isn't doing its job (so to speak)...

but I'm having trouble actually getting relevant ads. I don't think the googlebot is actually "reading" the content of the page. I always get ads for "free forum software" and related.

ie: I think its basically only reading the footer. or something

any ideas as to what is blocking or causing the Gbot to not actually dig into the content?

UK Jimbo 04-06-2006 03:09 PM

Hi GrendelKhan

Are the pages publically visible or do you have to register to see them? If Googlebot can't get at the pages (and content) from the same URL that you're using to access it then it can't index it. Sometimes it might take a while for pages to get indexed. I'd give it a couple of days and see how it goes. Post back and let me know how you get on.


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

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01175 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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