vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   Solved - Experimenting with ads --> Getting frustrated (https://vborg.vbsupport.ru/showthread.php?t=327004)

Stefan118 01-03-2019 11:59 AM

Solved - Experimenting with ads --> Getting frustrated
 
With the help of this 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.

HTML Code:

<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,401,834,836,838,840,231,405,411,409,431,487,407,232,413,468,465,241,475,473,469,471,233,485,257,345,415,19,46,59,417,556,534,552,564,558,586,570,832,550,584,546,568,544,580,554,574,536,562,540,582,572,542,548,566,576,560,578,538,419,530,820,822,235,421,423,425,427,429,236,433,824,435,437,439,37,223,351,441,258,259,227,375,377,379,381,383,385,228,389,168,387,255,256,22,234,254,273,285,349,373,816,818,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,25,211,289,532,814,276,212,293,295,297,299,61,260,369,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,829,238,447,449,451,864,453,455,239,457,459,461,463,29,215,315,606,608,610,612,614,616,618,317,216,319,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,110,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,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,34,219,331,712,772,792,624,700,682,794,704,740,664,734,716,764,660,738,710,746,862,782,640,698,784,742,790,650,786,758,646,788,732,730,728,726,724,800,722,714,708,706,798,802,702,696,694,692,690,688,686,684,804,806,808,796,810,774,776,780,778,770,756,750,768,766,720,718,762,680,678,676,760,654,648,644,638,636,634,632,630,622,620,748,754,752,744,674,672,670,668,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,82,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,129,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("&nbsp;&nbsp;");
    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("&nbsp;&nbsp;");
    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
HTML Code:

in_array
to
HTML Code:

!in_array
the ads are only shown on the main page and nowhere else.
HTML Code:

<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.


All times are GMT. The time now is 07:59 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.01008 seconds
  • Memory Usage 1,727KB
  • 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
  • (4)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete