Hello,
I created a new Ad in ACP and set it to load ad (google adsense) inside the first post but it does not work.
Also would you please tell me that how can I make this ad to load at the right side of the content ?
Thank you very much.
Hello,
I created a new Ad in ACP and set it to load ad (google adsense) inside the first post but it does not work.
Also would you please tell me that how can I make this ad to load at the right side of the content ?
Thank you very much.
Does the problem occurs only in your edited templates, or also with the standard templates?
Thank you for your reply.,
It happened in both custom and default templates ... I checked and it was related to WBB problem with Adsense responsive ads which I solved by setting a class for the ads area.
Oh and one more question please , Would you please tell me that how can I set the ads to load after the content of the first post and before the signature.
Therefore you have to edit the template threadPostList and select in advertising option "in the first post".
I have moved the code for inserting the advertising in the example from the beginning (line 105-107) of the post at the end (line 110-112).
{if !$anchor|isset}{assign var=anchor value=$__wcf->getAnchor('top')}{/if}
{if !$showPostCounter|isset}{assign var=showPostCounter value=true}{/if}
{if !$showCollapsedPosts|isset}{assign var=showCollapsedPosts value=false}{/if}
{if !$thread|isset && $container|isset}{assign var=thread value=$container}{/if}
{if !$canEditPostInline|isset}
{if $thread->getBoard()->canEditThreads() || $thread->getBoard()->getModeratorPermission('canClosePost') || $thread->getBoard()->getModeratorPermission('canDeletePost') || $thread->getBoard()->getModeratorPermission('canDeletePostCompletely') || $thread->getBoard()->getModeratorPermission('canEnablePost') || $thread->getBoard()->getModeratorPermission('canRestorePost')}
{assign var='canEditPostInline' value=true}
{else}
{assign var='canEditPostInline' value=false}
{/if}
{/if}
{if !$disableAds|isset}{assign var='disableAds' value=false}{/if}
{if MODULE_WCF_AD && !$disableAds}
{assign var='adIndex' value=$startIndex % $thread->getBoard()->getPostsPerPage()}
{if $sortOrder == 'DESC'}
{assign var='__postCount' value=$objects|count}
{assign var='adIndex' value=$adIndex - $__postCount + 1}
{/if}
{/if}
{foreach from=$objects item=post name='threadPosts'}
{assign var='objectID' value=$post->postID}
{assign var='userProfile' value=$post->getUserProfile()}
{event name='beforePost'}
{if ($post->isDeleted && !$thread->isDeleted) && !$showCollapsedPosts}
<li id="post{@$post->postID}" class="marginTop">
<article class="wbbPost wbbPostDeleted message messageCollapsed jsClipboardObject{if $post->canRead()} messageCollapsedExpandable{/if}{if $userProfile->userOnlineGroupID} userOnlineGroupMarking{@$userProfile->userOnlineGroupID}{/if}" data-object-id="{@$post->postID}" data-post-id="{@$post->postID}">
<div class="messageHeader">
<ul class="messageQuickOptions">
{if $thread->getBoard()->canEditThreads()}
<li class="jsOnly"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$post->postID}" /></li>
{/if}
</ul>
<div class="box24">
{if $post->userID}
<a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}" class="framed userLink" data-user-id="{@$post->userID}">{@$userProfile->getAvatar()->getImageTag(24)}</a>
{else}
<span class="framed">{@$userProfile->getAvatar()->getImageTag(24)}</span>
{/if}
<div>
<h1>{lang}wbb.post.summary{/lang}</h1>
<small>{@$post->getDeleteNote()}</small>
</div>
</div>
</div>
</article>
</li>
{else}
<li id="post{@$post->postID}" class="marginTop{if MESSAGE_SIDEBAR_ENABLE_MESSAGE_GROUP_STARTER_ICON && $thread->userID && $thread->userID == $post->userID} messageGroupStarter{/if}">
<article class="wbbPost message messageSidebarOrientation{@$__wcf->getStyleHandler()->getStyle()->getVariable('messageSidebarOrientation')|ucfirst} dividers jsClipboardObject jsMessage{if $thread->isDeleted || $post->isDeleted} messageDeleted{/if}{if $thread->isDisabled || $post->isDisabled} messageDisabled{/if}{if $userProfile->userOnlineGroupID} userOnlineGroupMarking{@$userProfile->userOnlineGroupID}{/if}"
data-object-id="{@$post->postID}" data-post-id="{@$post->postID}" data-can-edit="{if $thread->canEditPost($post->getDecoratedObject())}1{else}0{/if}" data-can-edit-inline="{if $canEditPostInline}1{else}0{/if}"
{if $canEditPostInline}
data-is-closed="{if $post->isClosed}1{else}0{/if}" data-is-deleted="{if $post->isDeleted}1{else}0{/if}" data-is-disabled="{if $post->isDisabled}1{else}0{/if}"
data-can-close="{@$thread->getBoard()->getModeratorPermission('canClosePost')}" data-can-delete="{@$thread->getBoard()->getModeratorPermission('canDeletePost')}" data-can-delete-completely="{@$thread->getBoard()->getModeratorPermission('canDeletePostCompletely')}" data-can-enable="{@$thread->getBoard()->getModeratorPermission('canEnablePost')}" data-can-restore="{@$thread->getBoard()->getModeratorPermission('canRestorePost')}"
{/if}
data-object-type="com.woltlab.wbb.likeablePost" data-like-liked="{if $likeData[$post->postID]|isset}{@$likeData[$post->postID]->liked}{/if}" data-like-likes="{if $likeData[$post->postID]|isset}{@$likeData[$post->postID]->likes}{else}0{/if}" data-like-dislikes="{if $likeData[$post->postID]|isset}{@$likeData[$post->postID]->dislikes}{else}0{/if}" data-like-users='{if $likeData[$post->postID]|isset}{ {implode from=$likeData[$post->postID]->getUsers() item=likeUser}"{@$likeUser->userID}": { "username": "{$likeUser->username|encodeJSON}" }{/implode} }{else}{ }{/if}' data-user-id="{@$post->userID}">
<div>
{include file='messageSidebar'}
<section class="messageContent">
<div>
<header class="messageHeader">
<ul class="messageQuickOptions">
{if $post->isClosed}
<li class="wbbPostClosed"><span class="jsTooltip icon icon16 icon-lock" title="{lang}wbb.post.closed{/lang}"></span></li>
{/if}
{if $showPostCounter}
<li><a href="{link application='wbb' controller='Thread' object=$thread appendSession=false}postID={@$post->postID}{/link}#post{@$post->postID}" class="badge jsTooltip jsButtonShare" title="{lang}wcf.message.share{/lang}" data-link-title="{if $post->subject}{$post->subject}{else}{$thread->topic}{/if}">{#$startIndex}</a></li>
{/if}
{if $canEditPostInline}
<li class="jsOnly"><input type="checkbox" class="jsClipboardItem" data-object-id="{@$post->postID}" /></li>
{/if}
</ul>
<div class="messageHeadline">
{if $post->subject}<h1>{$post->subject}</h1>{/if}
<p>
<a href="{link application='wbb' controller='Thread' object=$thread appendSession=false}postID={@$post->postID}{/link}#post{@$post->postID}" class="permalink">{@$post->time|time}</a>
</p>
</div>
{if $thread->isNewPost($post->getDecoratedObject())}<p class="newMessageBadge">{lang}wcf.message.new{/lang}</p>{/if}
{event name='messageHeader'}
</header>
<div class="messageBody">
<div>
{if $post->getPoll()}
<div class="jsInlineEditorHideContent">
{include file='poll' poll=$post->getPoll()}
</div>
{/if}
{event name='beforeMessageText'}
<div class="messageText">
{@$post->getFormattedMessage()}
</div>
{event name='afterMessageText'}
{if MODULE_WCF_AD && !$disableAds && $startIndex % $post->getThread()->getBoard()->getPostsPerPage() == 1}
{@$__wcf->getAdHandler()->getAds('com.woltlab.wbb.thread.in1stPost')}
{/if}
</div>
{include file='attachments'}
{if $post->showSignature && $post->getUserProfile()->showSignature()}
<div class="messageSignature">
<div>{@$post->getUserProfile()->getSignature()}</div>
</div>
{/if}
{event name='messageBody'}
<div class="messageFooter">
{if $post->editCount || ($thread->getBoard()->getModeratorPermission('canEditPost') && $post->hasOldVersions())}
<p class="wbbPostEditNote messageFooterNote">{lang}wbb.post.editNote{/lang}</p>
{/if}
{if $post->isDeleted && !$thread->isDeleted}
<p class="wbbPostDeleteNote messageFooterNote">{@$post->getDeleteNote()}</p>
{/if}
{if $post->isDisabled && !$thread->isDisabled && !$thread->getBoard()->getModeratorPermission('canEnablePost')}
<p class="messageFooterNote">{lang}wbb.post.moderation.disabledPost{/lang}</p>
{/if}
{if $post->isDisabled && $post->enableTime}
<p class="messageFooterNote">{lang}wbb.post.delayedPublication{/lang}</p>
{/if}
{event name='messageFooterNotes'}
</div>
<footer class="messageOptions">
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="smallButtons buttonGroup">
{if $thread->canEditPost($post->getDecoratedObject())}
<li><a href="{link application='wbb' controller='PostEdit' id=$post->postID}{/link}" title="{lang}wbb.post.edit{/lang}" class="button jsMessageEditButton"><span class="icon icon16 icon-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>
{elseif $canEditPostInline}
<li><a title="{lang}wbb.post.edit{/lang}" class="jsOnly button jsMessageEditButton"><span class="icon icon16 icon-pencil"></span> <span>{lang}wcf.global.button.edit{/lang}</span></a></li>
{/if}
{if LOG_IP_ADDRESS && $post->ipAddress && $__wcf->session->getPermission('admin.user.canViewIpAddress')}<li class="jsIpAddress jsOnly" data-post-id="{@$post->postID}"><a href="#" title="{lang}wbb.post.ipAddress{/lang}" class="button jsTooltip"><span class="icon icon16 icon-globe"></span> <span class="invisible">{lang}wbb.post.ipAddress{/lang}</span></a></li>{/if}
<li class="jsQuoteMessage" data-object-id="{@$post->postID}" data-is-quoted="{if $__quoteFullQuote|isset && $post->postID|in_array:$__quoteFullQuote}1{else}0{/if}"><a rel="nofollow" href="{link application='wbb' controller='PostAdd' id=$thread->threadID quoteMessageID=$post->postID}{/link}" title="{lang}wcf.message.quote.quoteMessage{/lang}" class="button jsTooltip{if $__quoteFullQuote|isset && $post->postID|in_array:$__quoteFullQuote} active{/if}"><span class="icon icon16 icon-quote-left"></span> <span class="invisible">{lang}wcf.message.quote.quoteMessage{/lang}</span></a></li>
{if $__wcf->session->getPermission('user.profile.canReportContent')}<li class="jsReportPost jsOnly" data-object-id="{@$post->postID}"><a href="#" title="{lang}wcf.moderation.report.reportContent{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>{/if}
{if MODULE_USER_INFRACTION && $userProfile->userID && $__wcf->session->getPermission('mod.infraction.warning.canWarn')}<li class="jsWarnPost jsOnly" data-object-id="{@$post->postID}" data-user-id="{@$userProfile->userID}"><a href="#" title="{lang}wcf.infraction.warn{/lang}" class="button jsTooltip"><span class="icon icon16 icon-legal"></span> <span class="invisible">{lang}wcf.infraction.warn{/lang}</span></a></li>{/if}
{event name='messageOptions'}
<li class="toTopLink"><a href="{$anchor}" title="{lang}wcf.global.scrollUp{/lang}" class="button jsTooltip"><span class="icon icon16 icon-arrow-up"></span> <span class="invisible">{lang}wcf.global.scrollUp{/lang}</span></a></li>
</ul>
</nav>
</footer>
</div>
</div>
</section>
</div>
</article>
</li>
{/if}
{event name='afterPost'}
{if MODULE_WCF_AD && !$disableAds}
{if $adIndex == 1}
{hascontent}
<li>
{content}{@$__wcf->getAdHandler()->getAds('com.woltlab.wbb.thread.after1stPost')}{/content}
</li>
{/hascontent}
{else}
{if $adIndex % 2 == 0}
{hascontent}
<li>
{content}{@$__wcf->getAdHandler()->getAds('com.woltlab.wbb.thread.afterEvery2ndPost')}{/content}
</li>
{/hascontent}
{/if}
{if $adIndex % 3 == 0}
{hascontent}
<li>
{content}{@$__wcf->getAdHandler()->getAds('com.woltlab.wbb.thread.afterEvery3rdPost')}{/content}
</li>
{/hascontent}
{/if}
{if $adIndex % 5 == 0}
{hascontent}
<li>
{content}{@$__wcf->getAdHandler()->getAds('com.woltlab.wbb.thread.afterEvery5thPost')}{/content}
</li>
{/hascontent}
{/if}
{if $adIndex % 10 == 0}
{hascontent}
<li>
{content}{@$__wcf->getAdHandler()->getAds('com.woltlab.wbb.thread.afterEvery10thPost')}{/content}
</li>
{/hascontent}
{/if}
{/if}
{/if}
{if $sortOrder == 'DESC'}
{assign var="startIndex" value=$startIndex - 1}
{else}
{assign var="startIndex" value=$startIndex + 1}
{/if}
{if MODULE_WCF_AD && !$disableAds}
{assign var='adIndex' value=$adIndex + 1}
{/if}
{/foreach}
Alles anzeigen
Super! I got the concept.
Thank you very much ... This is exactly what I was looking for ...
I know that this question is not really related to this topic ... but would you please tell me if is there is anyway that I can use a excerpt of the first post after the title of the thread ?
Thank you.
This is not possible. I also don't know such a plugin.
This is not possible. I also don't know such a plugin.
Thank you ..
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!