How can I find files for FTP in cms Drupal,where I can edit the code? There are a lot of folders and files, how to understand them? How or where can I see the required file pathes?
You should put your files in /sites/all dir.
Your theme(s) should be in /sites/all/themes and modules in /sites/all/modules, libraries in /sites/all/libraries. Don't change files out of /sites/all. By "your" I mean also on themes and modules you download/buy.
Related
I still have some problems to handle my assets in symfony. The best practices say, I should store my assets in web/.
But I dont like to store my raw sass files there, because its a public folder and I think only compiled or static files should be stored there.
Thats why I store them (js and sass) currently in app/Resources. And my assetic.read_from is app/Resources. But then there are some bundles, that are symlinked by assets:install to web/bundles/.
And now, when I want to include this bundle-assets in my twig files, I have to go there by ../../web/bundles/.. in the stylesheets block. That doesnt look very clean, so I did a symlink app/Resources/bundles->web/bundles/ and that works.
But I still think its too much fiddle and I would like to know if there is a cleaner way that better collects my assets in one place.
Don't use AsseticBundle, it was even removed in default symfony-standard 2.8. Managing frontend assets with php is workaround for someone who really don't want to use "the right tools"
I personally keep my source files in /assets/ and with Grunt JS I compile them to /web/assets/ which later is served from assets.somedomain.com through CDN
2 years ago I wrote post about managing assets with symfony, it's still valid and up to date. You might want to check it out.
http://konradpodgorski.com/blog/2014/06/23/better-way-to-work-with-assets-in-symfony-2/
I should extend post by things I learned since then but always not enough time :)
I don't see why you can't use web/ folder for your assets.
I often work with less and other file format which are afterward processed and minified.
The solution to your problem seems simple to me: Use two folder in the web/ folder.
The first folder would be your source/ folder. In which you would place all your sass files. You will add a .htaccess file to this same folder, and deny all access (you can copy from the .htaccess file in the src/ folder).
Then a second folder, lets call it assets which will hold all your compiled and minified assets.
That should do the trick... ;)
You may be interested in this topic as well. It may help to hide futher the existence of your source/ folder. ;)
If you really don't want to have your sources files in the web/ folder, then loot at this, it should help you place your sources files in your bundle.
Created a PHP project in Sublime Text 3 that holds PHP, CSS, JS, HTML, and some other files and folders. Other files may be .md, .txt, .ico, images and fonts (.woff, .ttf, ...).
Actually project is WordPress, but the solution should be for all PHP based projects, and specifically I am interested only to check specific folders inside of project (liek theme and plugin files). WordPress core is no interest for me to check.
I would like to detect Files with extensions (.php, .css, .js) that are unused. Is there a smart solution do detect these?
For instance CSS file is not used if no other files references it. The reference may came from another CSS file or from some PHP file, or even JS file.
I am not searching for a perfect solution, but for something that is close to detect these or even for an idea how I may think about these.
In WordPress (PHP) there are require and include instructions, and also wp_enqueue_script/styles that represent the mechanism how to reference files for instance.
So we could create a list of all PHP, CSS, JS files, and then based on file names search for these in the content of all other files. This would be a good start.
I created my own site using wordpress and I want to edit some code in some PHP files, but I don't know how to find my code file in the host. Can someone tell me how to find these files?
You can't edit in this files because source file is about server side.you can find the css files but not the source files. however, it's not advisable to edit a core file.
There is no solution to find out source file by any tool. because source file is about server side. you can find out css file name or path by firebug tool, but not the path of source code file.
A while ago I downloaded the latest version (3.1) of the CKEditor text editor.
The directory name was ckeditor and I deleted the ckeditor/_source and ckeditor/_samples sub-directories, then I referenced the ckeditor.js file in my html pages, like so :
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
This works well. To make config changes, I have been modifying the ckeditor/config.js file.
However, as of late, I have been reading various web resources that say 'do not delete the _source' folder and other such ominous messages.
What is this _source folder?
What is all the stuff at the root of the ckeditor folder? and,
What is safe to remove from the folder?
The _source folder are all the uncompressed scripts, and should be used just to read, learn and modify the code (that you must compress afterwards). It shouldn't be available in a production server.
The *.HTML files are docs for you to read
The *.php and *.asp are server integration that you don't need in the way that you are using
The *_source.js and ckeditor.pack are used to work with the _source folder and then generate the compressed version
The adapters folder includes other integration (currently jQuery)
I was wondering the same thing. I think it's explained pretty well on this page:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Minimum_Setup
I'm adding some pictures to my Drupal files folder.
I was wondering if Drupal remove the files not connected to any node as scheduling routine, from the files folder.
In other terms, I was wondering if I can place files into the "files" folder or if these can be deleted by the system
thanks
If you place a file with fx FTP Drupal wont delete them, it will only delete files it know about that are labeled temporary in the file system, like images generated by the ImageCache module, or js/css compressions.