vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How do you enter php into phrases? (https://vborg.vbsupport.ru/showthread.php?t=221121)

checkmail 08-17-2009 06:25 PM

How do you enter php into phrases?
 
How do you enter some php into phrases. I have welcome headers and would like to post different messages based on different variables.

Edit.. I would like to know how to add php to notices or the above.^^

Lynne 08-17-2009 07:09 PM

Adding it to phrases is done in the templates like this (example from the navbar):
HTML Code:

<phrase 1="$bbuserinfo[username]" 2="$vboptions[bburl]/member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase>
To be able to use them in notices, you'd need to write a plugin, probably using the nocies_noticebit hook location, to make these variables available for use.

checkmail 08-17-2009 07:19 PM

Thanks for the reply. But I wanted to add an if then statement in php. Not just variables.

Lynne 08-17-2009 07:26 PM

You have to use a plugin to do the if/else and the output from that would be a variable you can then use in the phrase.

checkmail 08-17-2009 07:57 PM

thank you. I will have someone make it in the paid section. =)


All times are GMT. The time now is 11:18 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.01102 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_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete