Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Add And Use Custom Phrase Type.
deathemperor
Join Date: Jul 2003
Posts: 1,270

HOL
by deathemperor deathemperor is offline 30 May 2006

How to add

Simple, just use these 2 lines in your install code, it will add a new phrase type with phrasegroup_name = tm_phrase, phrasegroup_title = trademanager and productid as trademanager.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The function reads


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


How to use

In your script, after:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

include this this line
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

tm_phrase is the phrasegroup_name that you added as above.

Now you can use the phrases from "Trade Manager" phrase group to your script.

How this helps ?
I can think of these for now:
- Prevent spamming the global phrases, make it getting bigger and bigger.
- Easier to manage. Because it's your own custom phrases
- Make your product more like a product :P.

Notice
- These phrases can only use to replace global phrase. Meaning, instead of create all of them and put to Global phrase, you put it in your own group. So if you want to use them for Permissions, Error Messages, etc. you simply can't.

Correct me if I missed something.

Have fun.

wiritten by deathemperor @ www.holvn.org
Views: 5587
Reply With Quote
Comments
  #2  
Old 20 Jul 2006, 17:30
lightwave lightwave is offline
 
Join Date: Sep 2004
really great modification. i used it myself.
Reply With Quote
  #3  
Old 14 Nov 2006, 11:21
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Real name: Vladislav
Re: Add And Use Custom Phrase Type.

I have some questions:

1. How to completely delete all phrases of my plugin on uninstallation? Is this done automatically?
2.
So if you want to use them for Permissions, Error Messages, etc. you simply can't.
Could you please explain, what this means? What do you mean under "Permissions, Error messages"?

BTW, isn't add_phrase_type deprecated yet? As I can see, for example psiStats addon for VB does not use this function, but still uses custom phrases

Last edited by FractalizeR; 14 Nov 2006 at 17:09. Reason: Automerged Doublepost
Reply With Quote
  #4  
Old 14 Nov 2006, 19:19
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Real name: Lucius Hunk
Re: Add And Use Custom Phrase Type.

1. Yes when: for example when you add a phrase, you choose a product it belongs to then when the product uninstalled the phrases belong to that product will be removed too.

2. I haven't found a way to add custom phrases for Permission, Error Messages, etc (which are some phrase types). So currently it's only possible to add global phrases. The psiStats may use queries in its product installation files (xml for example). add_phrase_type just do the same, it also runs queries but it's written by vbulletin development staves so what would you choose ?
Reply With Quote
  #5  
Old 19 Nov 2006, 11:23
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Real name: Vladislav
Thanks Now I understand.
Reply With Quote
  #6  
Old 26 Nov 2006, 00:51
steadicamop's Avatar
steadicamop steadicamop is offline
 
Join Date: Jul 2004
Real name: Jason Williams
Originally Posted by deathemperor View Post
include this this line
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
I'm not sure if I'm missing something really simple here - but this lot doesn't seem to work for me - where can you add the $phrasegroups to? I have tried the php file I have and inside the plugin - but just not working, none of my phrases show ... would love to be able to separate them out.

Thanks

Jason
Reply With Quote
  #7  
Old 26 Nov 2006, 23:45
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Real name: Lucius Hunk
actually I only tried it for new files. you can see it on vbulletin files, it's placed before everything (almost).

I think it will work on plugin if you use array_merge, I will try it myself.
Reply With Quote
  #8  
Old 24 Oct 2009, 19:32
testbot testbot is offline
 
Join Date: Feb 2009
is there away to add a translation? i want to append some txt to an existing phrase.
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Phrase Type Manager Andreas vBulletin 3.5 Add-ons 35 11 Dec 2012 15:52



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 08:46.

Layout Options | Width: Wide Color: