[MODDB] Inline Banner Ad

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

[MODDB] Inline Banner Ad

Post by geocator » Thu Oct 14, 2004 9:00 pm

This MOD is now available at: http://www.phpbb.com/phpBB/viewtopic.php?t=232463 . All support should be obtained there. Thank You.
Last edited by geocator on Sun Jul 24, 2005 9:42 pm, edited 14 times in total.

lover
I've Been Banned!
Posts: 46
Joined: Thu Sep 02, 2004 11:14 pm

Post by lover » Thu Oct 14, 2004 10:12 pm

No offense but wouldnt that be annoying. a adsense after every post.

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Thu Oct 14, 2004 10:19 pm

I had typed worng, it places one ad on the page, directly after the first post.

Mayan Obsidian
Registered User
Posts: 78
Joined: Sun Aug 17, 2003 7:12 am
Location: Madison, wI
Contact:

Let's milk visitors of their preeeeecious clicks!!

Post by Mayan Obsidian » Thu Oct 14, 2004 10:51 pm

This mod is a good idea, but it would be even more useful if we didn't have to hardcode the adsense code into the viewtopic.php. My suggestion is to add an ACP menu where the admin can customize the adsense code per template.

Other than that, keep up the good work :wink:
It's better to fail at doing something then to excel at doing nothing.

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Thu Oct 14, 2004 10:59 pm

Heres the thing I dont use AdSense myself, I just made this in response to a request. However if someone would provide a few more details on how exactley the HTML code works, I would be happy to put it in the admin panel.

wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric » Fri Oct 15, 2004 1:13 am

Code: Select all

<tr><td colspan=2 class="google"><script type="text/javascript"><!--
      google_ad_client = "PUT YOURS HERE";
      google_ad_width = 728;
      google_ad_height = 90;
      google_ad_format = "728x90_as";
      google_color_border = "006699";
      google_color_bg = "EFEFEF";
      google_color_link = "FF6600";
      google_color_url = "006699";
      google_color_text = "000000";
      //--></script>
      <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
      </script>
      </td></tr>
Make it so that code is stored in the database and can be changed in the ACP. I think that is what Mayan Obsidian wants. That way users can change the banner that is after the first post easily. Also they don't have to use Adsense if they don't want to.
Eric

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Fri Oct 15, 2004 2:10 am

Thanks for the ideas guys, I have updated to use the admin panel, and allow any banner add code.

duncancarver
Registered User
Posts: 55
Joined: Thu Jul 10, 2003 1:38 pm

Post by duncancarver » Fri Oct 15, 2004 4:52 am

Hi Geocator,

Thanks for this mate. I was the one who suggested this mod (or asked if it was possible without expectation) and was about to give it a shot but only have about 30 minutes before I shoot off so I'll have to test it tomorrow. Has any one got any working examples as of yet? I'll post one tomorrow if I manage to pull it off successfully.

As for...
No offense but wouldnt that be annoying. a adsense after every post.


No offence taken, but if you don't like this idea (even though it's only one ad after the very first post), you don't have to incorporate it do you? Simple as that ;-)

Best...

Duncan Carver

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Fri Oct 15, 2004 9:36 pm

I have it working on my dev server just fine. So I know it works pretty well.

duncancarver
Registered User
Posts: 55
Joined: Thu Jul 10, 2003 1:38 pm

Post by duncancarver » Sat Oct 16, 2004 4:25 am

Hi Guys,

I'm not sure what I'm missing but I've tried this twice on two clean installations and couldn't get it working either time. All it seemed to do was to make the borders around the message body and subject input boxes bolded black. Was this supposed to add some function to the admin area as nothing has changed in there either? I'm running 2.0.8.

Best...

Duncan

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Sat Oct 16, 2004 4:29 am

Yes it adds to the config page in your admin area. Also did you run the SQL querry on your database? this is a must.

Count
Registered User
Posts: 19
Joined: Thu Aug 12, 2004 4:53 pm
Location: Helsinki, Finland
Contact:

Post by Count » Sat Oct 16, 2004 7:16 pm

Reposting here from the thread in discussion:

Gave this mod a try...

1st: there's a typo: It's "overall_header.tpl" not "overal_header.tpl"
2nd, and by far the biggest problem... Since the field for the ad code is inserted to phpbb_config table its type is varchar (255) and google adsense code doesn't even try to fit to that... and when only a portion of the code is inserted everything blows up in rather spectacular fashion...

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Sat Oct 16, 2004 9:01 pm

Thanks for the feed back, I will start working on a diffrrent db soultion.

Edit: Alright I updated again, has its own table and admin page now.

duncancarver
Registered User
Posts: 55
Joined: Thu Jul 10, 2003 1:38 pm

Post by duncancarver » Sun Oct 17, 2004 12:50 am

Hi,

When I try the SQL command in PHPMyAdmin it gives the following error...
Error

SQL-query :

CREATE TABLE `phpbb_ads` (

`ad_type` VARCHAR( 10 ) NOT NULL ,
`ad_id` TINYINT( 5 ) NOT NULL ,
`ad_code` TEXT NOT NULL ,
`ad_name` TINYINT( 25 ) NOT NULL UNIQUE (
`ad_id`
)
)

MySQL said:


#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '( `ad_id` ) )' at line 4


I'm just copying it right from the file.

Best...

Duncan

geocator
Registered User
Posts: 16242
Joined: Fri Jan 09, 2004 11:56 pm
Location: On dry land
Contact:

Post by geocator » Sun Oct 17, 2004 1:27 am

Sometimes I can be real dumb.

Code: Select all

CREATE TABLE `phpbb_ads` (
`ad_type` VARCHAR( 10 ) NOT NULL ,
`ad_id` TINYINT( 5 ) NOT NULL ,
`ad_code` TEXT NOT NULL ,
`ad_name` TINYINT( 25 ) NOT NULL,
UNIQUE (
`ad_id`
)
);
Download updated

Locked

Return to “[2.0.x] MODs in Development”