![]() |
How I get realusername i hybrid mode
Helo ,
In the thread shall be show real username in hybrid mode. How can I this make? My first try was make a plugin Plugins & Products --> Plugin Manager Product: vBulletin Hook Location: showthread_start Titel: Realname Execution Order: 5 Plugin PHP Code: PHP Code:
In the file showthread.php in line 1176 following i found variables: PHP Code:
It seems as if the hook was not passed to the file showthread.php What is the error? Vbulletin 4.1.4 forum. Greeting userform3 |
Did you try using hook location showthread_query_postids_threaded? It's after line 1176, and if you want to set $hook_query_fields and $hook_query_joins it must be after that line.
Also, I believe that PHP Code:
will cause an error. I don't think you need to set $hook_query_where at all. |
How I get username form userid
Hi, Yes, I don't need $hook_query_where. I try something else, hook location: showthread_query and I get immediately this error: PHP Code:
Not unique table/alias: 'userfield' Hm, the table 'userfield' is exists in the databas? I think the query is not ok, what do you think? |
It looks like the userfield table and fields are already being included, so maybe you don't need to do it at all.
Code:
Database error in vBulletin 4.1.4: |
yes, it's unnecessary
In the table userfield are only two fields what I need: PHP Code:
|
That's a good question and I don't know the answer. I think it should be {vb:raw post.userfield.field5} but that probably doesn't work because the template curly tags use '.' for array access.
Edit: no, I'm wrong - I see from your post below that you figured out it's just 'field5' and 'field6'. |
Hi,
Your idea was deciding, thanks, I change the Hook Location to showthread_postbit_create I found in tempalte showthread_list the location where are "bulid" the usernick name, this nickname I want to change to realname, I try this with following code in this hook: PHP Code:
If I change this code to PHP Code:
PHP Code:
What make I wrong? |
I see now - I was wrong and the field names were just 'field5' and 'field6' - that makes it easier :).
I think you would want to use template postbit, or (postbit_legacy is you are using that one instead). |
I have implemented your suggestion and expand the php code:
PHP Code:
The Hook Location is the same. |
All times are GMT. The time now is 06:57 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|