Latest topics
» help me about Latest topic
by Haytam Today at 12:47

» Display a preview of the user profile on hover
by Haytam Today at 12:39

» Starred Forums
by Ange Tuteur Today at 12:27

» Chit Chat Thread
by Ange Tuteur Today at 12:11

» Colored Bar Navigation
by Valoish Yesterday at 23:03

» FM Themes
by SLGray Thu 25 May 2017, 22:39

» User - Made Creations
by SLGray Thu 25 May 2017, 22:37

» Classified Ads
by SLGray Thu 25 May 2017, 19:23

» Categories as tabs on Edge!
by STBW Thu 25 May 2017, 04:11

» [GAME] What are you thinking right now?
by Ange Tuteur Wed 24 May 2017, 15:10

» [GAME] Countdown from 200,000
by Ange Tuteur Wed 24 May 2017, 15:09

» [GAME] Post a random picture
by Ange Tuteur Wed 24 May 2017, 15:08

» [GAME] What are you doing right now?
by Ange Tuteur Wed 24 May 2017, 15:06

» [GAME] Count to 30 - Ange Edition
by Ange Tuteur Wed 24 May 2017, 15:05

» [GAME] Count to One Million!
by Ange Tuteur Wed 24 May 2017, 15:05

Recent Tutorials
Who is online?
In total there are 8 users online :: 2 Registered, 0 Hidden and 6 Guests :: 2 Bots

Haytam, Luffy

[ 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

avatar
Paradiseng

Title :
Gender : Male
Posts : 98
Points : 1356
Reputation : 19
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
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave 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 ?
avatar
Paradiseng

Title :
Gender : Male
Posts : 98
Points : 1356
Reputation : 19
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

avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave 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);
    }
  }
});
avatar
Paradiseng

Title :
Gender : Male
Posts : 98
Points : 1356
Reputation : 19
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?
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave 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.
avatar
Paradiseng

Title :
Gender : Male
Posts : 98
Points : 1356
Reputation : 19
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.
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave 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.
avatar
Paradiseng

Title :
Gender : Male
Posts : 98
Points : 1356
Reputation : 19
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
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave 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