#eb7100
33409
0
1
May 7, 2024 12:17:33 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 5, 2014 11:36:59 GMT -8
Hi Brian, I intent to add an 300*250 ad in the first and last posts and a thin-large ad banner, e.g. 725*80 (as a ref) in odd posts. ^ The way that you originally worded it was that you only wanted the 300x250 ad in the first and last posts while you only wanted the wide ad before every odd post, so I coded it that way. Based on the quoted post the only thing that's really missing is the 300x250 ad in the last post.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 5, 2014 11:43:41 GMT -8
Yes, yes, is totally correct. Is working as expected. What I do not understand is what code is filtering only to show intrapost in the first post. Is just to understand if I would need any change or maybe switch to another ad network. Can you point me out to how did you manage to filter to only show the first message? apparently there is not this IF sentence when showing the ad... I am just curious <!-- advert intra post --> <div class="message"> <div class="advertisement"></div> $[post.message] </div> <!-- end advert intra post --> But it can be kept as is now. Is correct until I have more traffic and do some optimization.....
|
|
#eb7100
33409
0
1
May 7, 2024 12:17:33 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 5, 2014 11:50:36 GMT -8
This is a placeholder for the advertisement in the Post List. It's in every post.
In the Thread template is this line which tells the page to find the above code in the first post only and add the 300x250 ad to it.
If you want to add a different ad to the last post you'll need to duplicate the function that contains that code and change a few things, which I can do for you if you'd like.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 5, 2014 11:53:45 GMT -8
yes, Brian, great, thanks for the explanation. These chitika ads looks a bit ugly. I will change some of them in a few days, but the issue looks to be fixed. Thanks man, great support.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 8, 2014 8:35:44 GMT -8
Hello, I am trying to improve a bit the intra post advert (current are ugly and do not see meaningful analytics) with this script which belongs to another ad network:
<script type="text/javascript"><!-- document.write('<s'+'cript type="text/javascript" src="http://cpm.edomz.com/show.php?z=62&pl=16130&j=1&code='+new Date().getTime()+'"></s'+'cript>'); // --></script> <noscript> <iframe src="http://cpm.edomz.com/show.php?z=62&pl=16130" width="300" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> </noscript> I took out the part of noscript and did a code replacement in Thread template of existing code in adFirst() function by (currently in place but commented out):
$('.posts .first .advertisement').append('<s'+'cript type="text/javascript" src="http://cpm.edomz.com/show.php?z=62&pl=16130&j=1&code='+new Date().getTime()+'"></s'+'cript>'); but it shows the page correctly with no advert and throws a javascript exception:
An error occurred during a document.ready call: TypeError: Cannot read property 'data' of undefined While executing: function () { shorty_thread_descriptions.init(); } Uncaught SyntaxError: Unexpected token ILLEGAL pbid.pro-market.net/engine?site=131222;size=1x1;e=0;category=qwerzn7ur4r;kw…tt%203np%20w67zc1iu%20shsm15%20-%20xxfyiowdats%20w08;rnd=(1407515188330):7 Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. A second test that I did was adding the advert to PostList by replacing current ad at <!--advert intra post --> and, this time, I can see the ad (a better looking ad indeed), and the page structure, but I can not see anything else in the thread, posts' body and posts' header/footer are gone, and I get:
An error occurred during a document.ready call: TypeError: Cannot read property 'data' of undefined While executing: function () { shorty_thread_descriptions.init(); } Uncaught SyntaxError: Unexpected token ILLEGAL pbid.pro-market.net/engine?site=131222;size=1x1;e=0;category=qwerzn7ur4r;kw…tt%203np%20w67zc1iu%20shsm15%20-%20xxfyiowdats%20w08;rnd=(1407515459148):7 Anything obvious I am missing? Unfortunately this is another case of document.write.
Well, is not an urgent request if solution is not straightforward.
Thanks
Update: I did 1 impression while testing and I earned $0.00002 so at least is moving. With current advert I have 5.000 page views and $0 (lots are mine but lots no), so the change is definitely worth. I wait for this change to hit the market as so far I have not advertised except for some friends.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 11, 2014 15:43:09 GMT -8
hello, any help on this change please?
|
|
#eb7100
33409
0
1
May 7, 2024 12:17:33 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 11, 2014 16:04:15 GMT -8
The part of the code you're replacing is telling it to insert that code's script portion into every single post when it should only show once on the page.
Assuming the iframe is where the actual ad will show you'll want to place the iframe's HTML into the adFirst() function, not the script. The script portion can be placed as is at the very beginning of the Thread template by itself, outside of any other functions.
Anything with document.write in it is not going to work as part of the post list.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 11, 2014 21:46:56 GMT -8
Well, yes, and potentially anything with <script> has the same problem in this posts area. I tried this code, without document.write, for a rotated ad and it shows all ads together at the top.
<!-- START AD CODE --> <script language="javascript" type="text/javascript" charset="utf-8"> cpxcenter_width = 300; cpxcenter_height = 250; </script> <script language="JavaScript" type="text/javascript" src="http://ads.cpxcenter.com/cpxcenter/showAd.php?nid=4&zone=73508&type=banner&sid=54873&pid=52855&subid=&opt1=&opt2="> </script> <!-- END AD CODE -->
Whenever you want a rotated ad, the code will be an <script>. Same for any CPM campaign.
So this area looks to be limited to a direct HTML ad (e.g. <a><img ...></a>), probably an affiliate CPA or a CPL. And if the board is meant to be shown in different countries, this ad must be an English ad, as this is the only language for all countries, and cannot be rotated or has language specific ads. Lot of limitations in this area actually, but I cannot figure out either any easy solution.
I suppose same issue is happening in forums.net....
Thanks
|
|
#eb7100
33409
0
1
May 7, 2024 12:17:33 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 12, 2014 8:00:16 GMT -8
Forums.net uses the same software and would therefore present the same problem if trying to insert ads between posts.
If the ad is absolutely dependent on using script tags or document.write to generate the actual ad I would have no idea how to to make that work with our list manager. Sorry.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 12, 2014 13:26:59 GMT -8
Hi Brian, just to amend this thread if someone else has the same issue, I was advised by Patrick to place the advert in an iframe pointing to an external file with the ad, and.... it worked. So, if not further problems arise, this can the solution to the issue. I do not know if I can upload this external file somewhere to proboards instead having my own HTTP server but the issue is fixed anyway. You can see here ponzinomics.org/thread/59/argentina-declared-defaultThanks for your support
|
|
#eb7100
33409
0
1
May 7, 2024 12:17:33 GMT -8
Brian
48,129
November 2004
smashmaster3
|
Post by Brian on Aug 12, 2014 13:30:05 GMT -8
That's actually super smart. I hardly ever use iframes so that didn't even cross my mind.
|
|
inherit
211778
0
Aug 3, 2016 11:36:21 GMT -8
ponzinomics
250
July 2014
ponzinomics
|
Post by ponzinomics on Aug 12, 2014 13:34:17 GMT -8
It makes sense, if you realise the code I pasted above from one of the ad networds, they also provide this iframe strategy for the <noscript> case. :-) <script type="text/javascript"><!-- document.write('<s'+'cript type="text/javascript" src="http://cpm.edomz.com/show.php?z=62&pl=16130&j=1&code='+new Date().getTime()+'"></s'+'cript>'); // --></script>
<noscript> <iframe src="http://cpm.edomz.com/show.php?z=62&pl=16130" width="300" height="250" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe> </noscript>
Regards
|
|