2 edb Jul 16, 2006 18:47

superjacent wrote:
Is it possible within b2evo to set a setting for the media directory to something other than media/blogname?
In the file at conf/file _admin.php you can set the value of the global string $fileupload_url, which contains the name of the directory to which uploaded images will be saved.
There's also a variable $fileupload_realpath, and I'm not sure how that interrelated with $fileupload_url. The latter is referenced by admin/b2upload.php when the code fragment is being generated for the blogger to include in her/his post.
/**
* Enter the URL of that directory
*
* This is used to generate the links to the pictures
* Example: $fileupload_url = 'http://example.com/media';
* Alternatively you may want to use an URL relatibe to $baseurl
*
* @global string $fileupload_url
*/
$fileupload_url = $baseurl.'/media';
That was back in the 0.9.* days but has been deprecated beginning with 1.6. From the 1.8 version of that file:
/**
(snip)
* @global string $fileupload_realpath
* @deprecated 1.6: the user uploads to his own media folder (or somewhere else with write permissions)
* This is still used by MMS and XMLRPC though.
*/
$fileupload_realpath = $basepath.'media/'; # WARNING: slashes moved!
/**
(snip)
* @global string $fileupload_url
* @deprecated 1.6: the user uploads to his own media folder (or somewhere else with write permissions)
* This is still used by MMS and the MT importer though.
*/
$fileupload_url = $baseurl.'media/'; # WARNING: slashes moved!
I'm not sure how tinkering with it will address superjacent's concerns. Perhaps someone will tinker and post about what happens?
I've been tinkering a little bit with a trial blog and I've found that you can change the media directory location from within the back-office.
Blog Settings / Blog Name / Advanced
then 'Media dir location'. Is here where another location can be specified.
Hello!
I just want ALL media in the "root" media folder (like it was in 0.9.0.0.
How can I do this? Is the only way to put in the whole URL in the back office to "individual place"?
Regards
Sopur
I've only got a small understanding of how the file manager deals with stuff, but one thing I can say is there is an option to upload to media/user instead of (or in addition to?) media/blogname. I think you should have no problems continuing with your current method of Post2Blog because that's not something b2evolution plays a role in. The only issue you might find is that the file manager knows nothing about the files you've uploaded through any other method. In other words, if it came through Post2Blog or plain old FTP file manager doesn't see it.
Hope it helps.