PDA

View Full Version : Phrase Type Manager


Andreas
13 Oct 2005, 16:41
Phrase Type Manager

Description
This Hack allows you to easily manage custom phrase types.

Details
1 Product XML (12 Phrases)
1 ACP Script
1 ACP Navigation XML

Note: As this Hack is meant for developers, it can only be used in debug mode!

Credits to Hoffi for PhraseGroupManager, which inspired this Hack :)

d3adlythegame
13 Oct 2005, 16:45
first to reply w00t, thanx :-)

Cyricx
13 Oct 2005, 17:44
Nice one!!

Lizard King
13 Oct 2005, 17:54
I cannot get the Phrase Type Manager in admincp .
Even searched and saved a phrase it is over there.

Andreas
13 Oct 2005, 18:36
I cannot get the Phrase Type Manager in admincp .
This is working as designed :)

Feckie (Roger)
13 Oct 2005, 18:52
I cannot get the Phrase Type Manager in admincp .
Even searched and saved a phrase it is over there.

Samo Here nuttin

JJR512
13 Oct 2005, 18:53
If you create a custom phrase group as part of a custom product, does it get exported along with that product? Am I correct in assuming that I can create a product, create a custom phrase type as part of that product, create phrases as part of that product and in that custom phrase type, and export the product, and the product will contain all of that, and when someone else installs the product, even if they don't have your hack, they will get the new phrase group and all the new phrases will be in that group?

JJR512
13 Oct 2005, 18:56
Also, if I do create a custom phrase group, should that group then be defined in a custom script (custom PHP file) in the beginning like this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

Revan
13 Oct 2005, 18:59
JJR512, that is part of the point of this hack :)

This be cool $h1t :D
/me clicks install

Andreas
13 Oct 2005, 19:07
@JR512
Just icnlude the varname in array $phrasegroups, just as you would do with any other phrasegroup too.

If you export a product, product management will take care of everything; the user does not need this hack - it's just to make developers life easier :)

Andreas
13 Oct 2005, 19:08
Samo Here nuttin
As said, this is working as designed :)
It's a developers tool and therefore will not show up for endusers, as pointed out in the first post.

EvilHawk
13 Oct 2005, 19:11
I cannot get the Phrase Type Manager in admincp .
Even searched and saved a phrase it is over there.

->it can only be used in debug mode! ;)

EvilHawk clicks install!

uae
14 Oct 2005, 16:29
Thank you Kirby

Clicked installed :)

JJR512
14 Oct 2005, 16:56
How do you enter debug mode and how do you confirm it's on?

I asked this question at vbulletin.com (http://www.vbulletin.com/forum/showthread.php?t=153385) and was told by Steve Machol (a vB developer) that all I have to do is put


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

anywhere in the config.php file (between the opening and closing PHP tags, of course). I was also told that I would know when it's on.

Well, I put that statement in the config.php of my test board and uploaded it. I looked at the board's front end, seemed normal. I looked at the admin cp, seemed normal. So far, it's not obvious that debug mode is on, although Steve implied it would be.

I tried installing this hack on my test board. It doesn't show up in the admincp. Now apparently it should show up in the admincp if debug mode is on, and it should also be obvious that it's on, but nothing seems different to me. So I figure I must be doing something wrong, and debug mode is not on. What's my problem?

Andreas
14 Oct 2005, 17:01
$debug =1 is for vBulletin 3.0
For vBulletin 3.5 take a look here:
http://www.vbulletin.org/forum/showthread.php?t=82835

JJR512
14 Oct 2005, 17:14
Yeah, I found that, I should have searched here first before asking. :o

Anyway, I fixed it and now have access to your hack. Thanks! :)

One suggestion/question: Is it possible you could make it so that after I create a new Phrase Type and have it tied to a particular Product, that when I go through Phrase Manager, select my custom phrase type from the drop-down box, and click the Add New Phrase button, that on the next Add New Phrase screen, the same product that the Phrase Type is associated with when it was created also is pre-selected in the Product field on this Add New Phrase screen? It's pre-set to vBulletin, and to my thinking, it seems likely that if you create a new Phrase Type, any phrases you create for it would be part of the same Product that the Phrase Type was created for.

Andreas
14 Oct 2005, 17:30
This is not easily possible without file edits, furtheremore you can add phrases that belog to different products into one phrasegroup

JoergZ
15 Oct 2005, 15:03
Very nice, now you don't have to do the necessry steps for new phrase-groups manually. But...

I have an own phrase-group for my induvidual modifications. In vB 3.0 I added in the init.php at the end these 3 lines



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



so I have my phrases everywhere available, same as the standard GLOBAL-phrases.

In vB 3.5 this is not working anymore.

Which PHP I have to modify, to get my individual phrase-group loaded gloabal, so I can use the phrases everywhere ?

Thanks for help.

BR

Jörg

Andreas
16 Oct 2005, 00:50
@JoergZ
Hook init_startup can be used to load phrasegroups

@Rabbitoh Warren
It is intended behaviour that it does not show up if you don't need it!
If you are a developer and need it it will show up.

Hoffi
08 Nov 2005, 21:44
Ah... Great. Thaks.

Psionic Vision
02 Dec 2005, 17:53
Does the product manager export the phrase types?

Andreas
02 Dec 2005, 18:16
Sure.

Psionic Vision
02 Dec 2005, 18:23
Uhh... But your hack doesn't seem to be adding anything into the product manager. So if custom phrases are not a default functionality, why would the product manager be exporting them?

Andreas
02 Dec 2005, 18:29
They are a default functionality, there is just no nice GUI for it - which this Hack does add.
=> adminfunctions_language.php, add_phrase_type()

Psionic Vision
02 Dec 2005, 18:35
So will this hack be present in the next vbulletin release? :)

Hoffi
08 Aug 2006, 15:37
It is not in 3.6, and I think this will not work in 3.6 because the structure of the Table is changed.

See who ist first to build a 3.6 Version. Andreas or myself. ;)

Ahriman
28 Aug 2006, 10:55
Anything new here? ;)

sabret00the
25 Mar 2007, 15:23
To get this to work in 3.6.x find:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



and replace with:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

sabret00the
25 Mar 2007, 15:30
find:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



replace:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

TheRed
19 Apr 2007, 23:09
Thanks Andreas, sabret00the.

Correct implementation would be:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

ART
07 May 2007, 15:16
Thanks, with the little patches posted above, installed smoothly on vb365, works very well. Before installing I directly made changes to the db, now this task is a lot faster.

mokujin
04 Feb 2009, 21:03
Any version for vb 3.8?

Link14716
28 Jul 2009, 08:57
For 3.8, do the edits above, but after this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


add this (to the same line, immediately after):


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Just installed it as I am going to need a custom phrase group, I'm amazed that this hasn't been made default yet.

brodband
25 Jan 2011, 05:41
For vB 4 do the edits above, and add this



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



after this


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------