vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - vB Ad Management 4 (https://vborg.vbsupport.ru/showthread.php?t=131150)

RedTyger 03-26-2007 03:28 PM

How to add your own custom adcode blocks in 3 minutes

Download the zip file and open the named php files using a plain text editor (something like MSWord which uses formatting will break the code). Follow the simple instructions below then save, upload and overwrite your existing files. Your new custom adcode block will be at the bottom of the header/footer section of your vB Ad Management settings.

You can add as many custom blocks as you like as long as you give each one a different name. They'll work on any page, obey all permissions and work with all features including Ad-Sharing.

To name a custom adcode block, just find/replace every instance of the word "custom" in the code below with the new name of your choice.


IN FILE vb_ad_management_310.xml, FIND:
PHP Code:

<template name="footer_advertisement" templatetype="template"><![CDATA[
        <
div align="center">
            
$footer_adcode
        
</div>
]]></
template


ADD BELOW:

PHP Code:

<template name="custom_advertisement" templatetype="template"><![CDATA[
        <
div>
            
$custom_adcode
        
</div>
]]></
template




IN FILE includes/vb_ad_management/cache_templates.php, FIND:
PHP Code:

if ($vbulletin->options['adintegrate_footer_onoff'])
{
    
$adtemplates[] = 'footer_advertisement';


ADD ABOVE:
PHP Code:


if ($vbulletin->options['adintegrate_custom_onoff'])
{
    
$adtemplates[] = 'custom_advertisement';





IN FILE includes/vb_ad_management/global_start.php,FIND:
PHP Code:

if ($vbulletin->options['adintegrate_footer_onoff']) 

ADD ABOVE:
PHP Code:

if ($vbulletin->options['adintegrate_custom_onoff'])
{    
    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 '') . '";');
    }    





IN FILE includes/vb_ad_management/global_start.php,FIND:
PHP Code:

<setting varname="adintegrate_footer_adcode_rand" displayorder="45">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting


ADD BELOW:

PHP Code:

<setting varname="adintegrate_custom_onoff" displayorder="991">
    <
datatype>boolean</datatype>
    <
optioncode>yesno</optioncode>
    <
defaultvalue>0</defaultvalue>
</
setting>
<
setting varname="adintegrate_custom_adcode" displayorder="992">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting>
<
setting varname="adintegrate_custom_adcode_rand" displayorder="993">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting


DementedMindz 03-27-2007 07:44 PM

how do we update? any instructions on that?

RedTyger 03-27-2007 07:47 PM

It was in the update, titled "Instructions"

Quote:

INSTRUCTIONS:
As this is no longer purely plugin-based to speed things up, there are now files to upload. It's very easy, just find your forum's includes directory and load the vb_ad_management folder to there. Do NOT include the includes folder in the zip file, that is just included to demonstrate where it goes on your server. The file's final location should be forum index/includes/vb_ad_management/vb ad management files/. Then upload the plugin, overwriting the one you already have installed.

DementedMindz 03-27-2007 07:48 PM

opps :o now I see it. Thank you again.

DementedMindz 03-27-2007 07:53 PM

im getting uncached templates postbit_advertisement which is the only one I use for now so I cant tell if the others are showing not cached.

RedTyger 03-27-2007 08:04 PM

Did you upload all the vb_ad_management files?

DementedMindz 03-27-2007 08:07 PM

yes I did im using vBMicroStats and right at the bottom it shows that template as uncached.

RedTyger 03-27-2007 08:19 PM

If it's installed correctly there should be no problem, I'm using vBulletin's built-in function that displays uncached templates and there are none. I suppose it's possible that modification runs before the templates for this modification are cached? I don't know.

Add this line to your includes/config.php file along with the rest of the settings then save the file and overwrite the existing config.php file on your setting.

Code:

$config['Misc']['debug'] = true;
Does the default vBulletin information say that templates are uncached? It lists templates in the footer.

DementedMindz 03-27-2007 08:25 PM

strange it dont say it there but it does on his... Do you have the older version of this until he or you can fix it?

RedTyger 03-27-2007 08:28 PM

Well as far as I can see, the problem is with his modification not mine. So there's no reason to use an older version.

DementedMindz 03-27-2007 08:30 PM

well I would like to use a older one the one before this until a fix is made Im going to make a post on his thread but for now do you have the one before this?

RedTyger 03-27-2007 08:32 PM

You're going to at least double your database queries by going back to an older version, you do understand that? You'll be worse off than even if the template really is uncached.

DementedMindz 03-27-2007 08:35 PM

yeah thats fine for now until I get a fix. I only really use the postbit one since the archive one really don't suite me since I cant use different codes for my archive and the main site footer.

RedTyger 03-27-2007 08:36 PM

....

DementedMindz 03-27-2007 08:38 PM

RedTyger thank you once again.

nokiacep 03-27-2007 08:43 PM

Hi RedTyger
I wanna ask a question about it.

You say

IN FILE includes/vb_ad_management/global_start.php,FIND:
PHP Code:

<setting varname="adintegrate_footer_adcode_rand" displayorder="45">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting


ADD BELOW:

PHP Code:

<setting varname="adintegrate_custom_onoff" displayorder="991">
    <
datatype>boolean</datatype>
    <
optioncode>yesno</optioncode>
    <
defaultvalue>0</defaultvalue>
</
setting>
<
setting varname="adintegrate_custom_adcode" displayorder="992">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting>
<
setting varname="adintegrate_custom_adcode_rand" displayorder="993">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting


But I couldn't find the first section in vb_ad_management/global_start.php

PHP Code:

<setting varname="adintegrate_footer_adcode_rand" displayorder="45">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting

I suppose I'm making a mistake but where

principino1984 03-27-2007 10:28 PM

sweet.. thanks for the update.

Marco

racerhub 03-27-2007 10:51 PM

I would love a way to target ads to particular forums. I.E. Ad #1 goes to Forum #1 only, and Ad #2 only goes to Forum #2.

Thanks,

tehPARADOX 03-28-2007 12:42 AM

Quote:

Originally Posted by RedTyger (Post 1213876)
It was in the update, titled "Instructions"

Quote:

INSTRUCTIONS:
As this is no longer purely plugin-based to speed things up, there are now files to upload. It's very easy, just find your forum's includes directory and load the vb_ad_management folder to there. Do NOT include the includes folder in the zip file, that is just included to demonstrate where it goes on your server. The file's final location should be forum index/includes/vb_ad_management/vb ad management files/. Then upload the plugin, overwriting the one you already have installed.

Just to let you know, the current archive right now, doesn't include those instructions. Just comes with the Includes folder and the product.

And also for the postbit ads, displayed as user. Is there a way to change it back to legacy (vertical) rather then the horizontal way?

milsirhc 03-28-2007 08:31 AM

thanks for the update.

I'm still alittle confused regarding upgrading this plugin.

I copied the files into includes and import the plugin as upgrade.. is that all? Do I have to remove all my previous ' * Upload the product using the Product Manager.
* Go to Style Manager > Edit Templates and...
* Find <!-- post $post[postid] popup menu --> and paste $postbit_advertisement above it in your postbit & postbit_legacy templates.
* Paste $forumbit_advertisement at the bottom of your forumhome_forumbit_level1_post and forumhome_forumbit_level2_post templates.
* Paste $threadbit_advertisement at the bottom of your threadbit template.
* Paste $footer_advertisement at the top of your footer template.
* Find $spacer_close in your footer template and below it paste $rightcolumn_advertisement.
* Find &nbsp; in your header template and replace it with $header_advertisement.
* Find $spacer_open in your header template and below it paste $leftcolumn_advertisement." that I have done?

And also do I need to change the .xml file as you have mentioned now? *lost*

One more question is does this version resolve the ad sharing bug in the previous version??

Thanks again Redtyger!!!!!!!

RedTyger 03-28-2007 08:33 AM

Quote:

Originally Posted by milsirhc (Post 1214315)
thanks for the update.

I'm still alittle confused regarding upgrading this plugin.

I copied the files into includes and import the plugin as upgrade.. is that all? Do I have to remove all my previous...

And also do I need to change the .xml file as you have mentioned now? *lost*

One more question is does this version resolve the ad sharing bug in the previous version??

Thanks again Redtyger!!!!!!!


You do have to change the plugin, overwrite your existing plugin with the new one, you don't have to install it first. In fact you shouldn't, because you'll lose your settings.

Quote:

v3.1 Fixed usergroup and userid banning for shared adcode, again now they actually work.

Quote:

Originally Posted by nokiacep (Post 1213943)
Hi RedTyger
I wanna ask a question about it.

You say

IN FILE includes/vb_ad_management/global_start.php,FIND:
PHP Code:

<setting varname="adintegrate_footer_adcode_rand" displayorder="45">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting


ADD BELOW:

PHP Code:

<setting varname="adintegrate_custom_onoff" displayorder="991">
    <
datatype>boolean</datatype>
    <
optioncode>yesno</optioncode>
    <
defaultvalue>0</defaultvalue>
</
setting>
<
setting varname="adintegrate_custom_adcode" displayorder="992">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting>
<
setting varname="adintegrate_custom_adcode_rand" displayorder="993">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting


But I couldn't find the first section in vb_ad_management/global_start.php

PHP Code:

<setting varname="adintegrate_footer_adcode_rand" displayorder="45">
    <
datatype>free</datatype>
    <
optioncode>textarea</optioncode>
</
setting

I suppose I'm making a mistake but where

The mistake was mine, you need to find that code in the plugin not global_start.php.


Quote:

Originally Posted by tehPARADOX (Post 1214130)
Just to let you know, the current archive right now, doesn't include those instructions. Just comes with the Includes folder and the product.

And also for the postbit ads, displayed as user. Is there a way to change it back to legacy (vertical) rather then the horizontal way?

You'd have to edit the modification code, the ad postbit just matches the postbit you're using.

milsirhc 03-28-2007 08:42 AM

Okay,

So basically I copied the files over.. and I upgrade (by selecting overwriting the plugin) and that's about it ya? No other changes I need to made?

And also, i tried viewing my forum as guest and did 6 refresh, I still can't see the random sharing happening. My admin adsense code still appearing all 6 times but the thread starter and last poster did not.

I specified "50" for admin, "40" for thread starter and "10" for last poster. Am i doing something wrong here?

RedTyger 03-28-2007 08:48 AM

Hm, there seems to be something wrong with the % calculations. I'll take a look at this now, don't go anywhere...

milsirhc 03-28-2007 08:50 AM

ok! I'm staying right here, refreshing my screen non-stop!!

Thankssss!!!

RedTyger 03-28-2007 09:05 AM

Quote:

Originally Posted by milsirhc (Post 1214325)
ok! I'm staying right here, refreshing my screen non-stop!!

Thankssss!!!

Don't do that! Enable instant email notification for the thread.

Anyway, could you download the new zip file (3.11) and overwrite global_start.php with the version in the new zip. You do not need to alter anything else. Please let me know if it now works.

milsirhc 03-28-2007 09:08 AM

I'll give it a go! don't go anywhere! =P

milsirhc 03-28-2007 09:20 AM

Tried..

here's the findings:

Login as admin, the random code works perfectly fine but I can see the admin adcode and the threadstarter adcode randomly

Login as a normal user, the random thingy don't work, I can see the admin adcode only (or is it the user own one only) <- my admin and my own are the same.

Goes in as guest, I can only see the admin code and the random thingy don't work.

milsirhc 03-28-2007 09:23 AM

update:

login as normal user, can only see the admin code and the thread starter (which is not the same user) random thingy don't work.

RedTyger 03-28-2007 09:25 AM

Would you mind giving me admin access to your forum so I can see for myself? Preferably to also turn the forum off for a few minutes so I can poke around a bit. I can't reproduce your new problem on my forum, it should be working fine now.

milsirhc 03-28-2007 09:53 AM

pmed you. =)

