Support Forums - Classified Ads Script Osclass
Osclass theme support => Free themes => Topic started by: End Ads on September 20, 2021, 12:58:54 PM
-
hello
i am using dreamfree theme and osclass v4.4 and i paste the adsense code on ads management but the ads didnt show
css code that related to ads on theme
.mobail-header-ads, .mobail-main-ads,.mobail-foteer-ads {display: none;}
.for-ads-pbl{
text-align: center;
margin: 0 auto;
width: 100%;
margin-bottom: 15px;
}
functions code that related to ads on theme
osc_set_preference('header-728x90', trim(Params::getParam('header-728x90', false, false, false)), 'dreamfree');
osc_set_preference('homepage-728x90', trim(Params::getParam('homepage-728x90', false, false, false)), 'dreamfree');
osc_set_preference('sidebar-300x250', trim(Params::getParam('sidebar-300x250', false, false, false)), 'dreamfree');
osc_set_preference('sidebara-300x250', trim(Params::getParam('sidebara-300x250', false, false, false)), 'dreamfree');
osc_set_preference('search-results-top-728x90', trim(Params::getParam('search-results-top-728x90', false, false, false)), 'dreamfree');
osc_set_preference('search-results-middle-728x90', trim(Params::getParam('search-results-middle-728x90', false, false, false)), 'dreamfree');
osc_set_preference('rtl', (Params::getParam('rtl') ? '1' : '0'), 'dreamfree');
osc_add_flash_ok_message(__('Theme settings updated correctly', 'dreamfree'), 'admin');
osc_redirect_to(osc_admin_render_theme_url('oc-content/themes/dreamfree/admin/settings.php'));
break;
header code that related to ads on theme
<!-- inc.Menu.category -->
<!-- header ad 728x60-->
<div class="ads_header">
<?php echo osc_get_preference('header-728x90', 'dreamfree'); ?>
<!-- /header ad 728x60-->
</div>
<div class="wrapper">
</div>
sidebar code that related to ads on theme
<div id="sidebar">
<?php if( osc_get_preference('sidebar-300x250', 'dreamfree') != '') {?>
<!-- sidebar ad 350x250 -->
<div class="alert alert-success ads_item-sidebar alert-for-item" role="alert">
<?php echo osc_get_preference('sidebar-300x250', 'dreamfree'); ?>
</div>
<!-- /sidebar ad 350x250 -->
<?php } ?>
<div class="sidebar3">
<?php if( osc_get_preference('sidebara-300x250', 'dreamfree') != '') {?>
<!-- sidebara ad 350x250 -->
<div class="alert alert-success ads_item-sidebar alert-for-item" role="alert">
<?php echo osc_get_preference('sidebara-300x250', 'dreamfree'); ?>
</div>
<!-- /sidebara ad 350x250 -->
<?php } ?>
</div>
main code that related to ads on theme
<?php if( osc_get_preference('homepage-728x90', 'dreamfree') != '') { ?>
<!-- homepage ad 728x60-->
<center>
<?php echo osc_get_preference('homepage-728x90', 'dreamfree'); ?>
</center>
<!-- /homepage ad 728x60-->
<?php } ?>
i write to you all the codes that related to ads please tell me how to solve this problem
-
@End Ads
Try to first store just some string if it works OK, then check t_preference table if code is stored OK there.
If you want to print code, use stripslashes function.
-
@MB Themes
i have use this
<?php
echo stripslashes("Who\'s Peter Griffin?");
?>
and it appear on the website but doesnt stored on t_preference table
-
That is not HTML code.
Put there something like "Hello world" and test.
PHP code will not work there.
-
@ MB Themes
i tried
"Hello world"
the result is the same it appear on the website but didnt store on t_preference table
-
Ok I suppose you have not checked t_preference properly.
You can now put some HTML code here and check then how it looks like.
Anyway you should first discuss this with theme author.
-
@MB Themes
i checked i am sure sir
i try this
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-000000000000"
crossorigin="anonymous"></script>
but in this case didnt appear in a website and in t_preference table also
but the adsense code that i put on ads management is stored on t_preference table i am using byet free host is the problem from the host sir ?
how can i contact theme author i am searched for dreamfree website i didnt reach it ?
this problem not on dreamfree only i try osclass theme and oswizzarrd theme and all of them the same problem
-
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-0000000000000000"
crossorigin="anonymous"></script>
<!-- ahmed -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-00000000000000"
data-ad-slot="0000000000"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
please sir when i add the custom adsense code the ads appear but when i use the auto code only doesn not appear can i know the reason please ?
-
@End Ads
Problem can be at your hosting as well that does not allow storing javascript via form (protection).
-
@MB Themes
i think that in the begining but it appear customs adsense ads but the auto ads can not appear and the both is java script i dont know the reason on the theme that can i do to show me the auto ads