Latest topics
» [Bug] The theme selector with Firefox
by Milouze14 Yesterday at 21:21

» Imagine in statistics
by Dr Jay Yesterday at 20:56

» [Suggestion] Coders- Team up with me: Design loading screen for mobile devices
by Bigtuber Yesterday at 14:16

» [GAME] Count to One Million!
by Valoish Yesterday at 13:36

» [GAME] Post a random picture
by Valoish Yesterday at 13:36

» Ranks icon
by MAX Yesterday at 12:28

» Add Signature Resizing To Your Forum
by Dr Jay Thu 23 Feb 2017, 15:53

» phpbb2: Removal of Last Visit/Unanswered Posts Table
by Spherical Thu 23 Feb 2017, 13:19

» phpbb2: Removal of Top Posters/Mark Forums Read Table
by Spherical Thu 23 Feb 2017, 13:18

» [EDGE] Protocol HTTPS
by Milouze14 Wed 22 Feb 2017, 13:34

» IconSkouliki
by skouliki Tue 21 Feb 2017, 03:56

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Sat 18 Feb 2017, 15:50

» Multi-step Login Form
by Samantha Sat 18 Feb 2017, 10:32

» Support Forum both chat and web developments
by MAX Sat 18 Feb 2017, 06:40

» Share Link Above Topics
by SLGray Fri 17 Feb 2017, 16:35

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

None

[ 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 : 98
Points : 1265
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
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4294
Points : 8840
Reputation : 2137
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 : 98
Points : 1265
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

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4294
Points : 8840
Reputation : 2137
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 : 98
Points : 1265
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?
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4294
Points : 8840
Reputation : 2137
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 : 98
Points : 1265
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.
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4294
Points : 8840
Reputation : 2137
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 : 98
Points : 1265
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
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4294
Points : 8840
Reputation : 2137
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