| Re: How imagemanager not to randomize image filename? |
| by bjuti on 2012/11/28 19:57:49 It's all working fine, but I've found restriction od imagename of 24 chars. Is it possible to override it? |
| Re: How imagemanager not to randomize image filename? |
| by bjuti on 2012/11/28 16:14:53 It works! Tnx! |
| Re: How imagemanager not to randomize image filename? |
| by trabis on 2012/11/28 0:28:44 You need to make changes in file class/uploader.php Line 354: le="color: #000000"><?php if (isset($this->targetFileName)) { $this->savedFileName = $this->targetFileName; } else if (isset($this->prefix)) { $this->savedFileName = uniqid($this->prefix) . '.' . strtolower($matched[1]); } else { $this->savedFileName = strtolower($this->mediaName); } If you want to use file name: le="color: #000000"><?php if (isset($this->targetFileName)) { $this->savedFileName = $this->targetFileName; } else { $this->savedFileName = strtolower($this->mediaName); } Will save as: 'the_file_name.jpg' If you want to use both file name and prefix (you should use this to prevent overwrite an already existing image with the same file name): le="color: #000000"><?php if (isset($this->targetFileName)) { $this->savedFileName = $this->targetFileName; } else if (isset($this->prefix)) { $this->savedFileName = strtolower(str_replace($matched[0], '', $this->mediaName) . '-' . uniqid($this->prefix) . $matched[0]); } else { $this->savedFileName = strtolower($this->mediaName); } Will save as: 'the_file_name-img50b558777727d.jpg' |
| Re: How imagemanager not to randomize image filename? |
| by bjuti on 2012/11/27 18:26:23 Well it's not working. It is working when I use system module image manager and upload picture from it. But when I click in eg. TinyMCE to add a picture it's stil img8746we8q.jpg or something. Any idea, please? |
| Re: How imagemanager not to randomize image filename? |
| by bjuti on 2012/11/25 10:27:35 I've found it! In file 'modules/system/admin/images/main.php' remove or put under comment line 438: le="color: #000000"><?php $uploader->setPrefix('img');
|