Just to make it clear again:

Login as admin, the random code works perfectly fine but I can see the admin adcode and the threadstarter adcode randomly

login as normal user, can only see the admin code and the thread starter (which is not the same user) random thingy don't work.

Goes in as guest, I can only see the admin code and the random thingy don't work.

TrIn@dOr 03-28-2007 10:31 AM

Where can i read upgrade instructions?

We have 3.04

Thanks.

tehPARADOX 03-28-2007 10:47 AM

Quote:

Originally Posted by RedTyger (Post 1214316)
You'd have to edit the modification code, the ad postbit just matches the postbit you're using.

Will look into it. And no it's not.

pbweb 03-28-2007 01:07 PM

Hi RedTyger,

I've installed v3.1.1 on vb3.6.5. Absolutely nothing shows up! I followed all the instructions, modified the templates as specified, made sure everything in the CP was enabled, used plain text instead of scripts, and it's as if nothing is installed...

I've installed other Products before so I don't think I'm a complete dunce, but maybe I'm missing something. Can you help??

Thanks!
PB

RedTyger 03-28-2007 04:07 PM

Quote:

Originally Posted by TrIn@dOr (Post 1214369)
Where can i read upgrade instructions?

We have 3.04

Thanks.

It was in the Update notification, but was posted again few posts back.


