Hey guys,
Today I am going to show you how we can add a little extra Google Ad exposure on our Oxwall based websites.
The code we were working with is as follows.
Step 1: Header Section.
Login to your admin dashboard (www.yoursite.com/admin)
Click on mouseover on settings and click on main settings
Click on page settings
Copy the following code and paste in the custom head section
Click save.
Now login to your cpanel or use your ftp client, locate the following file /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.
{style}
{literal}
.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; }
{/literal}
{/style}
{script}
{literal}
$(‘#toggle_attach_link’).click(function(){
$(‘#attach_file_inputs’).toggle();
});
$(‘#toggle_attach_edit_link’).click(function(){
$(‘#attach_edit_file_inputs’).toggle();
});
$(“.ow_forum_attachment”).hover(
function(){
$(this).find(“a.forum_delete_attachment”).show();
},
function(){
$(this).find(“a.forum_delete_attachment”).hide();
}
);
$(“a.forum_delete_attachment”).each(function(){
var container_handler = $(this).parent();
$(this).click(function(){
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 )
{
OW.info(data.msg);
container_handler.remove();
}
else if (data.error != undefined)
{
OW.warning(data.error);
}
});
}
else
{
return false;
}
});
});
{/literal}
{/script}
{if $isHidden}
{/if}
{$breadcrumb}
{capture assign=’tpl’}
{capture name=’info_string’}
{$avatars[$post.userId].title}
{$post.createStamp}
{/capture}
{capture name=’content’}
{if $post.edited}
{/if}
{if $enableAttachments && isset($attachments[$post.id])}
{foreach from=$attachments[$post.id] item=’attm’}
{/foreach}
{/if}
{/capture}
{decorator name=’ipc’
avatar=$avatars[$post.userId]
content=$smarty.capture.content
infoString=$smarty.capture.info_string
toolbar=$toolbars[$post.id]
}
{/capture}
{if $page==1 && $smarty.foreach.postList.first}
{block_decorator name=’box’ addClass=’ ow_stdmargin clearfix’ capEnabled=false}
{/block_decorator}
{add_content key=’socialsharing.get_sharing_buttons’}
{add_content key=’forum.topic.content.after_first_post’}
{else}
{/if}
{/foreach}
{if $topicInfo.sticky}
{block_decorator name=’box’ type=’empty’ addClass=’ow_smallmargin ow_center’}
{/block_decorator}
{/if}
{block_decorator name=’box’ type=’empty’ addClass=’ow_smallmargin ow_center’}
{/block_decorator}
{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’}
{if $enableAttachments}
{text key=’forum+attach_files’}
{/if}
{/block_decorator}
{/form}
{/if}
{if $isHidden && !$canPost}
{block_decorator name=’box’ type=’empty’ addClass=’ow_smallmargin ow_center’}
{/block_decorator}
{/if}
{if $canEdit && $isOwner || $isModerator || $canSubscribe || $isSubscribed || $canLock}
{/if}
{if $canSticky}
{/if}
{if $isModerator}{if !$isHidden || $canMoveToHidden}
{/if}{/if}
{if $canEdit && $isOwner || $isModerator}
{/if}
{if $canSubscribe || $isSubscribed}
Paste your Adsense Code Here
{/if}
{/block_decorator}
{/if}
{if !$isHidden || $canMoveToHidden}
{*Move topic form*}
{/if}
(make sure to enable dev_mod so that your changes will take effect.) Click save and you’re done.
I hope you guys find this information useful. As always, make sure to check out Arvixe for the best hosting deals on the web and check out Oxwall Accessories for all your custom Oxwall needs!
Charles Benson