vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Profile Enhancements - User notes visibile immediately on user's profile (https://vborg.vbsupport.ru/showthread.php?t=278884)

Toorak Times 10-06-2012 04:22 PM

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?

Elixar 11-27-2015 08:01 PM

How can you make it appear in a collapsable menu?

Alan_SP 11-28-2015 10:17 PM

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.

Elixar 11-29-2015 05:03 AM

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?

Alan_SP 11-29-2015 07:44 PM

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.

Elixar 11-30-2015 02:35 AM

Quote:

Originally Posted by Alan_SP (Post 2559494)
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. :(

Elixar 02-04-2016 02:08 PM

I noticed an error, it shows on the WOL that rather than saying you are Viewing User Profile, it now says Viewing User Note. :(

Alan_SP 02-05-2016 10:52 AM

Probably because you call both pages, and somehow user notes gets precedence.

Elixar 02-05-2016 01:53 PM

Quote:

Originally Posted by Alan_SP (Post 2564270)
Probably because you call both pages, and somehow user notes gets precedence.

How can I fix this?

Alan_SP 02-07-2016 09:44 AM

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.


All times are GMT. The time now is 05:37 AM.

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.00987 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete