Back to vBulletin 4.x Template Modifications

User notes visibile immediately on user's profile
Mod Version: 2.00, by Alan_SP

vB Version: 4.x.x Rating: (1 vote - 5.00 average) Installs: 8
Released: 20 Feb 2012 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

With this you could have user notes visible immediately on user's profile and you could add them, edit them and everything else you do with user notes without need to go to separate window.

This was inspired by @rammieone question here:

Spoiler (click to open)


Quote by Alan_SP
Ok, what's wrong with already built user notes? I guess you are familiar with them?
Yes mate thanks just liked this Idea to be able to show them to staff

Close


You need to edit at least one template (MEMBERINFO), but probably you would like to edit two more templates to make it more practical.

To add usernotes inside member profile edit MEMBERINFO template.

Two most logical places is above and below user's profile tabs.

To place it above user's profile tabs find:

HTML Code:
{vb:raw memberinfo_customize}
To place it below user's profile tabs find:

HTML Code:
{vb:raw template_hook.profile_tabs}
In both cases below add this:

HTML Code:
<vb:if condition="is_member_of($bbuserinfo,5,6,7)"><div><IFRAME SRC="usernote.php?{vb:raw session.sessionurl}u={vb:raw prepared.userid}" WIDTH="100%" HEIGHT="300"></IFRAME></div></vb:if>
With $bbuserinfo,5,6,7 you define which usergroups will see user notes inside user's profile.

You could define height to different value, depending what you prefer, it doesn't have to be 300px. Also you could add FRAMEBORDER=0 if you don't want border around your IFRAME.

Also, you can made this into collapsible block, so if you don't want to see it time from time, use this html code instead:

HTML Code:
<div class="block collapse" id="usernotes_in_userprofile">
	<h2 class="blockhead"><img src="{vb:stylevar imgdir_siteicons}/note.png" alt="{vb:rawphrase user_notes}" class="inlineimg" /> {vb:rawphrase user_notes} ({vb:raw prepared.usernotecount})
<a class="collapse" id="collapse_usernotesprofile" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse{vb:raw vbcollapse.collapseimg_cel_dummy_img}_40b.png" alt="{vb:rawphrase collapse_this_category}" /></a>
</h2>
	<div class="blockbody settings_form_border" id="usernotesprofile">
<vb:if condition="is_member_of($bbuserinfo,5,6,7)"><div><IFRAME SRC="usernote.php?{vb:raw session.sessionurl}u={vb:raw prepared.userid}" WIDTH="100%" HEIGHT="300"></IFRAME></div></vb:if>
	</div>
</div>
Code for making something into collapsible block you can find here

Spoiler (click to open)


For making some part collapsible (if I understand your question), you need to use this code:

Code:
<div class="block collapse" id="unique id name">
	<h2 class="blockhead">Name of the block, can be phrase, can be hardcoded
<a class="collapse" id="collapse_unique name" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse{vb:raw vbcollapse.collapseimg_cel_dummy_img}_40b.png" alt="{vb:rawphrase collapse_this_category}" /></a>
</h2>
	<div class="blockbody settings_form_border" id="unique name">
-------------here goes code that you want inside collapsible block, whatever it is --------------
	</div>
</div>
In upper example I used CODE BBtag so I can use color BBcode, so you can see in red what are variables you can (and have to) change to suit your needs. The two unique names in green must be the same that collapsing work.

For this particular example you can use this code:

HTML Code:
<div class="block collapse" id="usernotes_in_userprofile">
	<h2 class="blockhead"><img src="{vb:stylevar imgdir_siteicons}/note.png" alt="{vb:rawphrase user_notes}" class="inlineimg" /> {vb:rawphrase user_notes} ({vb:raw prepared.usernotecount})
<a class="collapse" id="collapse_usernotesprofile" href="{vb:raw relpath}#top"><img src="{vb:stylevar imgdir_button}/collapse{vb:raw vbcollapse.collapseimg_cel_dummy_img}_40b.png" alt="{vb:rawphrase collapse_this_category}" /></a>
</h2>
	<div class="blockbody settings_form_border" id="usernotesprofile">
<vb:if condition="is_member_of($bbuserinfo,5,6,7)"><div><IFRAME SRC="usernote.php?{vb:raw session.sessionurl}u={vb:raw prepared.userid}" WIDTH="100%" HEIGHT="300"></IFRAME></div></vb:if>
	</div>
</div>
In above example you have for title of collapsible block first image (you can easily remove it), phrase for user_notes and total number of usernotes for that user.

Info about collapse status of the block is kept in cookies, so if you change browser, this info isn't remembered.

I'll also add this info in first post, and I also change location where you need to add this code to have user notes bellow navbar.

Close
.

In case that you decide to use this template change, it would be wise to change two additional templates, to remove unwanted header, navbar and footer.

Edit templates usernote and usernote_note

Remove from them:

HTML Code:
{vb:raw header}
{vb:raw navbar}
{vb:raw footer}
In template usernote you also need to find:

HTML Code:
<div id="pagetitle">
	<h1>{vb:rawphrase user_notes_for_x, {vb:raw userinfo.username}}</h1>
</div>
Add below two </BR> so you have:

HTML Code:
<div id="pagetitle">
	<h1>{vb:rawphrase user_notes_for_x, {vb:raw userinfo.username}}</h1>
</div>
</br>
</br>
This is that button for adding new user notes is separated from title of page.

I attached image how it looks if you place it above user's profile tabs.

v1.00 - Initial version.
v2.00 - Added option that usernotes block can be collapsible. Also changed text you need to find and add code below it, if you want it above user profile tabs.

Download

No files for download.

Screenshots

Click image for larger version
Name:	above.gif
Views:	571
Size:	27.0 KB
ID:	136580  

Similar Mods

User Notes Icon/Link in Postbit, if user has notes vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024