[RC] Adsense & Ads for phpBB

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Post Reply
User avatar
Stoker 4.0
Registered User
Posts: 1417
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

[RC] Adsense & Ads for phpBB

Post by Stoker 4.0 » Mon Feb 01, 2016 9:44 pm

Extension Name: Adsense & Ads for phpBB
Author: Stoker

Description:
The Adsense & Ads for phpBB EXT gives you option to use Adsense and other ads all over your board.
  1. Banner in header, display on all pages except UCP
  2. Banner in footer, display on all pages except UCP
  3. 3 Banners in viewtopic
  4. Banner in all search results
  5. Configuration in ACP
  6. Option for Adblock message, displays for user with Adblock enabled
  7. Option for Noscript message, displays for users with javascript disabled
  8. Option for blocking entire topics for ad block users
  9. Admin testmode, only admin can view ads. Good for testing
  10. Permission based. You can set permissions for users and groups to view ads. Default all groups except Bots can view ads
    Users with permissions can enable/disable ads in UCP and are allowed to use adblockers. Users without permissions will see the option but will not be able to use it. Will work both on 3.1.X and 3.2.X
  11. Enable/disable the loading.gif
  12. Choose background color for each ad container
  13. Adsense Page-Level ads for mobile content
Version: 1.0.7


Demo: PhpBB3 BBCodes


Image
Image
Image

Download:
Download Adsense & Ads for phpBB

Installation:
  1. Copy the entire contents of the repository to ext/stoker/adsenseads/
  2. Navigate in the ACP to Customise -> Extension Management -> Extensions.
  3. Click Enable.
  4. Navigate in the ACP -> Extensions and configure
Last edited by Stoker 4.0 on Tue Aug 09, 2016 11:48 am, edited 3 times in total.

User avatar
KhurramMunawar
Registered User
Posts: 512
Joined: Tue Mar 25, 2014 2:20 am
Location: Islamabad, Pakistan
Name: Khurram Munawar
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by KhurramMunawar » Mon Feb 01, 2016 9:59 pm

by extension name, it seems like this extension is only support adsense code.

However it support all codes.

thanks for the nice extension.
Image

User avatar
Lumpy Burgertushie
Registered User
Posts: 63196
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by Lumpy Burgertushie » Mon Feb 01, 2016 10:34 pm

are you aware that putting adsense in the search results pages and many other pages of phpbb will be in violation of google's adsense terms?


most of the time, it is suggested that the only pages to put adsense on are the index, viewtopic and viewforum pages.



robert
I am available for custom work on a donation basis. Please send me a PM with your needs.
Premium phpBB 3.2 Styles by PlanetStyles.net

New phpbb 3.0 support site

User avatar
ForoXL
Registered User
Posts: 48
Joined: Wed Feb 04, 2015 4:57 pm
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by ForoXL » Mon Feb 01, 2016 11:44 pm

Good work!!
http://www.ForoXL.com - Foro dedicado a temas generales

User avatar
KhurramMunawar
Registered User
Posts: 512
Joined: Tue Mar 25, 2014 2:20 am
Location: Islamabad, Pakistan
Name: Khurram Munawar
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by KhurramMunawar » Tue Feb 02, 2016 12:58 am

Lumpy Burgertushie wrote:are you aware that putting adsense in the search results pages and many other pages of phpbb will be in violation of google's adsense terms?

its optional in the extension , infact every placement is optional for the user. ;)
Image

User avatar
Stoker 4.0
Registered User
Posts: 1417
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by Stoker 4.0 » Tue Feb 02, 2016 5:00 am

Lumpy Burgertushie wrote:are you aware that putting adsense in the search results pages and many other pages of phpbb will be in violation of google's adsense terms?


most of the time, it is suggested that the only pages to put adsense on are the index, viewtopic and viewforum pages.



robert
I know, but you can put other ads than adsense in those places. Use a custom ad or even a special message if you want.

Holger
Registered User
Posts: 1580
Joined: Tue Mar 12, 2002 3:54 pm
Location: Hannover

Re: [RC] Adsense & Ads for phpBB

Post by Holger » Tue Feb 02, 2016 10:45 am

Very nice! Thanks!
Are you looking for a phpBB Expert? Find a phpBB Expert!
Are you a phpBB Expert? Post your resume!
http://www.phpbbexperts.com

Kam3leoN
Registered User
Posts: 24
Joined: Sun Oct 04, 2015 9:02 pm

Re: [RC] Adsense & Ads for phpBB

Post by Kam3leoN » Tue Feb 02, 2016 2:27 pm

Hi ^^

Is it possible to insert an advertisement into two categories / forums.
For example :
- Between categories / forums 1 & 2
- Between categories / forums 2 & 3
  etc., etc...

Cheers

User avatar
Stoker 4.0
Registered User
Posts: 1417
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by Stoker 4.0 » Tue Feb 02, 2016 3:06 pm

Kam3leoN wrote:Hi ^^

Is it possible to insert an advertisement into two categories / forums.
For example :
- Between categories / forums 1 & 2
- Between categories / forums 2 & 3
  etc., etc...

Cheers
Everything is possible ;)

But only manually for the moment. Create a file named forumlist_body_category_header_after.html
Place something like this in it:

Code: Select all

