-
AuthorPosts
-
March 4, 2010 at 2:24 pm #149209
hi,
i want dashes and Caps to be automaticly replaced when users upload a thumbnail using the “IMAGE” (plg_jathumbnail) tool integrated in the tinymce editor.
for example when someone uploads an imagel like this:
John Doe.jpg
i want it automaticly converted to this:
john_doe.jpg
can this be done? if this includes custom programming, please let me know what i should ask for on scriptlance.com
thanks
histeriks Friendhisteriks
- Join date:
- December 2009
- Posts:
- 285
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 114 times in 87 posts
March 4, 2010 at 8:39 pm #334896fmedia;167702hi,
i want dashes and Caps to be automaticly replaced when users upload a thumbnail using the “IMAGE” (plg_jathumbnail) tool integrated in the tinymce editor.
for example when someone uploads an imagel like this:
John Doe.jpg
i want it automaticly converted to this:
john_doe.jpg
can this be done? if this includes custom programming, please let me know what i should ask for on scriptlance.com
thanks
Hi fmedia.
Can i suggest you switch to JCE? It will do what you want by default, and it’s much better editor.
March 4, 2010 at 9:59 pm #334909i couldnt get the JCE work properly with the plg_jathumbnail plugin. any ideas?
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
March 5, 2010 at 8:17 am #334989Hi fmedia
JCE is adding some codes into img tag.
You have to configure so that JCE don’t add some codes to img tag.
Please kindly check again
March 6, 2010 at 7:06 am #335043ok i tried JCE again but how do i set up JCE to reject or auto-correct images like this? isnt that something that should be done on plg_jathumbnail plugin instead?
John Doe.jpg
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 9, 2010 at 9:38 am #335462Dear fmedia
I think that the JCE Editor has not any plugins or any extensions having the function as you like:
<blockquote>
John Doe.jpgi want it automaticly converted to this:
john_doe.jpg
</blockquote>I’ll give you the solution to the ja thumbnail plugin to be work well with any kind of image’s name.
pls open the file pluginscontentplg_jathumbnail.php and try to find codes at line: 264 ( in my files):
[PHP]
$ext = strtolower(substr(strrchr($image, ‘.’), 1)); // get the file extension
$rzname = strtolower(substr($image, 0, strpos($image,’.’))).”_{$dst->w}_{$dst->h}.{$ext}”; // get the file extension
[/PHP]
replace:[PHP]
$ext = (substr(strrchr($image, ‘.’), 1)); // get the file extension
$rzname = (substr($image, 0, strpos($image,’.’))).”_{$dst->w}_{$dst->h}.{$ext}”; // get the file extension
[/PHP]and find codes at line 274:
[PHP]
$folders = explode(‘/’,strtolower($image));
[/PHP]
replace:
[PHP]
$folders = explode(‘/’,($image));
[/PHP]
After done, pls check this issue in detail and give me the result 🙂Good luck
-
AuthorPosts
This topic contains 6 replies, has 4 voices, and was last updated by Saguaros 14 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum