![]() |
Can you help?
Hello,
Real name surname instead of the user name Here is the error? PHP Code:
Hook Location: ??????? Here, what should I choose? Thank you --------------- Added 01 Nov 2009 at 15:42 --------------- Okay, I solved the problem Hook Location: parse_templates Rate correct? --------------- Added 01 Nov 2009 at 15:55 --------------- There was a problem Username show if it is empty Real Name and Surname How do I do? |
if ($post[field24]) {
your code; } |
Thank you very much for your help
But, I need to work within the template code |
PHP Code:
|
Not work to plugin
But Worked smoothly in the template Here is the error? (RED) $username_yerine_ad_soyad['postbit_legacy']['find'] = array('$post[musername]'); $username_yerine_ad_soyad['postbit_legacy']['replace'] = Array('<if condition=\"$post[' . $vbulletin->options['username_yerine_ad_field'] . ']\">$post[' . $vbulletin->options['username_yerine_ad_field'] . '] $post[' . $vbulletin->options['username_yerine_soyad_field'] . ']<else />$post[musername]</if>'); $vbulletin->templatecache['postbit_legacy'] = str_replace($username_yerine_ad_soyad['postbit_legacy']['find'], $username_yerine_ad_soyad['postbit_legacy']['replace'], $vbulletin->templatecache['postbit_legacy']); |
When replacing only 1 value, do not need to use arrays as search/replace values (see str_replace manual).
Also, if you're using a plugin, you may check the existence of content in $post[field24] and $post[field38] and, only if true, perform the replacement: Use the hook postbit_display_complete: PHP Code:
|
Hello.
I replied your PM: Quote:
why aren't you caching the templates (in the zip file you sent me)? is this working the way it is now? I never used hooks in "parse_templates", this is why i'm asking. When using other hooks, I had to determine the caching of templates in a plugin, for the hook "cache_templates": PHP Code:
|
1 Attachment(s)
I'm beginner
I am learning slowly know very little php I would do something for myself My goal, areas as possible within the forum to show their real name instead of username I've created a custom profile fields Real Name and Real Surname Members in this area are entered into the real names and surnames field24-->Real Name (Adem) field38-->Real Surname (GENÇ) I'm trying to make plugin |
All times are GMT. The time now is 04: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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|