I'm guessing you want this
Code:
http://www.vbulletin.org/forum/showthread.php?t=131150
.
DOWNlOAD:
* Attachment
Code:
http://www.mediafire.com/?aqn4hagykni
iNStRUCtiONS
- Upload the product using the Product Manager.
- Upload the folder in the includes folder of the zip file you downloaded to the includes folder of your vBulletin installation.
- 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 in your header template and replace it with $header_advertisement.
- Find $spacer_open in your header template and below it paste $leftcolumn_advertisement.
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_3xx.xml, FIND:
PHP:
<template name="footer_advertisement" templatetype="template"><![CDATA[
<div align="center">
$footer_adcode
</div>
]]></template>
ADD BELOW:
PHP:
<template name="custom_advertisement" templatetype="template"><![CDATA[
<div>
$custom_adcode
</div>
]]></template>
FIND:
PHP:
<setting varname="adintegrate_footer_adcode_rand" displayorder="45">
<datatype>free</datatype>
<optioncode>textarea</optioncode>
</setting>
ADD BELOW:
PHP:
<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>
IN FILE includes/vb_ad_management/cache_templates.php, FIND:
PHP:
if ($vbulletin->options['adintegrate_footer_onoff'])
{
$adtemplates[] = 'footer_advertisement';
}
ADD ABOVE:
PHP:
if ($vbulletin->options['adintegrate_custom_onoff'])
{
$adtemplates[] = 'custom_advertisement';
}
IN FILE includes/vb_ad_management/global_start.php, FIND:
PHP:
if ($vbulletin->options['adintegrate_footer_onoff'])
ADD ABOVE:
PHP:
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 . '') . '";');
}
}
- Unknown