Google Adsense with...
 
Notifications
Clear all

[Solved] Google Adsense with Osclass 3.9

14 Posts
2 Users
2 Reactions
850 Views
Maximus
(@maximus)
Posts: 57
Reputable Member
 

Also do not forget to EMPTY your themes advertizing spaces (Ads Management), since they are not needed or used and can create confusion and issues. Pls double check that.


 
Posted : January 9, 2022 22:47
Maximus
(@maximus)
Posts: 57
Reputable Member
 

This is my "item.php" code:

 

<?php related_listings(); ?>
<?php if( osc_count_items() > 0 ) { ?>
<div class="similar_ads">
  <h2 class="title">
    <?php _e('Related listings', OSCLASSWIZARDS_THEME_FOLDER); ?>
  </h2>
 
<?php if (GOOGLE_ADS_RELATED == "true") { ?>
 
<div class="ads_header ads-headers">
  
Your ADSENSE SCRIPT HERE

  </div>

  <?php } ?>

 
Posted : January 9, 2022 22:56
Maximus
(@maximus)
Posts: 57
Reputable Member
 

This is my "search.php" code:

 <?php if(osc_count_items() > 0) {
        echo '<h5 class="title titles">'.__('Listings',OSCLASSWIZARDS_THEME_FOLDER).'</h5>';
		?>
		
     <?php if (GOOGLE_ADS_SEARCH_TOP == "true") { ?>

  <div class="ads_header ads-headers">

  Your Adsense here

  </div>

  <?php } ?>		
				
		
    <?php 
		
        View::newInstance()->_exportVariableToView("listType", 'items');
        View::newInstance()->_exportVariableToView("listClass",$listClass);
            osc_current_web_theme_path($loop_template);
    ?>
	
<?php if (GOOGLE_ADS_SEARCH_BOTTOM == "true") { ?>

  <div class="ads_header ads-headers">

  Your Adsense here

  </div>

  <?php } ?>	
	
		
    <?php
      if(osc_rewrite_enabled()){
      $footerLinks = osc_search_footer_links();

 
Posted : January 9, 2022 22:59
Maximus
(@maximus)
Posts: 57
Reputable Member
 

And finally this is my "item-sidebar.php" code:

 

     *
     *      You should have received a copy of the GNU Affero General Public
     * License along with this program.  If not, see < http://www.gnu.org/licenses/>. 
     */
?>

<div id="sidebar">

   <?php if (GOOGLE_ADS_ITEMS_SIDEBAR == "true") { ?>
   
  <div class="ads_300"> 
  
Your Adsense here
    
  </div>
  
  <?php } ?>
  
  <h1 class="title">
    <?php _e("Contact publisher", OSCLASSWIZARDS_THEME_FOLDER); ?>
  </h1>

 
Posted : January 9, 2022 23:01
PhilippS reacted
(@philipps)
Posts: 4
Active Member
Topic starter
 

Thank you very much for all these.

I have done anything yet. It is clear how this works and looks simple enough for me to do.

I will try to implement the changes what i will have some time (probably next Thursday) and i will update here.


 
Posted : January 9, 2022 23:19
(@philipps)
Posts: 4
Active Member
Topic starter
 

Thank you again for all the help. I have managed to do some of the above, i changed a bit the places i want to display ads but it seems to work just fine.


 
Posted : January 11, 2022 14:08
Maximus reacted
Maximus
(@maximus)
Posts: 57
Reputable Member
 

Right! As soon as you understand the (simple) logic, you can do whatever you want with your ads "injection".

Good luck.


 
Posted : January 11, 2022 15:24
Page 2 / 2