Widget/General Search Template Modification - Recent Posts
When displaying recent posts from the forum in your CMS, the title of the post is below the text of the post. To me, that just didn't look right.
So, I created a new template and named it vbcms_searchresult_post_toptitle and this puts the title above the content of the forum post. This is the only difference between the stock template and my template. First, create the new template: Go to: Style Manager Select: Add New Template Title: vbcms_searchresult_post_toptitle Template: Code:
<div class="cms_widget_post_bit"> <vb:if condition="post.posttitle"> <h4 class="cms_widget_post_header"> <a href="showthread.php?{vb:raw session.sessionurl}t={vb:raw post.threadid}">{vb:raw post.threadtitle}</a> </h4> </vb:if> <p class="cms_widget_post_content">{vb:raw post.pagetext} <a href="showthread.php?{vb:raw session.sessionurl}p={vb:raw post.postid}#post{vb:raw post.postid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a></p> <div class="meta"> <div class="cms_widget_post_userinfo"><a href="{vb:link member, {vb:raw userinfo}}">{vb:raw post.postuserid}{vb:raw post.username}</a> {vb:rawphrase on} {vb:date {vb:raw post.postdateline}, {vb:raw dateformat}}</div> </div> <vb:comment> <div class="cms_widget_views">{vb:raw post.replycount} {vb:rawphrase replies}</div> </vb:comment> </div> Now, just create your widget using the "general search" widget and configure it using the template name: vbcms_searchresult_post_toptitle SCREENSHOTS: The first screen shot is the stock template The second screen shot is the new template. Download No files for download. Screenshots |