Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: SleePy on March 17, 2009, 06:57:37 PM

Title: Package SDK: modification.xml
Post by: SleePy on March 17, 2009, 06:57:37 PM
Before reading on, you should know some definitions used in this documentation:

There are also variables that may be used in place of a path. Italics denotes the commonly used path so you get an understanding of what the variable references.

modification.xml
All elements, unless otherwise stated, are not optional and contain no attributes.

Title: Re: Package SDK: modification.xml
Post by: inter on August 22, 2012, 06:44:16 AM
how to tell the installer to ignore the first right bracket?

<search position="replace"><![CDATA[<script type="text/javascript"><!-- // --><![CDATA[...
// ]]></script>]]></search>


<add><![CDATA[<script type="text/javascript"><!-- // --><![CDATA[...
// ]]></script>]]></add>
Title: Re: Package SDK: modification.xml
Post by: emanuele on August 22, 2012, 07:59:13 AM
Unfortunately for the <search> there is no way around. You have to find another point to replace...

For the <add> you can do like this:
<add><![CDATA[<script type="text/javascript"><!-- // --><![CD' . 'ATA[...
// ]' . ']></script>]]></add>
Title: Re: Package SDK: modification.xml
Post by: inter on August 27, 2012, 12:32:54 PM
Error:
$txt['key'] = '<<word>>';
Title: Re: Package SDK: modification.xml
Post by: emanuele on August 27, 2012, 12:40:43 PM
Could you be a bit more specific?
Are you using that one in the <search> or <add> tags? How?
Title: Re: Package SDK: modification.xml
Post by: inter on August 27, 2012, 12:49:51 PM
brackets are not used for tag and as a punctuation mark
Title: Re: Package SDK: modification.xml
Post by: emanuele on August 27, 2012, 01:09:28 PM
So you mean that:
<search position="end" />
<add><![CDATA[$txt['key'] = '<<word>>';]]></add>

doesn't work?
Title: Re: Package SDK: modification.xml
Post by: inter on August 28, 2012, 03:20:49 AM
Quote from: emanuele on August 27, 2012, 01:09:28 PM
So you mean that:
<search position="end" />
<add><![CDATA[$txt['key'] = '<<word>>';]]></add>

doesn't work?
yes

solved: brackets can be changed to &lt; &gt;