Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New block in the member profile
cionfs's Avatar
cionfs
Join Date: Jun 2007
Posts: 146

 

Taranto - Italy
Show Printable Version Email this Page Subscription
cionfs cionfs is offline 01-31-2009, 10:00 PM

I happen to want to experience some features of vBulletin. I tried to recreate a box in the personal profile. In short add a box like the ones in the picture below.



To add an additional block go to AdminCP> Styles and Templates> Search in Templates and search for models MEMBERINFO. Once we found double-click on the mouse to change it.
Inside there is the code. To find this

Code:
<div id="sidebar_container">
    <!-- sidebar -->
    $template_hook[profile_right_first]
    $blocks[stats_mini]
    $template_hook[profile_right_mini]
    $blocks[friends_mini]
    $blocks[albums]
    $template_hook[profile_right_album]
    $blocks[groups]
    $blocks[visitors]
    $template_hook[profile_right_last]
    <!-- / sidebar -->
</div>
To add a new block is needed this code

Code:
<!--new block-->
<!-- $id -->
<div id="$id" class="tborder content_block">
    <h4 class="thead block_title">
        <a href="#top" class="collapse_gadget" onclick="return toggle_collapse('$id')"><img id="collapseimg_$id" src="$stylevar[imgdir_button]/collapse_generic{$vbcollapse['collapseimg_'.$id]}.gif" alt="" border="0" /></a>
        <a name="$id"></a>
        <span class="block_name">BLOCK TITLE</span>
    </h4>
    <div class="block_content" id="collapseobj_$id" style="{$vbcollapse['collapseobj_'.$id]}"><div class="alt1 smallfont block_row block_footer">
<p align="center">
CONTENT
</p>
</div></div>
</div>
<!-- / $id -->
<!--new block-->
You should get something like this

Code:
<div id="sidebar_container">
    <!-- sidebar -->
    $template_hook[profile_right_first]
    $blocks[stats_mini]
<!--new block-->
<!-- $id -->
<div id="$id" class="tborder content_block">
    <h4 class="thead block_title">
        <a href="#top" class="collapse_gadget" onclick="return toggle_collapse('$id')"><img id="collapseimg_$id" src="$stylevar[imgdir_button]/collapse_generic{$vbcollapse['collapseimg_'.$id]}.gif" alt="" border="0" /></a>
        <a name="$id"></a>
        <span class="block_name">BLOCK TITLE</span>
    </h4>
    <div class="block_content" id="collapseobj_$id" style="{$vbcollapse['collapseobj_'.$id]}"><div class="alt1 smallfont block_row block_footer">
<p align="center">
CONTENT
</p>
</div></div>
</div>
<!-- / $id -->
<!--new block-->
    $template_hook[profile_right_mini]
    $blocks[friends_mini]
    $blocks[albums]
    $template_hook[profile_right_album]
    $blocks[groups]
    $blocks[visitors]
    $template_hook[profile_right_last]
    <!-- / sidebar -->
</div>
In this way you will have a result like this:




PS: Sorry for my English
Reply With Quote
  #12  
Old 02-02-2009, 04:51 PM
Aliraqis Aliraqis is offline
 
Join Date: Jul 2008
Location: Sweden
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Thnx
Reply With Quote
  #13  
Old 05-27-2009, 06:46 PM
baghdad4ever baghdad4ever is offline
 
Join Date: Apr 2007
Location: baghdad
Posts: 443
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #14  
Old 07-06-2009, 05:54 PM
webgroup webgroup is offline
 
Join Date: May 2006
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can I remove the footer info from the block?
in my newly created blcok, the footer info like powered by vbuleltin is appearing on the block

Thanks
Reply With Quote
  #15  
Old 07-06-2009, 06:03 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This block does not recall footer.

Change "Content".
Reply With Quote
  #16  
Old 07-18-2009, 06:49 PM
SİMAR's Avatar
SİMAR SİMAR is offline
 
Join Date: Jun 2009
Location: Germany~Offenburg
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
Reply With Quote
  #17  
Old 07-22-2009, 02:32 PM
Kottonmouth801's Avatar
Kottonmouth801 Kottonmouth801 is offline
 
Join Date: Apr 2009
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved for install.
Reply With Quote
  #18  
Old 08-10-2009, 10:57 PM
Mobo Mobo is offline
 
Join Date: Jan 2004
Location: Colorado
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can the users add info to this block, or can only the info I place in the template edit show up in there?
Reply With Quote
  #19  
Old 08-11-2009, 09:32 AM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mobo View Post
Can the users add info to this block, or can only the info I place in the template edit show up in there?
If you allow users to complete a custom field and enter it in this block, yes.
Reply With Quote
  #20  
Old 08-11-2009, 11:51 AM
Mobo Mobo is offline
 
Join Date: Jan 2004
Location: Colorado
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you do that?
Reply With Quote
  #21  
Old 08-11-2009, 12:14 PM
cionfs's Avatar
cionfs cionfs is offline
 
Join Date: Jun 2007
Location: Taranto - Italy
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mobo View Post
How do you do that?
ACP>User profile fields>Add new user profile field and add your field (Remember the number of field).

This field appear in UserCP>Edit Your details.

When yuou add the new block change this code:

Code:
<p align="center">
CONTENT
</p>
With this:

Code:
 <if condition="$post[fieldX]">
<p align="center">
$post[fieldX]
</p>
</if>
Change X with your field number.
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 08:58 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05165 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete