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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2011, 11:01 AM
Infoman4ever Infoman4ever is offline
 
Join Date: Oct 2011
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Where to find the funtion vB_Template_Runtime::parsePhrase()

Hi,
I want to perform some changes to the post date on the postbit_legacy template, so I got the cached template from the database to see what to edit, I found this:
PHP Code:
<span class="date">' . vB_Template_Runtime::parsePhrase("x_until_y", '' . $post['startdate'] . '', '' . $post['enddate'] . '') . '</span
So I should modify this function vB_Template_Runtime:arsePhrase(), so that I'm asking where do I find its declaration on vBulletin files?
Thanks for help in advance.
Reply With Quote
  #2  
Old 12-22-2011, 11:31 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That function is in includes/class_core.php. But I think if you just want to change the date you either want to edit the phrase that's being used or else modify $post['startdate'] or $post['enddate'] before the postbit is rendered.
Reply With Quote
  #3  
Old 12-22-2011, 04:19 PM
Infoman4ever Infoman4ever is offline
 
Join Date: Oct 2011
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want to do so using a product as usual, so I need to include instructions to a plugin, and I don't have a good experience in vbuelltin phrases, that's for I'm asking you explain more your solution please.
Reply With Quote
  #4  
Old 12-22-2011, 04:46 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh right, you want to do it in a plugin. I guess it depends what you want to do exactly. If you can do what you want just by changing the date format, you can probably use a plugin on postbit_display_complete hook and reset those fields (see includes/class_postbit_alt.php to see how they're set). If you want to change what the phrase says, you could include your own phrase in your product then replace that phrase name with your own.
Reply With Quote
  #5  
Old 12-22-2011, 08:13 PM
Infoman4ever Infoman4ever is offline
 
Join Date: Oct 2011
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure I fully understand, I saw how are the fields set from class_postbit_alt.php but changing it from a plugin?! still unclear, you know, I'm new and I'm learning right here

About the phrases, it's important to say how I'm changing the date, I passe it as a parameter of a specific function I created to perform some changes on it, or, what I'm working on now is another way, I created a new column on the table post to store the new date returned from that function having as parameters the first date from the column named "dateline", anyway, it's not important for you to know such details, I just wanted to tell you how does the function look like, right? so after knowing that, please, tell me how to use phrases? I did not experience phrases before except creating ones, naming it, linking it to a plugin and displaying it from a plugin: {vb:rawphrase word}, right? but I don't know to use a function with phrases.
Edit: the new date is stored to the table post, it's OK, now let's focus on showing the date on the postbit_legacy for each post.
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 10:10 PM.


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.03962 seconds
  • Memory Usage 2,197KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_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