PDA

View Full Version : Where does vbulletin process the <phrase> tags from templates


paperboy741258
08-10-2008, 12:00 AM
I am looking for the php file / function where vbulletin processes the phrase tags and converts them into arguments. I need to find this for a mod I am attempting to make. I am a new programmer learning as I go, so if I am way off let me know.

Lynne
08-10-2008, 03:00 AM
What is it you are trying to do? If you are a new programmer, it may be that we can suggest something rather than trying to find that code. (I don't think I've ever seen anybody ask about finding that code, and trying to search for it is difficult in all those pages because the term 'phrase' is used so much.)

Dylanblitz
08-10-2008, 03:41 AM
I am looking for the php file / function where vbulletin processes the phrase tags and converts them into arguments. I need to find this for a mod I am attempting to make. I am a new programmer learning as I go, so if I am way off let me know.

If you mean that you need to add some phrases then it's done through the database, you don't need to modify any code, just add them through the ACP or put them in your product xml. If you mean something else, then like Lynne said, describe what you want to do a bit better as there might be an easier, existing way to do it.

Dismounted
08-10-2008, 06:25 AM
"<phrase>" is just a wrapper for construct_phrase(), which is a wrapper for sprintf().

paperboy741258
08-10-2008, 03:55 PM
"<phrase>" is just a wrapper for construct_phrase(), which is a wrapper for sprintf().

Yes, I found construct_phrase yesterday. However, the construct_phrase function is being fed the arguments already (EX <phrase 1=whatever>, the 1=whatever is already extracted from the html) I am looking for where vbulletin does the processing of the template code to find the phrase tag, convert it into arguments, and send it to construct_phrase.

No I am not trying to just add a phrase. I am working on a cms system similar to vbadvance. The reason I need to find this particular function is because I need to reference it from my own code, my template system works differently from vbulletin however still needs to be able to read vb templates.

Opserty
08-10-2008, 06:01 PM
<a href="http://members.vbulletin.com/api/vBulletin/_includes---adminfunctions_template.php.html" target="_blank">includes/adminfunctions_template.php</a>

compile_template() & parse_phrase_tag() will be the ones of importance. You may want to checkout the other stuff there too, though.

paperboy741258
08-10-2008, 09:50 PM
I <3 you. I overlooked the fact that it was being processed before being placed into the database :o. I wasn't even looking in those admin files.