Latest topics
» [GAME] Post a random picture
by SLGray Yesterday at 19:23

» [GAME] Count to 30 - Ange Edition
by SLGray Yesterday at 19:21

» [GAME] Count to One Million!
by SLGray Yesterday at 19:21

» Topic'It
by Ange Tuteur Yesterday at 10:06

» Topic'It
by SLGray Thu 21 Sep 2017, 15:52

» FM Themes
by SLGray Thu 21 Sep 2017, 15:51

» User - Made Creations
by SLGray Thu 21 Sep 2017, 15:50

» IconSkouliki
by skouliki Sun 17 Sep 2017, 11:05

» Awards
by Mr_Grande Sun 17 Sep 2017, 08:52

» Modify Category Tabs lead to a desired position and auto scroll click
by djblah Fri 15 Sep 2017, 14:56

» Display a preview of the user profile on hover
by Eiki Thu 14 Sep 2017, 02:38

» Rank CSS
by Mr_Grande Fri 08 Sep 2017, 09:24

» make the topic a color
by Ultimas Wed 06 Sep 2017, 19:44

» Chit Chat Thread
by Valoish Sun 03 Sep 2017, 23:20

» The like/thumbs up or down feature
by Dr.kran Sun 03 Sep 2017, 19:21

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

Eslam Love

[ 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 : 1476
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 : 4688
Points : 9735
Reputation : 2331
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 : 1476
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 : 4688
Points : 9735
Reputation : 2331
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 : 1476
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 : 4688
Points : 9735
Reputation : 2331
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 : 1476
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 : 4688
Points : 9735
Reputation : 2331
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 : 1476
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 : 4688
Points : 9735
Reputation : 2331
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