vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [How?] Replace default phrase with mod/plugin (https://vborg.vbsupport.ru/showthread.php?t=211614)

Stagehandspace 04-19-2009 01:16 AM

[How?] Replace default phrase with mod/plugin
 
Title says it all really...I'm creating a mod but want to replace a default phrase with my own, how can I do this using the mods xml file rather then user having to do it manually from admincp phrase manager?

I tried adding the phrase to my mod:
Code:

<phrases>
<phrasetype name="GLOBAL" fieldname="global">
                        <phrase name="Original phrase" date="xxxxxxxxx" username="xxxxxx" version="x.x"><![CDATA[My replacement]]></phrase>
</phrases>
</phrasetype>

and ticked the overwrite box when installing mod xml but to no avail.

Also what would the uninstall code be if user was to uninstall the mod so phrase would go back to default?

Dismounted 04-19-2009 05:22 AM

You shouldn't (and can't, as you've found out) do that. If you need to use a phrase slightly differently - create your own.

Actually, you can do it, but that requires editing the database and rebuilding the language.g\

Stagehandspace 04-21-2009 10:56 AM

Quote:

Originally Posted by Dismounted (Post 1794286)
...If you need to use a phrase slightly differently - create your own.

Ok so how do I do this so that my phrase will "be in place" of the old phrase without having to manaully do it via admincp variable manager?

please show demo code!

Dismounted 04-22-2009 07:09 AM

My meaning of that sentence is about using phrases in your own product - it looks like you're talking about things in default templates. For that, you can add a translation of the phrase.


All times are GMT. The time now is 10:01 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.01788 seconds
  • Memory Usage 1,714KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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