Stefan118
01-03-2019, 11:59 AM
With the help of this (https://www.vbulletin.com/forum/forum/vbcloud/vbulletin-cloud-questions-problems-and-troubleshooting/4322138-managing-and-placing-ads) page i managed to create some advertisement on my forum.
The only problem is, when i select 1 or multipe forums to show the ads in, it doesn't work and the ads are shown nowhere at all.
The ads are only shown when i DO NOT select any forum, but only select the time between 00:00 and 23:59.
I found out the ads code is stored in the template ad_173, so i took a look at the raw code.
I can't find anything wrong with it.
Does someone have any idea?
The ad module is placed here:
https://vborg.vbsupport.ru/external/2019/01/1.bmp
This is the code i found in the template. Sorry for the long script, but that is because i want the ads shown in every forum i have except for two and the subforums in them.
<div class="ad_173_inner">
<vb:if condition="in_array($page['channelid'], array(2,17,18,41,40,42,230,403,397,393,497,842,844 ,846,848,850,852,854,856,858,860,483,395,391,399,4 01,834,836,838,840,231,405,411,409,431,487,407,232 ,413,468,465,241,475,473,469,471,233,485,257,345,4 15,19,46,59,417,556,534,552,564,558,586,570,832,55 0,584,546,568,544,580,554,574,536,562,540,582,572, 542,548,566,576,560,578,538,419,530,820,822,235,42 1,423,425,427,429,236,433,824,435,437,439,37,223,3 51,441,258,259,227,375,377,379,381,383,385,228,389 ,168,387,255,256,22,234,254,273,285,349,373,816,81 8,812,208,261,264,265,263,262,221,353,355,347,329, 357,24,209,266,275,277,279,281,283,477,481,479,267 ,210,268,269,270,271,287,224,359,361,363,365,367,2 5,211,289,532,814,276,212,293,295,297,299,61,260,3 69,371,26,213,301,512,514,516,518,520,522,524,526, 528,508,510,303,214,305,307,309,311,313,47,237,443 ,596,598,600,604,590,592,594,602,588,428,825,827,8 29,238,447,449,451,864,453,455,239,457,459,461,463 ,29,215,315,606,608,610,612,614,616,618,317,216,31 9,321,323,325,327,27,62,63,64,65,66,67,68,69,70,71 ,72,73,74,75,76,77,78,79,30,105,106,107,108,109,11 0,111,112,31,96,97,32,113,114,115,116,117,118,119, 120,33,148,149,150,151,152,153,154,155,156,157,158 ,159,160,161,162,163,164,165,166,167,169,170,171,1 72,173,174,175,176,177,178,179,180,181,182,183,184 ,185,186,188,189,190,191,192,193,194,195,196,197,1 98,199,200,201,202,203,204,205,206,207,34,219,331, 712,772,792,624,700,682,794,704,740,664,734,716,76 4,660,738,710,746,862,782,640,698,784,742,790,650, 786,758,646,788,732,730,728,726,724,800,722,714,70 8,706,798,802,702,696,694,692,690,688,686,684,804, 806,808,796,810,774,776,780,778,770,756,750,768,76 6,720,718,762,680,678,676,760,654,648,644,638,636, 634,632,630,622,620,748,754,752,744,674,672,670,66 8,666,662,658,656,652,642,628,626,736,333,220,335, 337,339,341,343,246,489,491,493,495,496,28,80,81,8 2,83,84,85,86,87,88,89,90,91,92,93,94,95,98,99,100 ,101,102,103,104,121,122,123,124,125,126,127,128,1 29,130,131,132,133,134,135,136,137,138,139,140,141 ,142,143,144,145,146,147,21,54,242,243,244,245,14, 39,49,48,35,38,50,43,217,218,57,36,15,23))"><vb:literal>
<script type="text/Javascript">
var imgPath1 = "advertentie_zupreem.jpg";
var imgPath2 = "week_aanbieding_lorreco.jpg";
var imgPath3 = "Lorreco_papegaaien.gif";
var imgAltL = "Lorre & Co, Groothandel & papegaaienspeciaalzaak.";
var imgAltM = "Lorre & Co, Groothandel & papegaaienspeciaalzaak.";
var imgAltR = "Ook voor aanschaf van een papegaai gaat u naar: Lorre & Co, Groothandel & papegaaienspeciaalzaak.";
{
document.write("<a href=https://www.lorreco.nl/voeding/pellet/zupreem target=_new><img src='/images/advertenties/" + imgPath1 + "' img title='" + imgAltL + "' alt='" + imgAltL + "' width='30%'></a>");
document.write(" ");
document.write("<a href=https://www.lorreco.nl/week-aanbieding target=_new><img src='/images/advertenties/" + imgPath2 + "' img title='" + imgAltM + "' alt='" + imgAltM + "' width='35%'></a>");
document.write(" ");
document.write("<a href=http://www.lorreco.nl/papegaaien target=_new><img src='/images/advertenties/" + imgPath3 + "' img title='" + imgAltR + "' alt='" + imgAltR + "' width='30%'></a>");
}
</script></vb:literal><vb:if condition="$adsshown[] = 17"></vb:if></vb:if></div>
The other way around, if i only select the 2 forums and the subforums that they should not be shownd in, and edit the script in_array to !in_array the ads are only shown on the main page and nowhere else.
<div class="ad_173_inner"><vb:if condition="!in_array($page['channelid'], array(20,58,51,55,53))"><vb:literal>
Edit:
Found it!
Didn't thought about it to add a second ad-module in the subforums.
I must say, i do not like the page editor. Used to use the AdminCp for editting templates which was much more clear about what template you were editing.
The only problem is, when i select 1 or multipe forums to show the ads in, it doesn't work and the ads are shown nowhere at all.
The ads are only shown when i DO NOT select any forum, but only select the time between 00:00 and 23:59.
I found out the ads code is stored in the template ad_173, so i took a look at the raw code.
I can't find anything wrong with it.
Does someone have any idea?
The ad module is placed here:
https://vborg.vbsupport.ru/external/2019/01/1.bmp
This is the code i found in the template. Sorry for the long script, but that is because i want the ads shown in every forum i have except for two and the subforums in them.
<div class="ad_173_inner">
<vb:if condition="in_array($page['channelid'], array(2,17,18,41,40,42,230,403,397,393,497,842,844 ,846,848,850,852,854,856,858,860,483,395,391,399,4 01,834,836,838,840,231,405,411,409,431,487,407,232 ,413,468,465,241,475,473,469,471,233,485,257,345,4 15,19,46,59,417,556,534,552,564,558,586,570,832,55 0,584,546,568,544,580,554,574,536,562,540,582,572, 542,548,566,576,560,578,538,419,530,820,822,235,42 1,423,425,427,429,236,433,824,435,437,439,37,223,3 51,441,258,259,227,375,377,379,381,383,385,228,389 ,168,387,255,256,22,234,254,273,285,349,373,816,81 8,812,208,261,264,265,263,262,221,353,355,347,329, 357,24,209,266,275,277,279,281,283,477,481,479,267 ,210,268,269,270,271,287,224,359,361,363,365,367,2 5,211,289,532,814,276,212,293,295,297,299,61,260,3 69,371,26,213,301,512,514,516,518,520,522,524,526, 528,508,510,303,214,305,307,309,311,313,47,237,443 ,596,598,600,604,590,592,594,602,588,428,825,827,8 29,238,447,449,451,864,453,455,239,457,459,461,463 ,29,215,315,606,608,610,612,614,616,618,317,216,31 9,321,323,325,327,27,62,63,64,65,66,67,68,69,70,71 ,72,73,74,75,76,77,78,79,30,105,106,107,108,109,11 0,111,112,31,96,97,32,113,114,115,116,117,118,119, 120,33,148,149,150,151,152,153,154,155,156,157,158 ,159,160,161,162,163,164,165,166,167,169,170,171,1 72,173,174,175,176,177,178,179,180,181,182,183,184 ,185,186,188,189,190,191,192,193,194,195,196,197,1 98,199,200,201,202,203,204,205,206,207,34,219,331, 712,772,792,624,700,682,794,704,740,664,734,716,76 4,660,738,710,746,862,782,640,698,784,742,790,650, 786,758,646,788,732,730,728,726,724,800,722,714,70 8,706,798,802,702,696,694,692,690,688,686,684,804, 806,808,796,810,774,776,780,778,770,756,750,768,76 6,720,718,762,680,678,676,760,654,648,644,638,636, 634,632,630,622,620,748,754,752,744,674,672,670,66 8,666,662,658,656,652,642,628,626,736,333,220,335, 337,339,341,343,246,489,491,493,495,496,28,80,81,8 2,83,84,85,86,87,88,89,90,91,92,93,94,95,98,99,100 ,101,102,103,104,121,122,123,124,125,126,127,128,1 29,130,131,132,133,134,135,136,137,138,139,140,141 ,142,143,144,145,146,147,21,54,242,243,244,245,14, 39,49,48,35,38,50,43,217,218,57,36,15,23))"><vb:literal>
<script type="text/Javascript">
var imgPath1 = "advertentie_zupreem.jpg";
var imgPath2 = "week_aanbieding_lorreco.jpg";
var imgPath3 = "Lorreco_papegaaien.gif";
var imgAltL = "Lorre & Co, Groothandel & papegaaienspeciaalzaak.";
var imgAltM = "Lorre & Co, Groothandel & papegaaienspeciaalzaak.";
var imgAltR = "Ook voor aanschaf van een papegaai gaat u naar: Lorre & Co, Groothandel & papegaaienspeciaalzaak.";
{
document.write("<a href=https://www.lorreco.nl/voeding/pellet/zupreem target=_new><img src='/images/advertenties/" + imgPath1 + "' img title='" + imgAltL + "' alt='" + imgAltL + "' width='30%'></a>");
document.write(" ");
document.write("<a href=https://www.lorreco.nl/week-aanbieding target=_new><img src='/images/advertenties/" + imgPath2 + "' img title='" + imgAltM + "' alt='" + imgAltM + "' width='35%'></a>");
document.write(" ");
document.write("<a href=http://www.lorreco.nl/papegaaien target=_new><img src='/images/advertenties/" + imgPath3 + "' img title='" + imgAltR + "' alt='" + imgAltR + "' width='30%'></a>");
}
</script></vb:literal><vb:if condition="$adsshown[] = 17"></vb:if></vb:if></div>
The other way around, if i only select the 2 forums and the subforums that they should not be shownd in, and edit the script in_array to !in_array the ads are only shown on the main page and nowhere else.
<div class="ad_173_inner"><vb:if condition="!in_array($page['channelid'], array(20,58,51,55,53))"><vb:literal>
Edit:
Found it!
Didn't thought about it to add a second ad-module in the subforums.
I must say, i do not like the page editor. Used to use the AdminCp for editting templates which was much more clear about what template you were editing.