Development environment
Gordon
Junior Member
Posts: 23
pred 10 rokmi 3 mesiacmi #301
od Gordon
Never doubt that a small group of committed people can change the world. Indeed, it is the only thing that ever has... Margaret Mead
Gordon Wright
Old fart developer
Odpoveď od Gordon na tému Development environment
The only other thing I can add to my original post on this thread is I use DeltaWalker for installation file comparisons. I keep all the versions I build and download from Component Creator, and use this tool to check on the changes. I find it more useful than PHPStorm in the comparison area. This has been very helpful in spotting changes that have broken my component, and keeps me up-to-date with what these guys are doing. My projects are small enough to make this the most efficient way for me.
Never doubt that a small group of committed people can change the world. Indeed, it is the only thing that ever has... Margaret Mead
Gordon Wright
Old fart developer
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Jonas Fagnastøl Henriksen
New Member
Posts: 15
pred 10 rokmi 3 mesiacmi #302
od Jonas Fagnastøl Henriksen
Odpoveď od Jonas Fagnastøl Henriksen na tému Development environment
Hei Søren,
I'm not so sure this is the "correct" way, actually, but I find I save a lot of time doing it this way
I'm not so sure this is the "correct" way, actually, but I find I save a lot of time doing it this way
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Joris Ceelen
New Member
Posts: 9
pred 10 rokmi 1 mesiacom - pred 10 rokmi 1 mesiacom #406
od Joris Ceelen
Odpoveď od Joris Ceelen na tému Development environment
Nice topic, I see it is an idea not to touch the code and use Joomla Overrides but for now I prefer merging the updates with GIT.
My current environment is:
marklodato.github.io/visual-git-guide/index-en.html#detached
and
nvie.com/posts/a-successful-git-branching-model/
Joris
My current environment is:
- www.eclipse.org with PHP IDE + LESS Editor
- www.eclipse.org/egit for visually tracking changing and merging code with GIT as suggested, I also use the GIT command line for a database backups on certain commits as hooks don't work in EGIT.
- GITLAB.COM for pushing the GIT repository to, they allow free private repositories and is a good alternative to GITHUB.COM
- LAMP, WAMP, whatever you prefer with APACHE and XDebug for debugging PHP through Eclipse all on Virtualbox or KVM so you can destroy it by accident and recreate it.
marklodato.github.io/visual-git-guide/index-en.html#detached
and
nvie.com/posts/a-successful-git-branching-model/
Joris
Posledný krát upravené:pred 10 rokmi 1 mesiacom Joris Ceelen
Nasledujúci užívateľ(ia) povedali ďakujem: Andres Maeso
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Pete
Junior Member
Posts: 27
pred 9 rokmi 9 mesiacmi #610
od Pete
Odpoveď od Pete na tému Development environment
Hi Jonas
"I load this in with a onPrepareForm - function in a plugin"
Are you able to share this xml override plugin code? I think your method of overides is awesome and am going to give it a go!
I mainly will use it to replace standard FIELD types with custom types that I have created but are not supported by CC..
I have asked the devs to allow us to create custom FIELD placeholders, by just pasting in the whole XML STRING, but not sure whether/how long it will be to implement that sort of thing..
Cheers,
Pete
"I load this in with a onPrepareForm - function in a plugin"
Are you able to share this xml override plugin code? I think your method of overides is awesome and am going to give it a go!
I mainly will use it to replace standard FIELD types with custom types that I have created but are not supported by CC..
I have asked the devs to allow us to create custom FIELD placeholders, by just pasting in the whole XML STRING, but not sure whether/how long it will be to implement that sort of thing..
Cheers,
Pete
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Jonas Fagnastøl Henriksen
New Member
Posts: 15
pred 9 rokmi 9 mesiacmi - pred 9 rokmi 8 mesiacmi #613
od Jonas Fagnastøl Henriksen
Odpoveď od Jonas Fagnastøl Henriksen na tému Development environment
Hi Pete,
the plugin code is very simple:This plugin loads the xml-file newxml.xml from the same folder the plugin file lives in. newxml.xml could be
This would replace the field foo with your own field description, in this case a custom foreignkey-type. In this case you would also define a file myforeignkey.php in /plugins/content/modifyxml/fields with whatever code you need.
I have to say I have also started using git in a way that works nicely (like Joris Ceelen suggested) and can keep your own changes:
- Make a branch for your new component, like com_mycomponent-vanilla
- always install new versions from the component-builder in this branch
- after installation and committing the new changes to the vanilla - branch, you checkout your development-branch again, and you rebase or merge this with the vanilla-branch.
like:
git checkout com_mycomponent-vanilla
# install the component in /administrator the usual way
git commit -am "saving new changes from the componentbuilder" # you might need to add new files first
git checkout master
git merge com_mycomponent-vanilla
# alternatively use git rebase
regards Jonas
the plugin code is very simple:
class PlgContentModifyXML extends JPlugin{
function onContentPrepareForm($form, $data) {
$app = JFactory::getApplication();
$option = $app->input->get('option');
if($option=="com_yourcomponent") {
JForm::addFormPath(__DIR__);
$form->loadFile('newxml', false);
return true;
}
}
}
<?xml version="1.0" encoding="utf-8"?><form>
<fieldset addfieldpath="/plugins/content/modifyxml/fields">
<field name="foo" type="myforeignkey" class="inputbox" label="Foo field"
description="Foo field description" input_type="list" table="#__sometable"
key_field="id" value_field="name" />
</field>
</fieldset>
</form>
I have to say I have also started using git in a way that works nicely (like Joris Ceelen suggested) and can keep your own changes:
- Make a branch for your new component, like com_mycomponent-vanilla
- always install new versions from the component-builder in this branch
- after installation and committing the new changes to the vanilla - branch, you checkout your development-branch again, and you rebase or merge this with the vanilla-branch.
like:
git checkout com_mycomponent-vanilla
# install the component in /administrator the usual way
git commit -am "saving new changes from the componentbuilder" # you might need to add new files first
git checkout master
git merge com_mycomponent-vanilla
# alternatively use git rebase
regards Jonas
Posledný krát upravené:pred 9 rokmi 8 mesiacmi Jonas Fagnastøl Henriksen
Nasledujúci užívateľ(ia) povedali ďakujem: Pete
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Pete
Junior Member
Posts: 27
pred 9 rokmi 9 mesiacmi - pred 9 rokmi 9 mesiacmi #615
od Pete
Odpoveď od Pete na tému Development environment
Thanks so much Jonas!
I'll give that all a go..
I would just like to add I found a plugin just now which is at a cursory glance, more generic (and XML file in any component) but I like yours as it limits the impact on unrelated components!
here it is anyhow..
extensions.joomla.org/profile/extension/...us/form-xml-override
Regarding the XML field replacement,
I assume that I can replace only 2 fields out of 4 in the origonal xml file using the following code? If so then I assume the field called foo overrides the origonal, and the foo2 does the same, but the other foo3 and foo4 will be left unless I add them in this override XML file ?
I'll give that all a go..
I would just like to add I found a plugin just now which is at a cursory glance, more generic (and XML file in any component) but I like yours as it limits the impact on unrelated components!
here it is anyhow..
extensions.joomla.org/profile/extension/...us/form-xml-override
Regarding the XML field replacement,
I assume that I can replace only 2 fields out of 4 in the origonal xml file using the following code? If so then I assume the field called foo overrides the origonal, and the foo2 does the same, but the other foo3 and foo4 will be left unless I add them in this override XML file ?
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset addfieldpath="/plugins/content/modifyxml/fields">
<field name="foo" type="myforeignkey" class="inputbox" label="Foo field"
description="Foo field description" input_type="list" table="#__sometable"
key_field="id" value_field="name" />
</field>
<field name="foo2" type="myforeignkey" class="inputbox" label="Foo2 field"
description="Foo2 field description" input_type="list" table="#__sometable2"
key_field="id" value_field="surname" />
</field>
</fieldset>
</form>
Posledný krát upravené:pred 9 rokmi 9 mesiacmi Pete
Prosím Prihlásiť alebo Registrácia pre zdieľanie konverzácie.
Čas vytvorenia stránky: 0.057 sekúnd