News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Issue with xml installer

Started by Glyph, November 28, 2015, 01:02:48 AM

Previous topic - Next topic

Glyph

I have a problem with my default board throwing an error on this code:


<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>Glyph:GW2APII</id>
<version>1.0</version>
<file name="$themedir/Memberlist.template.php">
<operation>
<search position="before"><![CDATA[ foreach ($context['members'] as $member)
{]]></search>
<add><![CDATA[$endpoint_action = "account_name";
                    $endpoint_data = call_endpoint($member['id'], $endpoint_action);
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[<td class="windowbg lefttext">', $member['link'], '</td>
]]></search>
<add><![CDATA[<td class="windowbg lefttext">', str_replace($member['name'],$endpoint_data[0]['name'], $member['link']), '</td>]]></add>
</operation>
</file>


1.   Add After   ./Themes/core/Memberlist.template.php   Test successful
2.   Replace   ./Themes/core/Memberlist.template.php   Test failed

i don't understand why it fails, the text is there... the syntax seems to be correct..

FIrst off number 1 is <search position="before"> and it shows up as "Add After"  for some reason...
and it fails the 2 replace.
Personal TODO:

Kindred

Search before means, add this code after the searched code... Yes.

And spaces are different from tabs
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Glyph

#2
WOW
It's only failing with the /core/ theme because obviously it's different code.
lmao.... I didn't realize it was working fine this whole time... I was focused on the default theme not taking into account the core.
Personal TODO:

Advertisement: