You are right about just doing this
MODX_ASSETS_URL.'/components/myExtra/images/bliss.jpg';
Only here do I need that extra slash because
basename will not include it.
basename(MODX_ASSETS_URL).'/components/myExtra/images/bliss.jpg')
becomes
assets/components/myExtra/images/bliss.jpg)
After a billion tests, those errors come up only when rendering the said resource in the Manager.
Now I am going to try to solve my
question #2 about creating resources/chunks/ assets files only on user-selected option.
#2. I have been trying to understand user input and default resolver and all, but no progress. I want to make a LITE version of my Extra. I don't want certain asset folders to be installed, and chunks and demo resources
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
Take a look at the user.input.php script in the MyComponent Example project and the comments in it.
Chapter 13 of my book has a complete example of how to respond to user input during the install in a transport package (and a lot of other info about transport packages). If you have the e-book, search for user.input.php
After years of using packMan to create the simple transport files for my snippets I decided to get up to speed with myComponent. Naturally I went to you fine tutorial and started following the steps with the example file. Unfortunately for me I got stuck at number 4 when I found no directory named "core/components/mycomponent/config" There was one named "core/components/mycomponent/_build/config" with the "/example.config.php" file in it but that is NOT what it says in the tutorial, both the one on you site and the one included in the docs. Am I doing something wrong? This is in a test site, Modx 2.5.1-pl, with nothing but myComponent installed.
I can't see where this ominous #4 is but your main concern is
core/components/mycomponent/_build/config/yourExtra.config.php
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
I think it might have been a typo ...
On my system, there is no
\core\components\mycomponent\config\ folder
Only
\core\components\mycomponent\_build\config\
QUICK STEPS
- Put all your MODX elements under the same-name category, which should be the name of your Extra
- Open/View MyComponent Resource - enter exact name of your extra, and create new project
- Carefully edit the \core\components\mycomponent\_build\config\yourExtra.config.php
- Go back to MyComponent Resource (1) Bootstrap... (2) Export Objects... (3) Build
- Enjoy
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
Definitely a typo. I've fixed it. It's amazing that no one has noticed it before.
Thanks for the heads up.
Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
New Question:
I have a small snippet named getFolders. I usually use it within my getImages snippet but it works fine on it's own and at one time I had a working version of it in the repository. I had used packMan to create the transport. I did a minor upgrade and when I tried to upload the change it became corrupted and since then I am unable to create a new transport package for it in either packMan or now using myComponent. It simply fails and their is nothing in the logs. This is what I get when clicking build: "Could not find build.transport.php at: /var/www/clients/client3/web29/web/assets/mycomponents/getfolders/_build/build.transport.php"