[Tutorial] How to install a MODX modification

Discussion forum for MOD Writers regarding MOD Development.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [Tutorial] How to install a MODX modification

Post by Martin Truckenbrodt » Sat Feb 16, 2013 10:35 am

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
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!

User avatar
Haravikk
Registered User
Posts: 261
Joined: Sat Nov 02, 2002 4:42 pm

Re: [Tutorial] How to install a MODX modification

Post by Haravikk » Sat Feb 16, 2013 11:21 am

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.

User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt
Contact:

Re: [Tutorial] How to install a MODX modification

Post by Martin Truckenbrodt » Sun Feb 17, 2013 1:44 pm

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
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!

User avatar
BiGDiL
Registered User
Posts: 2
Joined: Thu Jul 12, 2012 5:18 am
Name: Uriah Sanuani
Contact:

Re: [Tutorial] How to install a MODX modification

Post by BiGDiL » Sun Apr 07, 2013 1:12 pm

thanks for the info.
Uriah Sanuani!
phpBB.co.il - The Official Hebrew Version of phpBB!

johnmatthew84
Registered User
Posts: 1
Joined: Fri May 10, 2013 9:47 am

Re: [Tutorial] How to install a MODX modification

Post by johnmatthew84 » Fri May 10, 2013 9:50 am

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.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 18124
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: [Tutorial] How to install a MODX modification

Post by Mick » Fri May 10, 2013 4:50 pm

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?
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

TheRaj
Registered User
Posts: 6
Joined: Mon Nov 11, 2013 4:38 pm
Name: Raju Patel

Re: [Tutorial] How to install a MODX modification

Post by TheRaj » Mon Nov 11, 2013 5:10 pm

Thanks for the tutorial, it saved my precious time :D

User avatar
Francoisjunior
Registered User
Posts: 11
Joined: Fri May 02, 2014 5:19 am

Re: [Tutorial] How to install a MODX modification

Post by Francoisjunior » Fri Jun 06, 2014 11:48 pm

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 :)

User avatar
Korkel
Registered User
Posts: 391
Joined: Mon Jun 02, 2014 7:09 am
Location: ~/home/Liz/Desktop
Name: Liz Aalderink
Contact:

Re: [Tutorial] How to install a MODX modification

Post by Korkel » Fri Jun 20, 2014 8:08 am

Great Tutorial, but the images are broken?
"If you lose your left arm, your right arm will be left."
“The most important property of a program is whether it accomplishes the intention of its user.”
Image

User avatar
tmbackoff
Former Team Member
Posts: 6995
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: [Tutorial] How to install a MODX modification

Post by tmbackoff » Fri Jun 20, 2014 12:40 pm

They don't seem to be broken for me

User avatar
all4phone
Registered User
Posts: 593
Joined: Fri Mar 18, 2011 11:56 am
Location: Poland
Name: Piotr
Contact:

Re: [Tutorial] How to install a MODX modification

Post by all4phone » Mon Jun 30, 2014 1:09 am

Thanks for the tutorial.
I can confirm the images are fine.

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10805
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: [Tutorial] How to install a MODX modification

Post by battye » Mon Jun 30, 2014 9:18 am

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 :)
Customisations Team Member

User avatar
rwmtiger
Registered User
Posts: 20
Joined: Mon Jul 07, 2014 6:45 am

Re: [Tutorial] How to install a MODX modification

Post by rwmtiger » Tue Jul 08, 2014 9:42 pm

i got error 400
Image

User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: [Tutorial] How to install a MODX modification

Post by 5hocK » Tue Jul 08, 2014 9:52 pm

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.
A thread is pretty much a topic. Stop with the pedantics will ya.

User avatar
rwmtiger
Registered User
Posts: 20
Joined: Mon Jul 07, 2014 6:45 am

Re: [Tutorial] How to install a MODX modification

Post by rwmtiger » Wed Jul 09, 2014 1:56 am

thank for info
Image

Locked

Return to “[3.0.x] MOD Writers Discussion”

Who is online

Users browsing this forum: No registered users and 11 guests

cron