Page 1 of 1

[AutoMOD] Installing linked MODX files

Posted: Tue Jun 30, 2009 9:11 am
by poyntesm
Hello,

I have just setup a 3.0.5 board and installed AutoMOD RC02 .. I have a MOD using MODX 1.2.2

In my main install.xml I have the following

Code: Select all

		<link-group>
			<link type="template" href="./xml/subsilver2.xml" lang="en">subSilver2</link>
			<link type="template-lang" href="./xml/subsilver2-en.xml" lang="en">subSilver2 English</link>
		</link-group>
This is the new linkgroup and link tags as provided by modx 1.2.2

However once the MOD installs OK I see nowhere in AutoMOD where this linked MODX is available as a link or even displayed to user. Anyone else using this with success?

Thanks,
Esmond

Re: [AutoMOD] Installing linked MODX files

Posted: Tue Jun 30, 2009 10:34 am
by poyntesm
Pretty sure its a bug, change the type to contrib and they display. Going to have a look at AutoMOD code to try work out why...

Re: [AutoMOD] Installing linked MODX files

Posted: Tue Jun 30, 2009 4:03 pm
by A_Jelly_Doughnut
Well, I intended to remove the template from displaying, but not the other two ... will have a closer look once I'm fully "back"

Re: [AutoMOD] Installing linked MODX files

Posted: Tue Jun 30, 2009 5:03 pm
by poyntesm
Hi,

I will try catch you on IRC tomorrow as I have seen some stuff I am not sure is bug or not, easier to chat and describe..so hopefully I chat you tomorrow on IRC

Re: [AutoMOD] Installing linked MODX files

Posted: Tue Jun 30, 2009 7:30 pm
by A_Jelly_Doughnut
Per my signature, I'm on holiday and unlikely to be on IRC. Feel free to drop me a PM, and I may respond if I'm online, or try to catch me next week when I'm back at home :)

Re: [AutoMOD] Installing linked MODX files

Posted: Wed Jul 01, 2009 8:37 am
by poyntesm
Firstly hope you have a great holiday.

OK, so I would like to understand the intended process for the following scenarios. I know it might be long post and I am not trying to create more work when you are in RC stage ... but I have seen funny results and want to understand the intended behaviour before I proceed to bug reports or to look to the code.

So lets take a simple(ish) example. A MOD with a main MODX file (install.xml) this main file links to the follow files
  • subsilver (link type = template)
  • subsilver english (link type = template-lang)
  • french (link type = language)
  • subsilver french (link type = template-lang)
  • prosilver french (link type = template-lang)
Each of these MODX files link back to main as parent type. Looks like a lot of files, but really only supporting English & French and subSilver & prosilver. So quiet common I think ... 2 languages and 2 standard styles.

Now lets look at very common scenarios that will happen.

Scenario 1)
User has a board with en & prosilver only. What is intended behavior for mod details from frontend before install? Should it show you all linked files or none, since all linked are for not yet installed components. i.e you have not subsilver or french installed. What What is intended behavior after install?

Scenario 2)
User had board with en & prosilver & subsilver installed. What is intended behavior for mod details from frontend before install? What will AutoMOD automatically edit?

Scenario 3)
User had board with en & fr & prosilver installed. What is intended behavior for mod details from frontend before install? What will AutoMOD automatically edit?

Scenario 4)
Same as scenario 1, user had en & prosilver and installed MOD, then they installs subsilver. What will AutoMOD show now for mod details?

Scenario 5)
Same as scenario 1, user had en & prosilver and installed MOD, then he installs fr. What will AutoMOD show now for mod details?

To my eyes with this example MOD and 5 scenarios you cover all computations and I am very interesting to know the bahaviour you expect/designed AutoMOD to display.

Hope its OK if you can take the time to respond to this when you get a chance.

Regards
Esmond

Re: [AutoMOD] Installing linked MODX files

Posted: Sat Jan 23, 2010 10:36 pm
by alf007
I'm in scenario 5) (2 styles, 2 languages)

From my experiments, the linked modx for languages generally installs auto-magically with the main install as per code changes displayed in report.. Though in the ACP/AUTOMOD Details view for the MOD, the linked modx for languages are displayed in "Available Changes" and still proposes to install thoses.
Also sometimes it doesn't install at all, still displays in "Avalaible Changes", but without install link :?: it may be tied to the naming of the linked modx file, for it to go the acceptable first way, or to this second unlucky way.

This other topic about language installation is of interest.

And BTW, i'm not sure of having seen this in coding guideline, but maybe i'm wrong, thouhg it should be better to use the function than the array when accessing language text, like in

Code: Select all

... $user->lang('NAME') ...
is better than

Code: Select all

... $user->lang['NAME'] ...
to prevent throwing error when the term is missing from the other-than-english language files, on an other-than-english default language using board...

Re: [AutoMOD] Installing linked MODX files

Posted: Sun Jan 24, 2010 12:52 am
by A_Jelly_Doughnut
alf007 wrote:I'm in scenario 5) (2 styles, 2 languages)

From my experiments, the linked modx for languages generally installs auto-magically with the main install as per code changes displayed in report.. Though in the ACP/AUTOMOD Details view for the MOD, the linked modx for languages are displayed in "Available Changes" and still proposes to install thoses.
Also sometimes it doesn't install at all, still displays in "Avalaible Changes", but without install link :?: it may be tied to the naming of the linked modx file, for it to go the acceptable first way, or to this second unlucky way.
Yes, you're right. However, starting with the next version, AutoMOD should halt if someone would click on the link to install a previously-installed language.

And BTW, i'm not sure of having seen this in coding guideline, but maybe i'm wrong, thouhg it should be better to use the function than the array when accessing language text, like in

Code: Select all

... $user->lang('NAME') ...
is better than

Code: Select all

... $user->lang['NAME'] ...
to prevent throwing error when the term is missing from the other-than-english language files, on an other-than-english default language using board...
This is not addressed in the phpBB coding guidelines. You're technically right, that $user->lang() is more robust than calling the array $user->lang. However, the method call is rarely used, more for speed purposes.