<!-- IF U_SEE_ADS -->
<!-- IF SCRIPT_NAME eq 'index' and (forumrow.S_ROW_COUNT == 4 or forumrow.S_ROW_COUNT == 14) -->
<li class="row" style="background-color:#F4F4F4;;">
<dl>
	<div class="list-inner" style="width:100%;height:90px;margin-top:-2px;background: url('{ROOT_PATH}images/loading.gif') no-repeat center center;">
	ad code here
	</div>
</dl>
</li>
<!-- ENDIF -->

<!-- IF forumrow.S_ROW_COUNT == 1 and (FORUM_ID eq 133 or FORUM_ID eq 135 or FORUM_ID eq 139 or FORUM_ID eq 147 or FORUM_ID eq 199 or FORUM_ID eq 204) -->
<li class="row" style="background-color:#F4F4F4;">
<dl>
	<div class="list-inner" style="width:100%;height:90px;margin-top:-2px;background: url('{ROOT_PATH}images/loading.gif') no-repeat center center;">
	ad code here
	</div>
</dl>
</li>
<!-- ENDIF -->		
<!-- ENDIF -->

User avatar
KhurramMunawar
Registered User
Posts: 512
Joined: Tue Mar 25, 2014 2:20 am
Location: Islamabad, Pakistan
Name: Khurram Munawar
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by KhurramMunawar » Tue Feb 02, 2016 6:43 pm

if the adblocker installed on browser and adblocker message is not being activated in the extension:

the loading indicator is showing up at the ad place.

i think this loading indicator should not be in place and ad simply should not be shown in case of ad blocker.
Image

User avatar
Stoker 4.0
Registered User
Posts: 1417
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by Stoker 4.0 » Tue Feb 02, 2016 7:37 pm

KhurramMunawar wrote:if the adblocker installed on browser and adblocker message is not being activated in the extension:

the loading indicator is showing up at the ad place.

i think this loading indicator should not be in place and ad simply should not be shown in case of ad blocker.
Good idea, will fix in next version ;)

User avatar
John connor
Registered User
Posts: 1362
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by John connor » Thu Feb 04, 2016 7:33 am

Nice. Great work. I'll have a look at this in my test site under Xampp. You indicated to me this is Prosilver based? Aero is Prosilver based I guess so I shall see if this works.

User avatar
Stoker 4.0
Registered User
Posts: 1417
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by Stoker 4.0 » Thu Feb 04, 2016 8:59 am

John connor wrote:Nice. Great work. I'll have a look at this in my test site under Xampp. You indicated to me this is Prosilver based? Aero is Prosilver based I guess so I shall see if this works.
I think it will work with Aero, but please let me know when you have testet it

User avatar
John connor
Registered User
Posts: 1362
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by John connor » Thu Feb 04, 2016 3:27 pm

Will do. Been busy here so haven't had the time yet.

User avatar
John connor
Registered User
Posts: 1362
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Contact:

Re: [RC] Adsense & Ads for phpBB

Post by John connor » Sat Feb 06, 2016 5:01 am

Okay. Finally tested this. Works in Aero. However I don't use ADcode and tried my own code out and now it appears on the top in index and other forums. Might be the code. My code stays in the footer.

Image: http://i.imgur.com/EqLNQZZ.jpg

Code:

Code: Select all

<!-- Begin of Site Has Been Around For -->
<script language="javascript">
function DateEstablished(startmonth, startdate, startyear) {
sdate=startdate;
smonth=startmonth-1;
syear=startyear;
var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
today = new Date()
var thisyear = today.getFullYear();
var thismonth = today.getMonth();
var thisdate = today.getDate();
mstart = new Date(syear,(smonth==12?1:smonth+1),1);
days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1;
mend = new Date(thisyear,thismonth,1);
days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1;
dayst = days1 + days2;
if (dayst >= DaysInMonth[smonth])  {
AddOneMonth = 1;
dayst -= DaysInMonth[smonth];
}
else AddOneMonth = 0;
ydiff1 = thisyear-mstart.getFullYear();
mdiff1 = thismonth-mstart.getMonth()+AddOneMonth;
if (mdiff1 >11) { mdiff1=0; ydiff1++; }
if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; }
temp = (ydiff1==0?"":(ydiff1==1?ydiff1+" year and ":ydiff1 + " years, "));
temp += (mdiff1==0?"0 months, and ":(mdiff1==1?mdiff1+" month, and ":mdiff1+" months, and "));
temp += (dayst==0?"no days.":(dayst==1 ? " 1 day." : dayst + " days." ));
return temp;
}
</script>
<center><script language="javascript">
document.write("<font face=Courier New>");
document.write("<font size=2>");
document.write("<font color=#6633FF>");
document.write("SysTechForum Has Been Around For ");
document.write("<font color=#F80000>");
document.write(DateEstablished(11,12,2014));  
document.write("</font>");
document.write("</font>");
document.write("</font>");
document.write("</font>");
document.write("</font>");
</script>   
<!-- End of Site Has Been Around For -->
What I'm trying to do is make sure users don't have an ADblocker on or blocking scripts since I use the extension mediaembed and using an ADblocker blocks some content. I use JS to play audio on the site.

Post Reply

Return to “Extensions in Development”

Who is online

Users browsing this forum: nou nou, panhead, RomaamoR, zorni and 27 guests