Add adsense code within oxwall forum topics (with cute sharing buttons).

Maximize your Adsense revenue by implementing your Adsense code within your oxwall forum post. Many oxwall users have been limited to using the crappy advertisement plugin from the oxwall store for their advert including using them on forum section but has found it rather impossible to place choose a custom position for their ad (eg. Implement ads within forum topics.). In this tutorial I’m going to show you how you can place your ads just within your oxwall forum posts, after implementing this code monitor your ads click and impressions and compare them to what you use to have before, share your testimonies with others in our comment section.

This is how your forum topics will look like after implementing our custom codes.
Due to the regular oxwall updates, this post may be subject to changes from time to time so we do advise that you bookmark and check this post after every oxwall plugins updates.
Below are a few step by step tutorial that will guide you through the implementation of this code and should you encounter any problem while installing this code do not hesitate to ask your question in our comment section.
Step 1: Header Section.
  • Login to your admin dashboard (
  • Click on mouseover on settings and click on main settings
  • Click on page settings

  • Copy the following code and paste in the custom headers section

<script type=”text/javascript”>var switchTo5x=true;</script>
<script type=”text/javascript” src=””></script>
<script type=”text/javascript”>stLight.options({publisher: “ur-6d8ce17d-b59f-f6aa-20e6-2cb5c1b15c78″, doNotHash: true, doNotCopy: true, hashAddressBar: false});</script>

  • Click save.
Now login to your panel or use your FTP client, locate the following files /ow_plugins/forum/views/controllers/topic_index.html (make sure to enable dev_mod so that your changes will take effect.) replace the entire content with the following code.

Did you get the answer you were searching for?

Save hours of searching online or wasting money testing unnecessary plugins, get in touch with me and let's discuss a suitable plan for your project. Best thing about this service is that you are never placed on hold and get to talk to an expereinced Oxwall/Skadate developer.

Get Answers for Free!

Ask a question related to this topic and get immediate answers from other community members in 48hrs or less. Contribute by answering members questions.

Ask Question
Premium Service

Whether it's a custom plugin, theme or dedicated support needed to get you started on your project, get professional 24/7 support tailored to your need.

Get in Touch

Or just leave a comment...

.ow_forum_attachment_icon {
display: inline-block;
background-repeat: no-repeat;
cursor: pointer;
width: 14px;
height: 17px;
.forum_attachments_label {
margin: 15px 0 5px;
padding-left: 5px;
font-weight: bold;

.forum_add_post .jhtmlarea {
margin: 0px auto;

.post_content img { max-width: 100%; }
.post_content { overflow: hidden; }




var container_handler = $(this).parent();


if ( confirm(OW.getLanguageText('forum', 'confirm_delete_attachment')) )
var attachment_id = $(this).attr("rel");

var params = {};
var url = '{/literal}{url_for_route for='forum_delete_attachment'}{literal}';
params['attachmentId'] = attachment_id;

$.ajaxSetup({dataType: 'json'});

$.post(url, params, function(data){

if ( data.result == true )

else if (data.error != undefined)
return false;

{if $isHidden}
<div class="ow_stdmargin">

<div class="ow_smallmargin clearfix">
<div class="ow_left">{$paging}</div>
<div class="ow_right ow_txtright">{$search}</div>

<div class="ow_forum_topic_posts">

{foreach from=$postList item=post name=postList}
{capture assign='tpl'}
{capture name='info_string'}
<a href="{$avatars[$post.userId].url}">{$avatars[$post.userId].title}</a>
<span class="ow_tiny ow_ipc_date ow_remark">{$post.createStamp}</span>

{capture name='content'}<div style='float:left; padding: 5px; margin: 5px;'>
Paste your Adsense Code Here
<div class="post_content">{$post.text}</div>
{if $post.edited}
<div class="ow_post_comment ow_ic_edit">{text key='forum+post_edited'} <a href="{$avatars[$post.edited.userId].url}">{$avatars[$post.edited.userId].title}</a> {$post.edited.editStamp} </div>
<span class='st_twitter_hcount' displayText='Tweet'></span>
<span class='st_stumbleupon_hcount' displayText='StumbleUpon'></span>
<span class='st_googleplus_hcount' displayText='Google +'></span>
<span class='st_pinterest_hcount' displayText='Pinterest'></span>
<span class='st_linkedin_hcount' displayText='LinkedIn'></span>
<span class='st_sharethis_hcount' displayText='ShareThis'></span>
<span class='st_email_hcount' displayText='Email'></span>
{if $enableAttachments && isset($attachments[$])}
<div class="ow_small">
<div class="forum_attachments_label">{text key='forum+attachments'}:</div>
{foreach from=$attachments[$] item='attm'}
<span class="ow_forum_attachment">
<span class="ow_forum_attachment_icon ow_ic_attach">&nbsp;</span>
{if $attm.downloadUrl != ''}<a href="{$attm.downloadUrl}">{$attm.fileName}</a>{else}{$attm.fileName}{/if} ({$attm.fileSize}Kb)
{if $isModerator || ($userId == $post.userId && !$topicInfo.locked)}
<a href="javascript://" class="forum_delete_attachment ow_lbutton ow_hidden" rel="{$}">delete</a>

rator name='ipc'

{if $page==1 && $smarty.foreach.postList.first}
{block_decorator name='box' addClass=' ow_stdmargin clearfix' capEnabled=false}<div id="post-{$}">{$tpl}</div>{/block_decorator}
{add_content key='socialsharing.get_sharing_buttons'}
{add_content key='forum.topic.content.after_first_post'}
<div class="ow_stdmargin clearfix" id="post-{$}">{$tpl}</div>


<div class="ow_stdmargin ow_txtright">{$paging}</div>

{if $topicInfo.sticky}
{block_decorator name='box' type='empty' addClass='ow_smallmargin ow_center'}
<div class="ow_forum_status"><span class="ow_ic_push_pin ow_icon"></span> {text key='forum+topic_is_sticky'}</div>

<div class="forum_add_post clearfix">

<div class="ow_left" style="width: 70%;">
{if $topicInfo.locked}
{block_decorator name='box' type='empty' addClass='ow_smallmargin ow_center'}
<div class="ow_nocontent ow_forum_status"><span class="ow_ic_lock ow_icon"></span> {text key='forum+topic_is_locked'}</div>
{elseif ( !$isHidden && ($canPost || $isModerator) ) || ( $isHidden && $canPost ) }
{form name='add-post-form'}
{block_decorator name='box' iconClass='ow_ic_write' langLabel='forum+add_post_title' addClass='ow_stdmargin'}
{input name='text' class="ow_smallmargin"}
{error name='text'}<br />
{if $enableAttachments}
<span class="ow_forum_attachment_icon ow_ic_attach">&nbsp;</span>
<a href="javascript://" id="toggle_attach_link">{text key='forum+attach_files'}</a><br /><br />
<div class="ow_hidden ow_smallmargin" id="attach_file_inputs">
{input name='attachments'}
<div class="clearfix"><div class="ow_right">{submit name='submit' class='ow_positive'}</div></div>
{if $isHidden && !$canPost}
{block_decorator name='box' type='empty' addClass='ow_smallmargin ow_center'}
<div class="ow_nocontent ow_forum_status"><span class="ow_ic_warning ow_icon"></span> {$postReplyPermissionErrorText}</div>

{if $canEdit && $isOwner || $isModerator || $canSubscribe || $isSubscribed || $canLock}
<div class="ow_right" style="width: 27%;">
{block_decorator name='box' iconClass='ow_ic_info' langLabel='forum+this_topic' addClass='ow_stdmargin'}
<ul class="ow_smallmargin ow_bl_narrow clearfix ow_small">
{if $canLock}<li><a class="sticky_topic" href="javascript://">{if $topicInfo.sticky}{text key='forum+unsticky_topic'}{else}{text key='forum+sticky_topic'}{/if}</a></li>{/if}
{if $canSticky}<li><a class="lock_topic" href="javascript://">{if $topicInfo.locked}{text key='forum+unlock_topic'}{else}{text key='forum+lock_topic'}{/if}</a></li>{/if}
{if $isModerator}{if !$isHidden || $canMoveToHidden}<li><a class="move_topic" href="javascript://">{text key='forum+move_topic'}</a></li>{/if}{/if}
{if $canEdit && $isOwner || $isModerator}
<li><a class="delete_topic" href="javascript://">{text key='forum+delete_topic'}</a></li>
{if $canSubscribe || $isSubscribed}
<input type="checkbox" id="cb-subscribe" {if $isSubscribed}checked="checked"{/if} />
<label for="cb-subscribe">{text key='forum+subscribe'}</label>

Paste your Adsense Code Here

{if !$isHidden || $canMoveToHidden}
{*Move topic form*}
<div id="move_topic_form" style="display: none;">
<div class="ow_center">
{form name='move-topic-form'}

{input name='group-id'}
<b>{error name='group-id'}</b><br /><br />

{input name='topic-id'}

<div class="ow_submit">{submit name='save'}</div>

Save your code and you are done!

Leave a Reply