vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding Custom Phrase Type (https://vborg.vbsupport.ru/showthread.php?t=262505)

squishi 04-23-2011 11:22 AM

Adding Custom Phrase Type
 
I want to add some phrases to my plugin.
How do I create a custom phrase type for the plugin?
I know I could just export the plugin, edit the XML and reimport it.
But isn't there an option in the backend to add the phrase type?

Tasking Mickey 04-23-2011 02:06 PM

ACP - Phrase Manager - Add new Phrase

Then, you would edit your XML, add the new phrase you currently added , and reimport it.

kh99 04-23-2011 03:02 PM

Quote:

Originally Posted by squishi (Post 2187726)
But isn't there an option in the backend to add the phrase type?

In includes/adminfunctions_language.php there's a function called add_phrase_type() and the comment says "Allows plugins etc. to add a phrasetype easily". But I've never used it so I'm not sure if that's what you want.

squishi 04-26-2011 08:22 AM

Quote:

Originally Posted by Tasking Mickey (Post 2187765)
ACP - Phrase Manager - Add new Phrase

Then, you would edit your XML, add the new phrase you currently added , and reimport it.

I am in debug mode. I can assign the phrase directly to the product. But I don't see an option to create a new phrase type.

Quote:

Originally Posted by kh99 (Post 2187778)
In includes/adminfunctions_language.php there's a function called add_phrase_type() and the comment says "Allows plugins etc. to add a phrasetype easily". But I've never used it so I'm not sure if that's what you want.

Hmm... okay. Weird. There should be some option in the backend to create phrase types. Everything else can be defined in the backend as well. :confused:

kh99 04-26-2011 10:40 AM

Quote:

Originally Posted by squishi (Post 2188797)
Hmm... okay. Weird. There should be some option in the backend to create phrase types. Everything else can be defined in the backend as well. :confused:

oh I see...you mean from the ACP. Yes, I was wondering that myself, it seems like an oversight. But it looks like the only places anything is inserted in to that table is where the xml is imported, and that function I mentioned (which isn't called anywhere). But I only determined that by searching for 'phrasetype' so I could have missed it.


All times are GMT. The time now is 09:06 AM.

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.01048 seconds
  • Memory Usage 1,717KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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