vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Determining User Setting in Postbit? (https://vborg.vbsupport.ru/showthread.php?t=208845)

Cryo 03-20-2009 12:35 AM

Determining User Setting in Postbit?
 
Hello,

I tried searching but it seems this is too vague to find a good result. I'm trying to pull a viewer setting from a plugin that's changing how the viewer sees signatures. The field I'm checking is field32, and using the postbit_display_complete hook and it's not getting any data from the $vbulletin->userinfo['field32'] variable. Here's a sniplet of the code for the plugin...

PHP Code:

if ($vbulletin->userinfo['field32'] == "Scroll Box") {

        
$this->post['signature'] = "<div class=\"sigbox\">"$this->post['signature'] ."</div>";

    } 

So, how do I get the VIEWER's settings through a plugin?

Cryo 03-21-2009 12:29 PM

Any ideas or suggestions?

Lynne 03-21-2009 03:48 PM

I don't think you want to use $this->post['signature']. Perhaps try $post['signature']

Cryo 03-21-2009 10:23 PM

Well the signature part isn't the issue, it's getting the value of the person that's viewing the thread. Basically I'm writing a plugin that allows you to display a signature 3 different ways - in a scroll box, in a click box or just as the full signature based on a setting in your user profile. The problem that I'm having is that I apparently can't pull the thread viewer's settings via the $vbulletin->userinfo variable in the postbit_display_complete / start hooks.

I also tried adding a plugin hooked to global_complete / global_setup_complete that set a variable with the contents I needed since I could view $vbulletin->userinfo data on that plugin, but I can't seem to access that information including the hook I need either.

Lynne 03-22-2009 12:08 AM

Try $this->registry->userinfo['field32']

Cryo 03-22-2009 11:48 AM

Lynne, you are amazing - it worked! Thanks so much. :D


All times are GMT. The time now is 01:56 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.01078 seconds
  • Memory Usage 1,717KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete