Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User notes visibile immediately on user's profile Details »»
User notes visibile immediately on user's profile
Version: 2.00, by Alan_SP Alan_SP is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 4.x.x Rating:
Released: 02-19-2012 Last Update: Never Installs: 8
Template Edits
Re-useable Code  
No support by the author.

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: https://vborg.vbsupport.ru/showpost....&postcount=161

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.

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.

Screenshots

File Type: gif above.gif (27.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
BlueCheri, ProFifaLeagues

Comments
  #12  
Old 10-06-2012, 04:22 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi guys,

Works as said on my 4.2.

Been following, downloaded and implemented the basic model. I see this as an important attribute to the Profile page, I really want to pump it up there.

I don't know why but I can't get bbcode to work, does it work in the frame?
Reply With Quote
  #13  
Old 11-27-2015, 08:01 PM
Elixar's Avatar
Elixar Elixar is offline
 
Join Date: Jan 2014
Posts: 579
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can you make it appear in a collapsable menu?
Reply With Quote
  #14  
Old 11-28-2015, 10:17 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #15  
Old 11-29-2015, 05:03 AM
Elixar's Avatar
Elixar Elixar is offline
 
Join Date: Jan 2014
Posts: 579
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When it closes, it seems to close really choppy and moves the page. How can you make it to close with Ajax like a clean effect?
Reply With Quote
  #16  
Old 11-29-2015, 07:44 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I also changed location where you should add code, it's in the first post.

Also, you should now that what you're experiencing is the way your browser handles HTML, or just problem with speed with your computer.

For example, in my browser collapsing on and off is instant. Try it with different browser, or on different computer.

From code perspective, there's nothing that can be done to speed it up (and it is fast). It collapses as speedy as any other collapsing object within vB.
Reply With Quote
  #17  
Old 11-30-2015, 02:35 AM
Elixar's Avatar
Elixar Elixar is offline
 
Join Date: Jan 2014
Posts: 579
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alan_SP View Post
I also changed location where you should add code, it's in the first post.

Also, you should now that what you're experiencing is the way your browser handles HTML, or just problem with speed with your computer.

For example, in my browser collapsing on and off is instant. Try it with different browser, or on different computer.

From code perspective, there's nothing that can be done to speed it up (and it is fast). It collapses as speedy as any other collapsing object within vB.
Very sorry, but not sure why I'm not following.
Reply With Quote
  #18  
Old 02-04-2016, 02:08 PM
Elixar's Avatar
Elixar Elixar is offline
 
Join Date: Jan 2014
Posts: 579
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I noticed an error, it shows on the WOL that rather than saying you are Viewing User Profile, it now says Viewing User Note.
Reply With Quote
  #19  
Old 02-05-2016, 10:52 AM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Probably because you call both pages, and somehow user notes gets precedence.
Reply With Quote
  #20  
Old 02-05-2016, 01:53 PM
Elixar's Avatar
Elixar Elixar is offline
 
Join Date: Jan 2014
Posts: 579
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alan_SP View Post
Probably because you call both pages, and somehow user notes gets precedence.
How can I fix this?
Reply With Quote
  #21  
Old 02-07-2016, 09:44 AM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know. I guess you should find php code in user notes script that makes user visible in WOL. What code is that, I don't know.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04864 seconds
  • Memory Usage 2,361KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (8)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete