I have tried this
My (unedited, original VB) Recent Post widget shows this as template being used for it: vbcms_widget_recentposts_page
However, using the description above, I created a custom template: vbcms_searchresult_post_notext
As template/coding I used the content of: vbcms_searchresult_post and removed
Quote:
<p class="cms_widget_post_content">{vb:raw post.previewtext} </p>
|
Next, I configured the Recent Post Widget and entered vbcms_searchresult_post_notext in the template entry box. However, on the home page, the Widget now only shows an empty/grey avatar and 01-01-1970, 01:00 AM >> which directs me to this message "No Thread specified. If you followed a valid link, please notify the administrator"
Here is the code of the vbcms_searchresult_post_notext
<div class="cms_widget_post_bit widget_post_bit">
<div class="cms_widget_post_userinfo widget_post_userinfo">
<vb:if condition="$vboptions['avatarenabled']">
<div class="cms_widget_post_useravatar widget_post_useravatar">
<a class="comments_member_avatar_link" href="{vb:link member, {vb:raw userinfo}}">
<vb:if condition="$avatar">
<img src="{vb:raw avatar.0}" {vb:raw avatar.1} alt="{vb:raw post.username}" />
<vb:else />
<img src="{vb:stylevar imgdir_misc}/unknown.gif" alt="{vb:raw post.username}" />
</vb:if>
</a>
</div>
</vb:if>
</div>
<div class="cms_widget_post_comment<vb:if condition="!$vboptions['avatarenabled']">_noavatar</vb:if> widget_post_comment<vb:if condition="!$vboptions['avatarenabled']">_noavatar</vb:if>">
<vb:if condition="$post['posttitle']">
<h4 class="cms_widget_post_header widget_post_header">
<a href="{vb:link thread, {vb:raw threadinfo}}">{vb:raw post.posttitle}</a>
</h4>
<vb:else />
<h4 class="cms_widget_post_header widget_post_header">
<a href="{vb:link thread, {vb:raw threadinfo}}">{vb:raw post.threadtitle}</a>
</h4>
</vb:if>
<a href="{vb:link member, {vb:raw userinfo}}">{vb:raw post.postuserid}{vb:raw post.username}</a> {vb:date {vb:raw post.postdateline}, {vb:raw vboptions.dateformat}}<vb:if condition="!$show['detailedtime']">, <span class="time">{vb:date {vb:raw post.postdateline}, {vb:raw vboptions.timeformat}}</span></vb:if> <a href="{vb:link thread, {vb:raw threadinfo}, {vb:raw pageinfo_post}}#post{vb:raw post.postid}"><img src="{vb:stylevar imgdir_button}/lastpost-{vb:stylevar right}.png" alt="{vb:rawphrase go_to_last_post}" /></a>
<vb:comment>
<div class="cms_widget_views">{vb:raw post.replycount} {vb:rawphrase replies}</div>
</vb:comment>
</div>
</div>
As you can see, I only removed
Quote:
<p class="cms_widget_post_content">{vb:raw post.previewtext} </p>
|
and made no other edits.
Why does it not work and how can I make it work?
Note: to make sure the coding was correct, I copied the code of the original vbcms_searchresult_post to a word doc, copied it to the entry box and removed that one line.