Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2008, 12:00 AM
paperboy741258 paperboy741258 is offline
 
Join Date: Mar 2007
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Where does vbulletin process the <phrase> tags from templates

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.
Reply With Quote
  #2  
Old 08-10-2008, 03:00 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.)
Reply With Quote
  #3  
Old 08-10-2008, 03:41 AM
Dylanblitz Dylanblitz is offline
 
Join Date: Oct 2005
Location: OC, California
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paperboy741258 View Post
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.
Reply With Quote
  #4  
Old 08-10-2008, 06:25 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"<phrase>" is just a wrapper for construct_phrase(), which is a wrapper for sprintf().
Reply With Quote
  #5  
Old 08-10-2008, 03:55 PM
paperboy741258 paperboy741258 is offline
 
Join Date: Mar 2007
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
"<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.
Reply With Quote
  #6  
Old 08-10-2008, 06:01 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<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.
Reply With Quote
  #7  
Old 08-10-2008, 09:50 PM
paperboy741258 paperboy741258 is offline
 
Join Date: Mar 2007
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I <3 you. I overlooked the fact that it was being processed before being placed into the database . I wasn't even looking in those admin files.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03924 seconds
  • Memory Usage 2,215KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete