vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Editing posbit_legacy. Problem with variables. (https://vborg.vbsupport.ru/showthread.php?t=267886)

Seductor 08-05-2011 08:21 PM

Quote:

Originally Posted by kh99 (Post 2229824)
Edit: if you just put {vb:raw post.usergroupid} in the template, do you see what you expect (probably 6 or 2) no matter who is logged in? Should be the same for each post no matter who you're loggedin as, of course.

It is the same, you are right.

I disabled all the plugins withous success. Anyway, I asked vBulletin.com and they said they couldn't help me because "it is a modification".

Maybe I should stop trying it?

Thanks for all kh99, you helped me a lot. :up::up::up:

kh99 08-05-2011 08:26 PM

Well, if it isn't working there's something wrong. If you can see the correct user group id, then

HTML Code:

<vb:if condition="$post['usergroupid'] == 6">

</vb:if>


should be working for you. We determined that condition="1" works, so we're pretty much down to the point where there's nothing left except PHP not working right! (Well, OK, not quite - you could look at the compiled template and see what PHP is being evaluated).

Seductor 08-06-2011 08:59 AM

Sorry, but what do you mean by compiled template? Do you mean the postbit_legacy or the .php file?

kh99 08-06-2011 11:49 AM

I mean the PHP code that is eval()'d when the template is rendered. At some point it will be in $vbulletin->templatecache['postbit_legacy'] and you could display it or write it to a file.

Seductor 12-11-2011 12:20 AM

Solved it, at last. The problem is that field5 was a private field. That is why I saw it but other members didn't.


All times are GMT. The time now is 02:45 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.01020 seconds
  • Memory Usage 1,727KB
  • 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_html_printable
  • (1)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
  • (5)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