I need a simple way for my client to create a link on a page to a pdf file and, at the same time, be able to upload the pdf file that will be linked.
Ideally, he will be able to select some text, click the link button, select or upload the PDF file to any folder, then click OK and the link will work. Unfortunately, the system does not allow me to select folders to choose from nor does it allow me to upload a pdf file. I’m sure I’m missing something simple here.
Any suggestions? Thanks!
you can use tinyMCE link option...
CTRL+SHIFT+U - Clear Cache
CTRL+SHIFT+H - Hiding Heft Panel
CTRL+SHIFT+N - Fast Create Resource
CTRL+ALT+P - Preview Recource (in edit resorce window)
CTRL+ALT+S - Save
Yes, I have tried to use TinyMCE however it does not let me change directories, does not let me create new directories and when I try to upload a small PDF test file to the default directory, I get an error message that says "invalid XML response from connector".
I imagine i need to set some permissions somewhere to be able to allow uploads. Where would that be?
Thanks
The path that you need to look into is the Resource Path. The File Manager path is related to the File Manger module, not the Resource Browser.
The Resource path should point to your assets folder, not the root.
MODx will set the paths automatically when possible, they may not always be correct (but usually are). If you are not using the default admin (ID1) then you need to make sure that the checkboxes to use the defaut file types and paths is selected. Sometimes these may not have been selected when creating new users.
Make sure that the upload folders have the correct permissions to upload files to.
Great, thanks. What should these permissions be? 777? or something different? Also, if i set the assets folder permissions to 777, will that create some sort of security hole for the other items in the assets directory? Just want to make sure.
Thanks
-
☆ A M B ☆
- 24,524 Posts
It depends on your system’s configuration. If PHP is an Apache module and no suexec features are configured, then all of your php scripts are running as the Apache user, not the file owner’s user (you). This means any folders your scripts will want to write to (such as writing cache files to the /assets/cache folder) need to be writable by everybody (777), since you own the folder, but the script writing the files are running as a different user. You need to have any folders that a script will write to set to 777. The usual "suspects" are the assets/cache, assets/files, assets/images and assets/exports folders. If you are using something like MaxiGallery you’ll need to set its assets/galleries folder to 777 as well. Don’t set anything 777 that you don’t have to.
If your system is configured to have a script run as the file’s owner (suexec of some kind or another) then when the script (php file, in this case) runs it gets changed to run as the owner (you). In this case, the folders don’t need to be world-writable, just owner-writable (755, usually) I make sure any hosting I use has this configuration, since it is more secure.
As far as the paths are concerned, after you make sure the two places in the site configuration where these are specified (one for the resource browser in the rich text editor and one for the Manager’s file manager) are set correctly, you need to make sure the individual manager users also have the correct settings. You can check the "use system default" box, or specify exact paths for each user.
You can determine your correct file paths by looking at Reports -> System Info, then clicking on the phpinfo link. Server settings, including path information, are at the bottom of the phpinfo report.