Latest topics
» Dark Theme Help
by Haggis Yesterday at 21:25

» Forumactif Edge - Greek Translation
by Van-Helsing Yesterday at 18:34

» Auto-suggest Plugin execute Javascript
by MiyakeDev Yesterday at 16:42

» Forumactif Edge - Releases
by Ange Tuteur Yesterday at 15:12

» Forumactif Edge - Arabic Translation
by Ange Tuteur Yesterday at 12:48

» bug in update color
by Ange Tuteur Yesterday at 12:20

» Gateway to Role-Play
by JerriLeah7 Sun 26 Mar 2017, 15:40

» [GAME] Count to One Million!
by brandon_g Sun 26 Mar 2017, 11:51

» Happy Birthday Thread
by brandon_g Sun 26 Mar 2017, 11:50

» Forumactif Edge Web Page - Translations
by Ange Tuteur Sat 25 Mar 2017, 18:06

» Quick Reply Bug
by Ange Tuteur Sat 25 Mar 2017, 17:44

» Forumactif Edge - Portuguese Translation (Brazilian)
by Ange Tuteur Sat 25 Mar 2017, 17:40

» Adding text to reputation counter
by Ange Tuteur Thu 23 Mar 2017, 17:19

» Forumactif Edge - Spanish Translation
by Ange Tuteur Thu 23 Mar 2017, 16:24

» How do I add hover examine feature?
by dr.kran Thu 23 Mar 2017, 06:18

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

STBW

[ 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 : 1296
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 : 4393
Points : 9046
Reputation : 2187
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 : 1296
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 : 4393
Points : 9046
Reputation : 2187
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 : 1296
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 : 4393
Points : 9046
Reputation : 2187
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 : 1296
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 : 4393
Points : 9046
Reputation : 2187
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 : 1296
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 : 4393
Points : 9046
Reputation : 2187
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