vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Is It Possible 2 Insert VbPhrase Into Database?? (https://vborg.vbsupport.ru/showthread.php?t=218884)

Come2Daddy 07-18-2009 11:42 AM

Is It Possible 2 Insert VbPhrase Into Database??
 
Hello there,

Actually I'm trying to do some modification, where a user submit some data through a form, into a the database, but I want to make the user job is less and easier (i.e., he has to choose one of the radio buttons, or one of the drob daown list/ combo box) but I want to show their results in different languages, but I'm afraid that there is a conflect between validating the data & vbphrases

if you've been through this before & you know there is a way to come over this please help me

Marco van Herwaarden 07-20-2009 09:54 AM

And the problem is?

Come2Daddy 07-20-2009 11:49 AM

The problem is that if I insert a phrase like

Code:

$vbphrase[1_day_ago]
to the database for security purposes I should take it through the vbulletin input cleaner function, hence I expect it to conflict with the square brackets in the phrase, since the function cleans it as string only

Dismounted 07-21-2009 06:24 AM

Still don't understand your problem. You can insert placeholders inside phrases and use the construct_phrase() function to fill those placeholders.

Come2Daddy 07-21-2009 12:01 PM

Actually this is the first time I hear of this function, however I look for it in the API documentation, and I found this:
Code:

string  construct_phrase  (string 0, mixed 1, mixed 2)

    * string 0: Text of the phrase
    * mixed 1: First variable to be inserted
    * mixed 2: Nth variable to be inserted

so what's text of the phrase? is it the key of the phrase array??
and other variables, are they translations or what?

***************

if there is a good tutorial for this or a good & simple modification use this please provide it

Dismounted 07-22-2009 06:01 AM

Again - please explain your problem more clearly - I was merely throwing ideas at you to see if they are right.

Come2Daddy 07-27-2009 09:34 AM

thank you very much, dismounted

I'm very grateful to your help

and I'm trying to deliver it with no security cleaning and then I may attach it to you to figure out what I'm trying to do, and what I'm worried about

thanx again


All times are GMT. The time now is 11: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
  • Page Generation 0.02167 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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