Forums  ›  General  ›  General discussions

Tinymce and photos

The problem with long and difficult projects like that is maintaining interest. I'm the same with my model making where large projects drag me down and exhaust me. I find it essential to do little jobs I know I can finish in a couple of days during the big jobs to keep me motivated and allow fresh ideas to emerge. 

I can't offer much help other than to say I appreciate your support. It's a pity the forum is mostly my comments now that G_G is no longer with us, but for the people who read this, forums are one huge way of keeping the Admins focused and motivated. 

At some point the Tinymce modules that are used will be configurable by the admin for each of the editors without having to touch the code. Also the ability to enable/disable modules by membership as well. It's a planned feature for a future version. So eventually you won't have to modify code to do things like that.

I just need to get this stinking updater i am working on finished so i can get on with everything else. This new updater is important to me as it will greatly speed up my work allowing me to get updates out at a much faster pace. It's just taking more time then i had hoped to get the thing finished.

That works! What a difference it's going to make.

Thanks for your ongoing support.



Try this instead.

        if(!isAdmin()) {

If that does not work, i'll run some tests later tonight.

Ok i'll do some tests when i get out of work tonight and see if i can find a solution to get that working.

Thanks Deano.

The first option in your post allows me to get rid of the unwanted icons and I can switch files for the time being.

The second option is the solution I'd love to have, but it doesn't want to work. The array's are the same provided the first item is "0". It doesn't make the code crash, it just doesn't do anything. I even did a manual cache browser cache cleanup, but that didn't help. 

In templates\base\scripts\ChBaseEditorTinyMCE.php look for

$MODULES_STANDARD, $MODULES_MINI and $MODULES_FULL In there you will see a line starting with "image:

You should be able to comment those out with // in the front and it should disable the module.

Also you could just remove it for non admins by doing this which might be easier.

Look for.

public function attachEditor ($sSelector, $iViewMode = CH_EDITOR_STANDARD, $bDynamicMode = false)

Add this right under it.

if(!isAdmin()) {

I have not tested that, but it should remove the plugin on each of the 3 editor sizes for anyone who is not an admin assuming the positions within the array have not been modified.

I renamed plugin.min.js in Images and media in the plugins section and the icons vanished. I haven't tried using Tinymce yet, but that will do as a stopgap solution.

I'm not expecting this issue to be fixed, but I need to do something to overcome a problem that's developing on my site. A few members are adding photos to their Tinymce text, especially in messages. One person added 5 photos of over 4 meg each and it's started a bit of a chain reaction.

I need the photo upload facility because I regularly use it for the FAQ and Help files throughout the site. I post about ten photos a week, but all are thumbnail size because I know how to compress the things. 

Is there somewhere in the Plugins/Tinymce directory where I can easily remove and replace the photos icon as needed? If I knew what I was looking for, I'd be happy to do it as required and stop the photo hogs.

I recall reading some time ago that there was a Simple menu that just allowed Bold/Italic and pagination but I can't find any reference to it. It would be great if I could jump between either menu as needed.

I looked in the Tinymce help files online, but it was mumbo jumbo.



Is there some way that photos can be automatically reduced by Tinymce when they're uploaded? I don't want to take away the upload feature.

Not at this time. It has to be handled by the post acceptor script for the tinymce uploads. I created a issue for it in github.

I'll have to look into the other issues you reported. I'll see if there is a way i can deal with those as well.


There are more problems with the Tinymce image upload the further I delve.  I went to the post and successfully deleted the image, however the original 4meg image is still on the server. It looks like I have to delete unused images manually, but this causes so many headaches because I don't know which images are being used.

Secondly, I tried uploading another image to see if Tinymce offered some way of controlling what happened to the original. I dragged an image to the uploader, found nothing and cancelled the upload. Whoops! Despite aborting,  that unused image is now on my server!

The settings for the photos module allows you to set the size of photos.  The default setting allows for 3 meg photos to be uploaded, but these are automatically reduced to the default size (750 x 750?) This ends up with a photo of around 80 - 100 kb, which makes for faster loading on slower internet services.

I just uploaded a 4 meg photo in Modzzz' blogs using Tinymce and reduced it to 700 high, hoping that the photo would be resized by the module. The image does appear on the page as a 700  high photo, but when I downloaded it, the photo was still 4 meg. When I looked in the media folder, the image was also 4 meg and there's no resized photo. Tinymce obviously renders the photo for viewing and nothing else. I assume this will be the case throughout the site where members upload photos using Tinymce.  I always reduce my photos, but most site members don't. They upload massive photos without a care in the world, but I'm using a server with limited capacity and I can't allow it.

Is there some way that photos can be automatically reduced by Tinymce when they're uploaded? I don't want to take away the upload feature.

As an aside, our members should be aware that any module other than the Photos module may not reduce the size of the upload. I spoke to Anton about this a few years ago and he agreed that it was a problem, which he fixed on the AQB modules I was using.