SimplePortal

Customization => Custom Coding => Topic started by: abdulbasitnawab on June 23, 2009, 03:24:16 AM

Title: smf mod creatiion with xml gives error
Post by: abdulbasitnawab on June 23, 2009, 03:24:16 AM
Hi  I have been creating a mod for smf forum I wrote the xml and zip n intstalled it when installing it said Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

The code is listed below

***************package-info*************************
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
   <name>imate</name>
   <id>Abdul:Imate</id>
   <type>modification</type>
   <version>1.0</version>
   <install>
      <readme type="inline">welcomet this is the imate jama package</readme>
      <modification type="file">jama.xml</modification>
   </install>
   <uninstall>
      <readme type="inline">welcomet this is the imate jama package</readme>
      <modification type="file" reverse="true">jama.xml</modification>
   </uninstall>
</package-info>

************ end of package info ******************

************start of jama.xml***************
<?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>Abdul:Imate</id>
   <version>1.0</version>
   <info>welcomet this is the imate jama package</info>
   <homepage>www.abdulbasitnawab.com</homepage>
   <file name="$sourcedir/index.php">
      <operation>
         <search position="before"><![CDATA[
header('Location: ' . $boardurl);
]]></search>
         <add><![CDATA[
echo "this is custom text" welcome ther
]]></add>
      </operation>
   </file>
</modification>
************end of jama.xml*****************

This one for testing can any one tell me what is wrong with my code thatnx
Title: Re: smf mod creatiion with xml gives error
Post by: Nathaniel on June 26, 2009, 03:51:36 AM
If this is a general SMF issue then try their Custom Coding Board (http://www.simplemachines.org/community/index.php?board=60.0). Your likely to get help faster.

About your issue, it appears that neither the index.php file for SMF 1.1.x or SMF 2 contain the search code 'header('Location: ' . $boardurl);', that is likely causing your issue.
SimplePortal 2.3.8 © 2008-2024, SimplePortal