Quote:

Originally Posted by tehPARADOX (Post 1214373)
Will look into it. And no it's not.

Ah. Hm. It always used to be, I haven't changed that code since v1.0.


Quote:

Originally Posted by pbweb (Post 1214446)
Hi RedTyger,

I've installed v3.1.1 on vb3.6.5. Absolutely nothing shows up! I followed all the instructions, modified the templates as specified, made sure everything in the CP was enabled, used plain text instead of scripts, and it's as if nothing is installed...

I've installed other Products before so I don't think I'm a complete dunce, but maybe I'm missing something. Can you help??

Thanks!
PB

I can only suggest rechecking your settings, making sure the template edits are done correctly (and that you're using the style with the template edits) and remembering that you aren't able to see your own shared code if you're using Adsharing. You must view someone else's.

pbweb 03-28-2007 04:18 PM

Thanks for the help, I figured it out...

I had to upload the "includes" folder as-is and NOT separate the individual files out.

Killer hack!:up:

xrayeramy 03-28-2007 08:15 PM

Super easy to install! Just needed to realize that I had to ftp the includes folder.

One questions....on my left side banner it has a border around it which has a different colored background so it looks like the ads are framed or matted. Any way to get rid of that extra stuff?
Amy

Edited to say that I read all 51 pages now just to make sure I couldn't find the answer....nope. I also have a purple border around the template (not my image) that I want to get rid of. Here's my site:
http://rubberstampchat.net/

madkeen 03-28-2007 11:35 PM

[quote]
My intention is to expand the existing functionality to other areas of the forum outside the postbit in the next version - navbar, footer, threadbit, forumbit - plus a couple of minor extra features.
[quote]

That would be fantastic.

Look forward to seeing it

Thanks

Big Island 03-29-2007 04:50 AM

Tried posting html in from adpeeps to display and rotate adds with no luck. The ad block just shows up blank. Any ideas?

RedTyger 03-29-2007 06:29 AM

Quote:

Originally Posted by xrayeramy (Post 1214753)
Super easy to install! Just needed to realize that I had to ftp the includes folder.

One questions....on my left side banner it has a border around it which has a different colored background so it looks like the ads are framed or matted. Any way to get rid of that extra stuff?
Amy

Edited to say that I read all 51 pages now just to make sure I couldn't find the answer....nope. I also have a purple border around the template (not my image) that I want to get rid of. Here's my site:
http://rubberstampchat.net/

Edit the leftcolumn_advertisement template. Adding border="0" somewhere should do it.


[QUOTE=madkeen;1214891][quote]
My intention is to expand the existing functionality to other areas of the forum outside the postbit in the next version - navbar, footer, threadbit, forumbit - plus a couple of minor extra features.
Quote:


That would be fantastic.

Look forward to seeing it

Thanks
That was done by version 2.0...


Quote:

Originally Posted by Big Island (Post 1215035)
Tried posting html in from adpeeps to display and rotate adds with no luck. The ad block just shows up blank. Any ideas?

What is the adcode you are trying to use?

RedTyger 03-29-2007 02:30 PM

<a href="https://vborg.vbsupport.ru/attachment.php?attachmentid=62415" target="_blank">https://vborg.vbsupport.ru/attac...chmentid=62415</a>


All times are GMT. The time now is 03:27 AM.

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.11717 seconds
  • Memory Usage 1,910KB
  • 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
  • (1)bbcode_code_printable
  • (14)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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