MediaHound
01-18-2012, 02:59 PM
I am writing a Product that emails a user when a certain condition is met. I would like the text of the email to be editable by the vBulletin admin. I access the text of the email with $vbulletin->options['testOptions_email_body'] just fine, but I cannot get the option to edit the text to appear in the vBulletin control panel! This is what I tried:
<?xml version="1.0" encoding="UTF-8"?>
<product productid="testOptions" active="1">
<title>Test Options</title>
<description>Test Options</description>
<version>1.0</version>
<phrases>
<phrasetype name="vBulletin Settings" fieldname="vbsettings">
<phrase name="setting_testOptions_email_body_title"><![CDATA[Email body]]></phrase>
<phrase name="setting_testOptions_email_body_desc"><![CDATA[The body of the email.]]></phrase>
</phrasetype>
</phrases>
<options>
<settinggroup name="friendsPost" displayorder="500">
<setting varname="testOptions_email_body" displayorder="510">
<datatype>free</datatype>
<optioncode>textarea</optioncode>
<defaultvalue><![CDATA[Dear {USERNAME},
This is an email that you will receive when a certain condition is met.
Regards,
Me]]></defaultvalue>
</setting>
</settinggroup>
</options>
</product>
I also tried adding date, username, and version attributes to the two <phrase> elements, but that did not help. Note that I can access the text of the body and send the email as I expect, the only problem is that the option to edit the text does not show up in the vBulletin Options! The product title is "Test Options" and the productid is "testOptions". It is set as active. What have I done wrong, or what may be missing?
Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<product productid="testOptions" active="1">
<title>Test Options</title>
<description>Test Options</description>
<version>1.0</version>
<phrases>
<phrasetype name="vBulletin Settings" fieldname="vbsettings">
<phrase name="setting_testOptions_email_body_title"><![CDATA[Email body]]></phrase>
<phrase name="setting_testOptions_email_body_desc"><![CDATA[The body of the email.]]></phrase>
</phrasetype>
</phrases>
<options>
<settinggroup name="friendsPost" displayorder="500">
<setting varname="testOptions_email_body" displayorder="510">
<datatype>free</datatype>
<optioncode>textarea</optioncode>
<defaultvalue><![CDATA[Dear {USERNAME},
This is an email that you will receive when a certain condition is met.
Regards,
Me]]></defaultvalue>
</setting>
</settinggroup>
</options>
</product>
I also tried adding date, username, and version attributes to the two <phrase> elements, but that did not help. Note that I can access the text of the body and send the email as I expect, the only problem is that the option to edit the text does not show up in the vBulletin Options! The product title is "Test Options" and the productid is "testOptions". It is set as active. What have I done wrong, or what may be missing?
Thanks.