View Full Version : User Profiles - Users with No Visitor Messages
Amaury
08-29-2012, 06:11 PM
I have a question regarding the Statistic area of the Information (About Me) tab.
I noticed that if a user has one or more user notes, it looks like this:
User Notes
Total User Notes:
Most Recent User Note:
User Notes for [User]
Post a User NoteIf they don't have one, it looks like this:
User Notes
Post a User NoteHowever, for VMs, it's this, regardless if there's a VM or not:
Visitor Messages
Total Visitor Messages:
Most Recent Message:
Visitor Messages for [User]
Post a Visitor Message for [User]
Is there a way to change it so it doesn't display those if there are no VMs? It would look like this for users with no VMs.
Visitor Messages
Post a Visitor Message for [User]
Amaury
09-01-2012, 04:28 PM
Bump.
Amaury
09-04-2012, 05:25 PM
Bump.
Lynne
09-04-2012, 10:31 PM
Did you try just editing the memberinfo_block_statistics template?
Amaury
09-04-2012, 10:43 PM
Did you try just editing the memberinfo_block_statistics template?
Yeah, I know which template. I've edited it before to add commas between the date the time where there weren't commas, but for that VM thing, what would I do to get what I want for the Statistics under About Me?
Thanks for the response. :)
Lynne
09-05-2012, 01:06 AM
I'd put a condition around the stuff you don't want shown based on whether $prepared['vm_total'] is greater than 0.
Amaury
09-05-2012, 01:27 AM
I'd put a condition around the stuff you don't want shown based on whether $prepared['vm_total'] is greater than 0.
Sorry, kind of a newb question here, since this is the first time I've seen something like that said / typed, but what's this whole prepared VM and greater than zero stuff about?
Lynne
09-05-2012, 01:42 AM
A condition.
<vb:if condition="$prepared['vm_total']">code you only want to show if there are VMs</vb:if>
Amaury
09-05-2012, 01:57 AM
A condition.
<vb:if condition="$prepared['vm_total']">code you only want to show if there are VMs</vb:if>
So, to make sure I'm understanding this right, I would change this...
{vb:raw prepared.vm_total}http://i101.photobucket.com/albums/m62/AmauryGarcia/TotalVisitorMessages.png
...to this?
<vb:if condition="$prepared['vm_total']">{vb:raw prepared.vm_total}</vb:if>
Then the same for Most Recent Message and Visitor Messages for [User] to have it appear like I showed in my OP?
Lynne
09-05-2012, 02:07 AM
I can't see the text on the screenshot, but you want to put the condition around the full html you don't want to be shown.
Amaury
09-05-2012, 02:21 AM
I can't see the text on the screenshot, but you want to put the condition around the full html you don't want to be shown.
This should be better:
http://i101.photobucket.com/albums/m62/AmauryGarcia/PreparedLastVM-1.jpg (http://s101.photobucket.com/albums/m62/AmauryGarcia/?action=view¤t=PreparedLastVM-1.jpg)
So I would make that this?
<vb:if condition="$prepared['vm_total']"><dd> {vb:raw prepared.vm_total}</dd></vb:if>
Lynne
09-05-2012, 02:27 AM
No, I can't see that better. Images are resized here. But, try what you wrote on your test site and see if it is what you want.
Amaury
09-05-2012, 02:55 AM
No, I can't see that better. Images are resized here. But, try what you wrote on your test site and see if it is what you want.
Alright, it worked.
http://i101.photobucket.com/albums/m62/AmauryGarcia/VMs.png
Original Code:
<dt>{vb:rawphrase total_messages}</dt>
<dd> {vb:raw prepared.vm_total}</dd>
</dl>
<dl class="blockrow stats">
<dt>{vb:rawphrase most_recent_message}</dt>
<dd>{vb:raw prepared.lastvm_date}<vb:if condition="!$show['detailedtime']"> <span class="time">{vb:raw prepared.lastvm_time}</span></vb:if></dd>
</dl>
<ul class="group">
<li><a href="javascript://" onclick="return tabViewPicker(document.getElementById('visitor_mes saging-tab'));">{vb:rawphrase visitor_messages_for_x, {vb:raw prepared.username}}</a></li>Modified Code:
<vb:if condition="$prepared['vm_total']"><dt>{vb:rawphrase total_messages}</dt></vb:if>
<vb:if condition="$prepared['vm_total']"><dd> {vb:raw prepared.vm_total}</dd></vb:if>
</dl>
<dl class="blockrow stats">
<vb:if condition="$prepared['vm_total']"><dt>{vb:rawphrase most_recent_message}</dt></vb:if>
<vb:if condition="$prepared['vm_total']"><dd>{vb:raw prepared.lastvm_date}<vb:if condition="!$show['detailedtime']"> <span class="time">{vb:raw prepared.lastvm_time}</span></vb:if></dd></vb:if>
</dl>
<ul class="group">
<vb:if condition="$prepared['vm_total']"><li><a href="javascript://" onclick="return tabViewPicker(document.getElementById('visitor_mes saging-tab'));">{vb:rawphrase visitor_messages_for_x, {vb:raw prepared.username}}</a></li></vb:if>Also, while it does work, I'm not sure if the "if condition" text (vm_total) is the right text for them all.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.