Recent Tutorials
Who is online?
In total there are 6 users online :: 1 Registered, 0 Hidden and 5 Guests

Niko!

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

CAN ANYONE HELP ME OUT WITH THIS ADS BOX CODE?

View previous topic View next topic Go down

Paradiseng

Title :
Gender : Male
Posts : 95
Points : 1179
Reputation : 17
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://www.nigerianpalace.com

PostParadiseng on Mon 05 Sep 2016, 10:39

HELLO @Ange Tuteur CAN YOU HELP ME OUT WITH THIS ADS BOX WHICH APPEARS ON THE RIGHT SIDE. I ALSO HAD THIS IN MY OLD THEME. BELOW IS THE CODE THAT MADE IT WORK ON PUN VERSION THEN.

Code:
$(function() {
  var new_content = '<div align="center">
    <script src="/"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>';
      fid = $('#navstrip li:last a')[0];
 
  if (fid) {
    fid = +fid.href.replace(/.*?\/f(\d+).*/, '$1');
 
    if (fid == 10 || 9) {
      $('div.post').eq(0).after(new_content);
    }
  }
});



Last edited by Paradiseng on Mon 05 Sep 2016, 12:26; edited 1 time in total
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8393
Reputation : 2009
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Mon 05 Sep 2016, 10:51

Hi @Paradiseng is this for Forumactif Edge or a regular forumotion forum ?
Paradiseng

Title :
Gender : Male
Posts : 95
Points : 1179
Reputation : 17
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://www.nigerianpalace.com

PostParadiseng on Mon 05 Sep 2016, 11:40

Yes, it is for Forumactif Edge forum

My forum url is http://www.nigerianpalace.com

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8393
Reputation : 2009
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Mon 05 Sep 2016, 13:06

@Paradiseng try using this script :
Code:
$(function() {
  var new_content = '<div align="center">
    <script src="/"></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>';
      fid = $('.breadcrumbs:first a:last')[0];
 
  if (fid) {
    fid = +fid.href.replace(/.*?\/f(\d+).*/, '$1');
 
    if (fid == 10 || 9) {
      $('div.post').eq(0).after(new_content);
    }
  }
});
Paradiseng

Title :
Gender : Male
Posts : 95
Points : 1179
Reputation : 17
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://www.nigerianpalace.com

PostParadiseng on Tue 06 Sep 2016, 08:52

@Ange Tuteur Thanks so much. I really appreciate your help but the issue here is that the ads box now appeared under the first post



Rather than in the post. Can you help me with the script that can push it into the post?
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8393
Reputation : 2009
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 06 Sep 2016, 12:29

@Paradiseng if you want it inside the post, change the word "after" to "append". This'll append the ad to the body of the post.
Paradiseng

Title :
Gender : Male
Posts : 95
Points : 1179
Reputation : 17
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://www.nigerianpalace.com

PostParadiseng on Tue 06 Sep 2016, 15:33

@Ange Tuteur wrote:@Paradiseng if you want it inside the post, change the word "after" to "append". This'll append the ad to the body of the post.

Thanks @Ange Tuteur. It is pretty but can you help me push it before the beginning of the post. It is at the end of the post right now.
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8393
Reputation : 2009
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 06 Sep 2016, 15:34

change "append" to "prepend" if you want the ad before the beginning of the post.
Paradiseng

Title :
Gender : Male
Posts : 95
Points : 1179
Reputation : 17
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://www.nigerianpalace.com

PostParadiseng on Tue 06 Sep 2016, 16:39

@Ange Tuteur wrote:change "append" to "prepend" if you want the ad before the beginning of the post.

Thank you @Ange Tuteur the thread is solved now
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8393
Reputation : 2009
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Thu 08 Sep 2016, 11:15

You're welcome ! ^^

Topic archived

Have a good day. Smile

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum