TinyMCE Photo Insert

I have had a few instances where someone uses the Insert/Edit image icon in the forums, adds a URL to a huge photo and it throws the forum layout out of whack..

 

Is there a way to set a max height and width to that? I know users can choose the options but most ignore it..

Nothing to see here
Quote · 22 Nov 2014

This might help.

http://www.tinymce.com/wiki.php/MCImageManager:imagemanager_insert_template

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 22 Nov 2014

or this.

Forcing formatting options

One common problem with users uploading images is that they tend to upload their 3000×2000 pixel camera images, any images larger than say 640×480 isn’t usually used on websites, unless you are publishing print quality pictures for press releases or similar. One way to force this, is to set formatting options in the only folder they are allowed to upload files, there are actually various ways to configure this, you can simple force a site wide upload.format option that places different sized files in different folders. This example is for use inside an mc_access file.

Create a file called mc_access in the folder where images are stored.

upload.format=640x480=%f_%w_%h.%e

This will create a file named <filename>_640_480.<ext> if uploaded in that folder (or any subfolder). The size will be forced to this.

http://www.tinymce.com/wiki.php/MCImageManager:Tips_&_Tricks

Vunderba..... Challenge Yourself to be the Best...... Hosting from Zarconia.net
Quote · 22 Nov 2014

Yes, it is possible and I have used it on my site. Look in the main.css of the module forum layout for the class: forum-post-img

Geeks, making the world a better place
Quote · 22 Nov 2014

I don't want to 'force' this size, just make it a maximum. I use Pkforum and not Orca on my site, so there is no forum-post-img in the main.css

 

Nothing to see here
Quote · 22 Nov 2014

 

I don't want to 'force' this size, just make it a maximum. I use Pkforum and not Orca on my site, so there is no forum-post-img in the main.css

 

OK, then use firebug or equivalent and right click on the image to see what classes are applied; you may have to look back a bit to the container but you should be able to find the class where you can control this. 

Geeks, making the world a better place
Quote · 22 Nov 2014
.forum_post_text img, .forum-post-img {
    background-color: #fff;
    height: auto;
    margin-left: 2px;
    max-width: 1000px;
}
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Nov 2014

HL, where are you referring to add this code? In the Pkforums general.css?

Nothing to see here
Quote · 22 Nov 2014

I went to the PKForum test site and inserted an image using a URL and it resulted in a horizontal scroll bar; which works, but scaling the image down would be better.

I examined the code and did not see a class for the image.  What you will need to do is to edit the template for PKForum and add in your own class to control the image size; you could add it to the division that holds the image so that all divisions with that class will apply it to the image tag. <div class="pkforum-the-post bx-def-font-large">

Geeks, making the world a better place
Quote · 23 Nov 2014

GG -I know some of the things used by Pkforums is inherited from the templates/base/ directory. So it may be possible that the setting is being used by some other css or class.

 

When I do that at my site with a large image, the image stretches outside forum box causing the layout to get all jacked up.

Nothing to see here
Quote · 23 Nov 2014

 

HL, where are you referring to add this code? In the Pkforums general.css?

 I don't have pkforum, so that's probably right

What I posted was for orca.  This should do it for pkforum:

.pkforum-the-post img {
height:auto !important;
max-width:800px !important;
}

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 23 Nov 2014

Ok.. I will give that a shot HL and see what happens.

 

Nothing to see here
Quote · 23 Nov 2014

Nope. I tried it in 3 different css files an neither worked. Oh well. Worth a shot.

Nothing to see here
Quote · 23 Nov 2014

I'm starting to think that this has nothing to do with the forum's css at all. Looking on Google, it may have something to do with the TinyMCE plugin directory called advimage. Not exactly sure yet.

Nothing to see here
Quote · 23 Nov 2014

 

I'm starting to think that this has nothing to do with the forum's css at all. Looking on Google, it may have something to do with the TinyMCE plugin directory called advimage. Not exactly sure yet.

I doubt it is that; we just need to figure out the PKForum classes.  I suggest you putting in a post over at the PKForum support forum and see what the guys that wrote PKForum has to say.

Geeks, making the world a better place
Quote · 23 Nov 2014

 RE:

Nope. I tried it in 3 different css files an neither worked. Oh well. Worth a shot.

 That should have worked.  It worked in Firebug. It's impossible to tell which css file it needs to be in since the pkforum demo site has caching turned on. 

<div class="pkforum-the-post bx-def-font-large">

The pkforum posts are always inside this div, so what I posted is the proper way to target an image tag inside this div.

</div>

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 23 Nov 2014

Do a "search in files" for the class using one of the tools; PsPad is what I use but there are other proggies that will do the same; that should help you to locate the class.

Geeks, making the world a better place
Quote · 23 Nov 2014

I found 3 hits with pkforum-the-post. 1 js, 1 css, and 1 html.

 

HL, You are saying that the code you provided should have worked when used i the css file? Does it matter where it goes?

Nothing to see here
Quote · 23 Nov 2014

I was able to get this resolved with the assistance of Pkforum support. Thanks!

Nothing to see here
Quote · 24 Nov 2014

 RE

I was able to get this resolved with the assistance of Pkforum support. Thanks!

 That's OK... don't tell anyone what resolved your issue.  Keep 'em wondering.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 24 Nov 2014

Sorry, added this to the topic.css

 

.pkforum-the-post img {
    max-width: 600px:

    height: auto;
}

Nothing to see here
Quote · 24 Nov 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.