PDA

View Full Version : Is It Possible 2 Insert VbPhrase Into Database??


Come2Daddy
07-18-2009, 12:42 PM
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, 10:54 AM
And the problem is?

Come2Daddy
07-20-2009, 12:49 PM
The problem is that if I insert a phrase like

$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, 07: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, 01: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:

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, 07: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, 10: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