PDA

View Full Version : vBulletin CMS Widgets - [Widget] Recent Forum Posts only with Title and Time [update 10-jul-'10]


we_are_borg
06-29-2010, 10:00 PM
This alteration is to show less information in the Recent Forum Posts. Normal use is Avatar, Title, Post, User name, Date + Time and Link to Last post. When you use this code the following information will be gone Avatar, Post, User name, Date. Title
I myself feel that there is no room for avatars in a widget its not to show off the widget needs to be clean and neat. The user name is not displayed because you want to give all the same treatment this way all users have equal opportunity to get visitors. The Post is removed because you want people to visit the forums and not read the posts on the front page also when people need to go to the forums it can be extra page view. Date is removed because the widget is called Recent Forum Posts so all posts are recent in the time set in the options of the Widget, and why should you display a date that on our big boards is always the actual date of the day.
Why i made this well you can now display more information the save is 3 lines so you can get more posts in there in the same room, you now promote more topics in the same space.

http://img687.imageshack.us/img687/9593/42971764.jpg (http://img687.imageshack.us/i/42971764.jpg/)

How to get the above result well we need to alter one template.

Login to AdminCP go to Styles & Templates>Search in Templates find vbcms_searchresult_post

Replace all the code whit the one below.



<div class="cms_widget_post_bit">
<div class="cms_widget_post_comment>
<vb:if condition="post.posttitle">
<p class="cms_widget_post_content">
<vb:if condition="!$show['detailedtime']">
<span class="time">{vb:date {vb:raw post.postdateline}, {vb:raw vboptions.timeformat}}
<h4 class="cms_widget_post_header">
<a href="{vb:link thread, {vb:raw threadinfo}}">{vb:raw post.threadtitle}</a>
&nbsp <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>
</h4>
</span></vb:if>
</vb:if>
</p>
<vb:comment>
<div class="cms_widget_views">{vb:raw post.replycount}&nbsp;{vb:rawphrase replies}</div>
</vb:comment>
</div>
</div>

Sinsemilla
07-15-2010, 06:36 PM
Not working for me. I have 4.0.5

Edit: Nevermind, I was trying to do this for recent articles. Do you know how this could be accomplished?

NeXtCentury
07-16-2010, 02:19 PM
Not working for me. I have 4.0.5

Edit: Nevermind, I was trying to do this for recent articles. Do you know how this could be accomplished?

That would indeed be nice to know :)
Looking also for a widget that only shows the latest X articles that are posted in the sections WITHOUT a part of contents. So just a listing of the postdate, poster (?) and the article title.
Would be nice to be able to configure the number of article and a bonus would be to be able to select from which sections the article title should be taken.

Thanks,

The_Rayman
10-26-2010, 11:59 AM
No Go here... VB 4.08

tikkas
11-12-2010, 05:18 PM
try changing this vbcms_widget_recentposts_page

:)

Tri@de
04-18-2012, 07:24 AM
There's a way to invclude the user avatar?