Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2005, 01:01 AM
The Wise One The Wise One is offline
 
Join Date: Jun 2003
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default signature in user control panel and parse bbcode

im trying to get the users signature to show in the user control panel (usercp.php) below the subscriptions and reputation tables. i created a plugin using the usercp_start hook with the following code (taken from member.php):

PHP Code:
if ($userinfo['signature'])
{
    require_once(
DIR '/includes/class_bbcode.php');
    
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
    
$userinfo['signature'] = $bbcode_parser->parse($userinfo['signature'], 0true);

    
$show['signature'] = true;
}
else
{
    
$show['signature'] = false;

i then edited the USERCP template with the following code (taken from the memberinfo template):

Code:
<!-- ####### MEMBER'S SIGNATURE IN USER CP ####### -->
<if condition="$show['signature']">
<!-- signature row -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="thead">$vbphrase[signature]</td>
</tr>
<tr>
	<td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</tr>
</table>
<!-- / signature row -->
<br />
</if>
<!-- ##### END MEMBER'S SIGNATURE IN USER CP ###### -->
this combination results in nothing displayed in the usercp page. ive tried changing $show['signature'] to $bbuserinfo['signature'] and $userinfo[signature] to $bbuserinfo[signature] in the USERCP template code. this got the signature to show, but bbcode wont parse. can anyone tell me what im doing wrong?

TIA
Reply With Quote
  #2  
Old 10-20-2005, 01:10 AM
Evil X Evil X is offline
 
Join Date: Sep 2005
Location: naptown
Posts: 386
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wronge forum, this is the how-to's and this is more of a questions type thread homie
Reply With Quote
  #3  
Old 10-20-2005, 01:16 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's $vbulletin->userinfo['signature'] for the PHP
Reply With Quote
  #4  
Old 10-20-2005, 01:28 AM
The Wise One The Wise One is offline
 
Join Date: Jun 2003
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andreas
It's $vbulletin->userinfo['signature'] for the PHP
sorry about the wrong forum...must of had a brain fart or something.

thanks Andreas. i did try $vbulletin->userinfo['signature'] but not in the right combinations. changing the php code to this:

PHP Code:
if ($vbulletin->userinfo['signature'])
{
    require_once(
DIR '/includes/class_bbcode.php');
    
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
    
$vbulletin->userinfo['signature'] = $bbcode_parser->parse($vbulletin->userinfo['signature'], 0true);

    
$show['signature'] = true;
}
else
{
    
$show['signature'] = false;

and changing $userinfo[signature] to $bbuserinfo[signature] in the USERCP code was all that was needed. thanks for the help
Reply With Quote
  #5  
Old 04-27-2006, 08:53 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Wise One
sorry about the wrong forum...must of had a brain fart or something.

thanks Andreas. i did try $vbulletin->userinfo['signature'] but not in the right combinations. changing the php code to this:

PHP Code:
if ($vbulletin->userinfo['signature'])
{
    require_once(
DIR '/includes/class_bbcode.php');
    
$bbcode_parser =& new vB_BbCodeParser($vbulletinfetch_tag_list());
    
$vbulletin->userinfo['signature'] = $bbcode_parser->parse($vbulletin->userinfo['signature'], 0true);
 
    
$show['signature'] = true;
}
else
{
    
$show['signature'] = false;

and changing $userinfo[signature] to $bbuserinfo[signature] in the USERCP code was all that was needed. thanks for the help
This adds 2 queries to the User CP. Is there any way around those 2 queries?
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 05:05 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.04433 seconds
  • Memory Usage 2,223KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete