View Full Version : Phrases
I want to make a plugin that alters a phrase, how would I edit a phrase in a plugin?
Thanks,
Mat
peterska2
10-19-2005, 04:00 PM
Adding a phrase is
<phrasetype name="" fieldname="">
<phrase name="">
<![CDATA[ ]]>
</phrase>
It's probably easier and safer to add your own phrases to be used with your plugin. Otherwise, it could change this in other places.
Thanks for the quick reply peterska2,
Thats not quite what I mean.
I want to edit a phrase like you edit settings
eg.
<setting varname="msg" displayorder="20">
<datatype>text</datatype>
<defaultvalue>test</defaultvalue>
</setting>
Thanks,
Mat
noppid
10-19-2005, 04:18 PM
The pharse will be updated if the user allows overwrite when adding your product I believe.
Andreas
10-19-2005, 04:22 PM
You should not edit existing phrases as this will most likely only cause problems; use your own ones :)
noppid
10-19-2005, 04:24 PM
You should not edit existing phrases as this will most likely only cause problems; use your own ones :)
Yes, I meant to mention that as well.
I understand that and i would agree only the phrase I want to edit is "$vbphrase[first_visit_message]" the welcome message for guests.
The idea for the plugin is an easy to use admin page to edit the welcome message, the page would also use a small iframe to display a preview of the forum home as guests would see it :)
I hope this clears things up.
Thanks for the help,
Mat
noppid
10-19-2005, 04:50 PM
The pharse should have nothing to do with the plugin XML or product XML. Your admin page should fetch the pharse and allow the user to edit it. Not edit it on install IMO.
That is the idea :)
Thanks,
Mat
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.