View Single Post
  #7  
Old 05-15-2011, 06:17 AM
Duncan Idaha Duncan Idaha is offline
 
Join Date: Nov 2008
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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}&nbsp;{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.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01148 seconds
  • Memory Usage 1,777KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete