Auto resize

Support for ANY phpBB3 related issue.
- MOD Support requests should be asked in the specific MOD topic -
Any version of phpBB3 is supported.
Forum rules
READ: StarTrekGuide.com Board Rules

Users are requested to fill out the Support Request Template and include it in every support request.

As a general rule, Support for a Specific MOD should be requested in the specific MOD topic, as it would alert the MOD Author of the support request.
Please specify if you have any MODs installed on your board when asking for support.

phpBB support requests allowed
MOD Requests and Generic discussions not allowed

Auto resize

Postby _Chris_ » 08 Jul 2012, 13:35

When the users are posting images, some of the images are coming out way too wide - is there any way of getting them to auto resize, say to 300px wide.

Any help appreciated.
_Chris_
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 164
Joined: 19 Aug 2010, 09:06
Gender: Male
phpBB Knowledge: 1


Re: Auto resize

Postby skash » 08 Jul 2012, 13:53

tell them to use a 3rd party image hosting service, such as image shack.
User avatar
skash    
Supporter
Supporter
 
Posts: 52
Joined: 25 Nov 2006, 22:59
Favorite Team: Port Adelaide
Gender: Male
phpBB Knowledge: 2

Re: Auto resize

Postby Sniper_E » 08 Jul 2012, 16:04

Install Lightbox or Highslide on your forum.
Or search for one of these at .com for a phpBB install.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6981
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Auto resize

Postby _Chris_ » 08 Jul 2012, 22:38

Sniper_E wrote:Install Lightbox or Highslide on your forum.
Or search for one of these at .com for a phpBB install.

Many thanks - do you know which is the better one and do they both auto resize?
_Chris_
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 164
Joined: 19 Aug 2010, 09:06
Gender: Male
phpBB Knowledge: 1

Re: Auto resize

Postby Handyman » 09 Jul 2012, 18:55

Besides the way they work (check out the demos for both), Lightbox is written with jQuery and Highslide is not, I don't know if that effects your decision or not.
They both auto resize and both look very cool.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7454
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Auto resize

Postby _Chris_ » 10 Jul 2012, 03:48

Handyman wrote:Besides the way they work (check out the demos for both), Lightbox is written with jQuery and Highslide is not, I don't know if that effects your decision or not.
They both auto resize and both look very cool.

Thank you.
_Chris_
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 164
Joined: 19 Aug 2010, 09:06
Gender: Male
phpBB Knowledge: 1

Re: Auto resize

Postby Krupski » 16 Jul 2012, 12:30

_Chris_ wrote:When the users are posting images, some of the images are coming out way too wide - is there any way of getting them to auto resize, say to 300px wide.

Any help appreciated.


If they are using the IMG bbcode to post images, just make a new bbcode (maybe named "image"?) like this:

The bbcode:
Code: Select all
[image]{URL}[/image]


The HTML:
Code: Select all
<img src="{URL}" alt="image" style="max-width:300px;max-height:300px;" />


Images will be auto-scaled to be no more than 300px wide or high (whichever is larger).

You may want to "comment out" the original IMG bbcode on your board as well to force your users to use IMAGE instead of IMG.....
''Anything that is complex is not useful and anything that is useful is simple. This has been my whole life's motto.'' -- Mikhail T. Kalashnikov
User avatar
Krupski    
Lieutenant
Lieutenant
 
Posts: 287
Joined: 26 Mar 2010, 20:25
Location: PHPBB 3.0.10 with full WYSIWYG Editor. Try it with UN: "tester" and PW: "tester"
Gender: Male
phpBB Knowledge: 5

Re: Auto resize

Postby _Chris_ » 18 Jul 2012, 12:37

Krupski wrote:
_Chris_ wrote:When the users are posting images, some of the images are coming out way too wide - is there any way of getting them to auto resize, say to 300px wide.

Any help appreciated.


If they are using the IMG bbcode to post images, just make a new bbcode (maybe named "image"?) like this:

The bbcode:
Code: Select all
[image]{URL}[/image]


The HTML:
Code: Select all
<img src="{URL}" alt="image" style="max-width:300px;max-height:300px;" />


Images will be auto-scaled to be no more than 300px wide or high (whichever is larger).

You may want to "comment out" the original IMG bbcode on your board as well to force your users to use IMAGE instead of IMG.....

Sorry Krupski, I don't understand much of that. How do I find out if they are using IMG bbcode please?
_Chris_
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 164
Joined: 19 Aug 2010, 09:06
Gender: Male
phpBB Knowledge: 1

Re: Auto resize

Postby Sniper_E » 18 Jul 2012, 14:03

I'm sure all of those large images that are already posted on your site used the [ img] bbcode.
The edits you will have to do are in your style's template directory.
Look at the template/bbcodes.html template for the img bbcode.
You can use that max-height and max-width on that img line if you want.
Then all of those old posted images will resize in your pages.

I wouldn't add another [image] bbcode... I would fix the one you have with that code or add lightbox to it.

[ Post made via HTC Inspire] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6981
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Auto resize

Postby _Chris_ » 19 Jul 2012, 23:51

Many thanks - will work on this some more.
_Chris_
Lt. Jr Grade
Lt. Jr Grade
 
Posts: 164
Joined: 19 Aug 2010, 09:06
Gender: Male
phpBB Knowledge: 1

Next

Return to phpBB3 Support

Who is online

Users browsing this forum: Ezooms Bot, Sogou [Bot] and 21 guests