Page 6 of 6

Re: [Tutorial] How to install a MODX modification

Posted: Sat Feb 16, 2013 10:35 am
by Martin Truckenbrodt
Hallo Haravik,
if the MODs are supporting UMIL then you can use the config values <name of MOD>_version to get automatically compatibility with other MODs.
E.g. I'm doing it this way on AMLS:

Code: Select all

	// phpBB Gallery MOD - https://www.phpbb.com/customise/db/mod/phpbb_gallery
	if (array_key_exists('phpbb_gallery_version', $config) && $config['phpbb_gallery_version'])
{
... 
}
Bye Martin

Re: [Tutorial] How to install a MODX modification

Posted: Sat Feb 16, 2013 11:21 am
by Haravikk
Martin Truckenbrodt wrote:if the MODs are supporting UMIL then you can use the config values <name of MOD>_version to get automatically compatibility with other MODs.
Thanks for the reply, but I'm not sure how I would apply this to the changes I've added to my MODX file? Specifically I'd like to do something like:

Code: Select all

<open src="foo.php" type="if-exists">
    <!-- Edits etc. -->
</open>
So that the edits can be skipped if a particular file (that may not be installed) does not exist, rather than throwing up an error in AutoMOD like it does now. I suppose it's more of an AutoMOD feature since for the MODX file itself I can just add a comment telling the user to skip the step if they don't have the file, but AutoMOD doesn't seem to have the ability to do this.

I'd like to be able to do the same thing with <edit> commands, so that I can look for edits made by other mods to resolve incompatibilities, or to ensure my code appears at the correct position.

For example, if my mod, and someone else's mod both added code after the same <find> command, then depending upon the order in which our mods are installed incompatibilities could arise. But if I could detect the other mod then I could change my edit to a before-add instead, to ensure my code executes first.

The edit might look something like:

Code: Select all

<edit type="if-found">
    <find><![CDATA[$foo = 'bar';]]></find>
    <!-- An action, inline find, whatever -->
</edit>
Basically the edit would only continue if its <find> statements are matched, otherwise it's okay to just skip it.

Re: [Tutorial] How to install a MODX modification

Posted: Sun Feb 17, 2013 1:44 pm
by Martin Truckenbrodt
Hello,
I told a way to do implement compatibilty directly in your PHP code.

Do an extra XML file an place it in the contrib Folder, add a link to your main XML file.

Bye Martin

Re: [Tutorial] How to install a MODX modification

Posted: Sun Apr 07, 2013 1:12 pm
by BiGDiL
thanks for the info.

Re: [Tutorial] How to install a MODX modification

Posted: Fri May 10, 2013 9:50 am
by johnmatthew84
I don’t know about the MODX modification but can you solve my problem which is I just setup my first board and tried to install my first MOD. I wanted the "update attachment" mod for my site and read all the guides and help on installing modes.

Re: [Tutorial] How to install a MODX modification

Posted: Fri May 10, 2013 4:50 pm
by Mick
johnmatthew84 wrote:I wanted the "update attachment" mod for my site and read all the guides and help on installing modes.
Are you experiencing problems installing MODs in general, in other words, you don't know how to do it or are you're having problems installing that particular MOD?

Re: [Tutorial] How to install a MODX modification

Posted: Mon Nov 11, 2013 5:10 pm
by TheRaj
Thanks for the tutorial, it saved my precious time :D

Re: [Tutorial] How to install a MODX modification

Posted: Fri Jun 06, 2014 11:48 pm
by Francoisjunior
I learn a lot on this page. I like how you do the step by step with pictures in it. It's more clear and I followed it easily. Thanks for additional knowledge :)

Re: [Tutorial] How to install a MODX modification

Posted: Fri Jun 20, 2014 8:08 am
by Korkel
Great Tutorial, but the images are broken?

Re: [Tutorial] How to install a MODX modification

Posted: Fri Jun 20, 2014 12:40 pm
by tbackoff
They don't seem to be broken for me

Re: [Tutorial] How to install a MODX modification

Posted: Mon Jun 30, 2014 1:09 am
by all4phone
Thanks for the tutorial.
I can confirm the images are fine.

Re: [Tutorial] How to install a MODX modification

Posted: Mon Jun 30, 2014 9:18 am
by battye
Korkel wrote:Great Tutorial, but the images are broken?
If you're having trouble viewing the images it might just be that the SSL certificate hasn't been accepted.
If you view an image directly, like by clicking this link - https://camo.phpbb.com/4f2ef1e5d5e40e62 ... 782e4a5047 - you will be prompted to accept the certificate. Then the images should load fine :)

Re: [Tutorial] How to install a MODX modification

Posted: Tue Jul 08, 2014 9:42 pm
by rwmtiger
i got error 400

Re: [Tutorial] How to install a MODX modification

Posted: Tue Jul 08, 2014 9:52 pm
by 5hocK
rwmtiger wrote:i got error 400
I get this quite often too (once a week or so) - Deleting all board cookies and clearing your browser cache does the trick for me.

Re: [Tutorial] How to install a MODX modification

Posted: Wed Jul 09, 2014 1:56 am
by rwmtiger
thank for info