bogotobogo
Bogotobogo
contact@bogotobogo.com
phpbb and Adsense
List of PHP & MySQL Tutorials
- PHP Home
- Apache, PHP, and MySQL Installation
- PHP Preview
- PHP Preview II
- Reserved Words
- Variables
- Functions
- Arrays
- Arrays II
- Creating Dynamic Content - Date and Time
- Creating Dynamic Content II - Form Values
- Creating Dynamic Content III - PHP_SELF
- File Handling - Delete and Copy
- File Handling II - Reading and Writing
- File Handling III - Uploading Files
- cURL
- Cookies and Sessions I - Setting and Getting Cookies
- Cookies and Sessions II - Access Limit and Starting a Session
- Cookies and Sessions III - Cookie vs Session
- Creating MySQL Database and Table
- Creating MySQL Database and Table II - Table and Query
- Creating MySQL Database and Table III - Retrieving and Sorting Data
- Creating MySQL Database and Table IV - mysqldump etc.
- MySQL with PHP: Part I - User and Password
- MySQL with PHP: Part II - Creating and Deleting Database
- MySQL with PHP: Part III - Creating Database Table Dynamically
- Ad Tracker
- phpbb and Adsense
phpbb and Adsense
I've been running phpBB for my site discussion forums, and I tried to slip some advertising into forum posts for a while. Finally, I got it. Here is the code we can use.
The files we need to edit can be located at [forum_name]/styles/prosilver/template.
-
Header Ads
If we want our ads in the header, we need to open overall_header.html and add our code at the very end of the file. -
Footer Ads
We should locate the following line from overall_footer.html:<!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->Add ad code after that line. -
View forum page Ads
If we want to place our ads in the view forum page that lists all the topics in that forum, open viewforum_body.html and add code after this line:<!-- INCLUDE overall_header.html -->
-
Ads before/after the first post in a topic
If we want tp place our ads either before/after the first post in a topic, we need to open viewtopic_body.html
For ads before the first post, find the line below and add the code after this line:<!-- BEGIN postrow -->
For ads after the first post, find the line below and add the code before this line:<!-- END postrow -->
-
Blending Ads with the proSilver style
We may want our ads to blend in with proSilver and have a nice blue background with rounded corner images, then we can use the following code in any template file where we want our ads to appear:<div class="panel"> <div class="inner"><span class="corners-top"><span></span></span> <div class="content"> <p style="text-align: center;"> Our Ads here </p> </div> <span class="corners-bottom"><span></span></span></div> </div> We may need to Refresh:
- Good Luck!
- PHP Home
- Apache, PHP, and MySQL Installation
- PHP Preview
- PHP Preview II
- Reserved Words
- Variables
- Functions
- Arrays
- Arrays II
- Creating Dynamic Content - Date and Time
- Creating Dynamic Content II - Form Values
- Creating Dynamic Content III - PHP_SELF
- File Handling - Delete and Copy
- File Handling II - Reading and Writing
- File Handling III - Uploading Files
- cURL
- Cookies and Sessions I - Setting and Getting Cookies
- Cookies and Sessions II - Access Limit and Starting a Session
- Cookies and Sessions III - Cookie vs Session
- Creating MySQL Database and Table
- Creating MySQL Database and Table II - Table and Query
- Creating MySQL Database and Table III - Retrieving and Sorting Data
- Creating MySQL Database and Table IV - mysqldump etc.
- MySQL with PHP: Part I - User and Password
- MySQL with PHP: Part II - Creating and Deleting Database
- MySQL with PHP: Part III - Creating Database Table Dynamically
- Ad Tracker
- phpbb and Adsense
List of PHP & MySQL Tutorials