Thread: Major Additions - vB Ad Management 4
View Single Post
  #1152  
Old 06-06-2007, 10:32 AM
RedTyger's Avatar
RedTyger RedTyger is offline
 
Join Date: Nov 2006
Location: UK
Posts: 1,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mik2007 View Post
RedTyger, thanks for the great ad system!
I have one question regarding custom code - I did everything according to instructions and it works beautifully if I add $custom_advertisement into the header or footer templates. However all attempts to add $custom_advertisement into the postbit template fail. My goal is to display the small ad block incorporated into the end of the last message in the thread only.

I tried to achieve it by adding the following to the postbit_display_start.php or global_start.php but to no avail:
PHP Code:
if ($vbulletin->options['adintegrate_custom_onoff'])
if ((
THIS_SCRIPT == 'showthread' || THIS_SCRIPT == 'showpost') && $post['islastshown'])
{    
{
if (
$vbulletin->options['adintegrate_custom_adcode'])
    {
        
$custom_split explode("$adshared"$vbulletin->options['adintegrate_custom_adcode']);
        
$custom_adcode $custom_split[0];
        if (
$custom_split[1])
        {
            
$custom_adcode $custom_split[0] . $GLOBALS['adcode_shared'] . $custom_split[1];
        }
        eval(
'$custom_advertisement = "' fetch_template('' custom_advertisement '') . '";');
    }
    else if (
$vbulletin->options['adintegrate_custom_adcode_rand'])
    {
        
$custom_adcode explode("$addelimiter"$vbulletin->options['adintegrate_custom_adcode_rand']);
        
$custom_rand array_rand($custom_adcode);
        
$custom_adcode $custom_adcode["$custom_rand"];
        
$custom_split explode("$adshared"$custom_adcode);
        
$custom_adcode $custom_split[0];
        if (
$custom_split[1])
        {
            
$custom_adcode $custom_split[0] . $GLOBALS['adcode_shared'] . $custom_split[1];
        }
        eval(
'$custom_advertisement = "' fetch_template('' custom_advertisement '') . '";');
    }    
}

Try replacing every instance of $vbulletin->options with $this->registry->options and then adding it to the postbit file. It won't work in global_start.php because $post[islastpostshown] is, as you might guess, a postbit conditional and won't work elsewhere.

Quote:
Originally Posted by Mrdby View Post
On three of my skins...the left and right colum doesn't work. any ideas?
The columns are highly unlikely to work with heavily customised skins, it's just not possible to be flexible enough.

Quote:
Originally Posted by The Librarian View Post
Upgrading from vBulletin 3.6.4 to 3.6.7 today. Got this error message at the top of my forums:



and I can't login to AdminCP without disabling hooks:



so I disabled everything, logged in, disabled just vB Ad Management, and then turned things back on. The forums worked (mostly) and the error message was gone. I tried re-installing Ad Management and had the same problem. I've still got problems with vBadv CMPS but I need help figuring out what to do about Ad Management.

BTW, I've created a second forum (forum2) to run the upgrade as per instructions found here: http://www.vbulletin.com/forum/showthread.php?t=187770
I've turned back on the original forum until I can figure out this and other problems.

Help!
The includes files have either been uploaded incorrectly or to the wrong location. You should be able to find them all by going to your forum's root directory using FTP and they will be in the includes/vb_ad_management folder.

Quote:
Originally Posted by Hendrizius View Post
Yes, but leaving it blank should show it to everyone. I put this in there now:
Display advertisements to Usergroups: 1|2|3|4|5|6|7|8|
Do NOT display advertisements to Usergroups: 27

Still no change. Thanks for helping.
Yes, leaving it blank will give you global display. All I can suggest is that you double check ALL settings (not just the global ones, any others that will apply) especially that you have also enabled that ad section, the option is above where you enter the adcode. And ensure that you're using the style that you made the edits to.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01165 seconds
  • Memory Usage 1,810KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete