vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Plugin variable not showing in postbit data (https://vborg.vbsupport.ru/showthread.php?t=238575)

tommythejoat 12-20-2010 07:05 PM

I have a similar problem and need to make changes to the display if a userfield value is set.

I am pretty sure $bbuserinfo refers to the logged in user, while $postinfo refers to the person who made the post. So you would want to use a value in $postinfo in your case. I did not think that the names of the fields were available at this level, so I am using $bbuserinfo[field11] to refer to my field in the template. That seems to work just fine and I can control the display with that value with <if condition="$bbuserinfo[field11]> stuff </if> at the appropriate place in the template.

My problem is that I cannot figure out how to set the value in the database at my hook location. I could generate the sql, but I thought I should use the user datamanager to do that and I cannot find either examples or documentation on how to set a userfield programmatically. Setting it directly with a query seems like a coding standard violation.

btw, I would have thought you could just use ratings for the ovenmitts and change the rating symbol. Here is what we did for a similar donor display with the donor having the option to not display the symbol.

Code:

<! -- Donor mod add conditional to rank -->
<if condition="$post[field11]">
                                <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if></if>
<! -- end donor mod -->



All times are GMT. The time now is 11:29 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.01020 seconds
  • Memory Usage 1,711KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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