[ABD] AIR-box Auto Image Resizer Box

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
irdem
Registered User
Posts: 172
Joined: Sat Oct 13, 2007 10:31 pm
Contact:

Re: [BETA] AIR-box Auto Image Resizer Box

Post by irdem » Sun Aug 10, 2008 10:53 pm

hello,
for the attachments, i made this change and works fine on subsilver2:

open subsilver2/attachment.html:

find:

Code: Select all

		<!-- IF _file.S_IMAGE -->
			<img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" /><br />
			<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
		<!-- ENDIF -->

replace with:

Code: Select all

		<!-- IF _file.S_IMAGE -->
		 <!-- AIR-Box mod change - starts here -->
		   		 <!-- original line - starts here 
			<img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" /><br />
			<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
				original line - ends here -->
			<a href="{_file.U_INLINE_LINK}" rel="lightbox"><img src="{_file.U_INLINE_LINK} alt="{_file.DOWNLOAD_NAME}"  /><br />
			<span class="gensmall">{_file.DOWNLOAD_NAME} [ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ]</span>
		 <!-- AIR-Box mod addition - ends here -->
		<!-- ENDIF -->
 
don't forget upload the airbox files to root..

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: [BETA] AIR-box Auto Image Resizer Box

Post by iftitaj » Tue Aug 12, 2008 9:06 am

there is a problem with your MOD. it also resizes (i guess every pics) like banners. it stretched my banner to 90% of forum width since thats what I put to resize images when open in full view. 90% is my assumption only. Don't know accurately but it changes forum banner also.

You have to control it since you declared it in <head> section ... thats applying it on every pics, i guess.

rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: [BETA] AIR-box Auto Image Resizer Box

Post by rufuz » Tue Aug 12, 2008 3:14 pm

Hi iftitaj,
there are 2 ways to avoid that...

1. as in my demo forum, the banner is composed by:

a div id with a css background image (larger than posting layout, it won't resize) , and a linked logo image not larger than posting layout.

or

2.by putting:

Code: Select all

 <!-- AIR-Box mod addition - starts here -->
   <script type="text/javascript" src="{T_TEMPLATE_PATH}/mootools.js"></script>
   <script type="text/javascript" src="{T_TEMPLATE_PATH}/airbox.js"></script>
   <link rel="stylesheet" href="{T_THEME_PATH}/slimbox_css/slimbox.css" type="text/css" media="screen" />
   <!-- AIR-Box mod addition - ends here -->
at the start of styles/your_style/template/viewtopic_body.html instead of styles/your_style/template/overall_header.html

for me both solution work...
Please test your preferred way and report issues in case if you find...

bye
ricc.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: [BETA] AIR-box Auto Image Resizer Box

Post by iftitaj » Wed Aug 13, 2008 4:18 am

I couldn't understand your first solution so applied your second solution but it has a flaw.
It doesn't resize images instead it cuts images (cropped from right). So a partial image (100% zoom) shows in normal view (before full size view).

Plus plz explain this in detail:

Code: Select all

         if (im.width > 640)
         {
            im.style.width = '70%';
I mean in my this example code, images larger than 640px width will be resized to 70% of forum width. Is this right?
I wanna know where the following is declared:
> The width of actual image of which if the image is larger, it will apply resizing.
> To what width it should be resized.
> When open in full view, the width of image.

I hope you understand what I mean. Plz help me.

iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: [BETA] AIR-box Auto Image Resizer Box

Post by iftitaj » Wed Aug 13, 2008 5:10 am

I found a typo mistake in DIY in installation instructions.
For [signature-img] tag, you wrote:

BBcode usage:

Code: Select all

[signature-img]{TEXT01}[/signature-img]
and in HTML replacement:

Code: Select all

<img src="{TEXT1}" />
Now the typo is, you used TEXT01 in one place & TEXT1 in other. Plz correct this error in install.xml in next version. :)

Durbatuluk
Registered User
Posts: 106
Joined: Thu Dec 29, 2005 8:22 pm

Re: [BETA] AIR-box Auto Image Resizer Box

Post by Durbatuluk » Wed Aug 13, 2008 5:38 am

When somebody post this in forum:

Code: Select all

[URL=http://img178.imageshack.us/my.php?image=eye0061df8.jpg][IMG]http://img178.imageshack.us/img178/7669/eye0061df8.th.jpg[/IMG][/URL]
It doesnt show image correctly... any way to fix it?

rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: [BETA] AIR-box Auto Image Resizer Box

Post by rufuz » Wed Aug 13, 2008 4:48 pm

iftitaj wrote:I couldn't understand your first solution so applied your second solution but it has a flaw.
It doesn't resize images instead it cuts images (cropped from right). So a partial image (100% zoom) shows in normal view (before full size view).
you're right, at moment the only solution is the 1st one.
I try to explain... in the overall_header you should put the div relative to your header and logo image:

Code: Select all

<div id="headerbar"></div>
<div id="logo"><a href="../"><img src="{T_THEME_PATH}/images/logo.jpg" alt="logo" width="800" /></a></div>
then style them in css (but you shuold really adapt this code to your template, look at this like a generic guideline!) :

Code: Select all

#header {
        background: url("{T_THEME_PATH}/images/headerbar.jpg") ;
	width: 890px;
	height:188px;
	padding-right:30px;
	padding-left:30px;
	left:5px;
	margin-top:0px;
	margin: 0 auto;
	background-color: transparent;
	background-repeat: no-repeat;
	background-attachment: scroll;
	background-x-position: 100%;
	background-y-position: 100%;
	position:relative; 	   
}

#logoprovisum {
	
	width: 253px;
	height:125px;
	z-index:5;
	top:23px;
	position: absolute;
	float:left;
		   
}
iftitaj wrote:Plus plz explain this in detail:


if (im.width > 640)
{
im.style.width = '70%';


I mean in my this example code, images larger than 640px width will be resized to 70% of forum width. Is this right?
I wanna know where the following is declared:
The simplest way is detect your max posting layout width and put it in the 1st and 2nd value:
if the width is 650:

Code: Select all

    if (im.width > 650)
             {
                im.style.width = '650px';
bye

ricc.

p.s. thanks for the typo I'll correct it asap!

rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: [BETA] AIR-box Auto Image Resizer Box

Post by rufuz » Wed Aug 13, 2008 4:53 pm

Durbatuluk wrote:When somebody post this in forum:

Code: Select all

[URL=http://img178.imageshack.us/my.php?image=eye0061df8.jpg][IMG]http://img178.imageshack.us/img178/7669/eye0061df8.th.jpg[/IMG][/URL]
It doesnt show image correctly... any way to fix it?
yes you don't need the url tag, direct linking the image url with img is the right way:

Code: Select all

[img]http://img178.imageshack.us/img178/7669/eye0061df8.jpg[/img]
this should work for you.


bye

ricc.

xmen33
Registered User
Posts: 42
Joined: Tue Jan 08, 2008 11:23 am

Re: [BETA] AIR-box Auto Image Resizer Box

Post by xmen33 » Thu Aug 14, 2008 2:23 pm

ok i used subsilver2
i didnt see
template/overall_header.html
find

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
Add after

Code: Select all

	<!-- AIR-Box mod addition - starts here -->
	<script type="text/javascript" src="{T_TEMPLATE_PATH}/mootools.js"></script>
	<script type="text/javascript" src="{T_TEMPLATE_PATH}/airbox.js"></script>
	<link rel="stylesheet" href="{T_THEME_PATH}/slimbox_css/slimbox.css" type="text/css" media="screen" />
	<!-- AIR-Box mod addition - ends here -->
?
and in
template/attachment.html
Find

Code: Select all

			<dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>
Replace With

Code: Select all

		 <!-- AIR-Box mod change - starts here -->
		   		 <!-- original line - starts here 
			<dt class="attach-image"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}" onclick="viewableArea(this);" /></dt>
				original line - ends here -->
			<dt><a href="{_file.U_INLINE_LINK}" rel="lightbox"><img src="{_file.U_INLINE_LINK}" alt="{_file.DOWNLOAD_NAME}"  /></a></dt>
		 <!-- AIR-Box mod addition - ends here -->	
help me pls

rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: [BETA] AIR-box Auto Image Resizer Box

Post by rufuz » Thu Aug 14, 2008 3:31 pm

xmen33 wrote:ok i used subsilver2
i didnt see
template/overall_header.html.....
please read previous posts in this thread and you'll find the solution... for example here

bye

ricc.

xmen33
Registered User
Posts: 42
Joined: Tue Jan 08, 2008 11:23 am

Re: [BETA] AIR-box Auto Image Resizer Box

Post by xmen33 » Fri Aug 15, 2008 10:38 am

i had make all thing and it work but i had some problem
Image

xmen33
Registered User
Posts: 42
Joined: Tue Jan 08, 2008 11:23 am

Re: [BETA] AIR-box Auto Image Resizer Box

Post by xmen33 » Fri Aug 15, 2008 1:25 pm


rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: [BETA] AIR-box Auto Image Resizer Box

Post by rufuz » Fri Aug 15, 2008 7:51 pm

xmen33 wrote:i had make all thing and it work but i had some problem
xmen, let me suppose:

you are using an LTR language (left to right like arabic) and internet explorer, is that right?
if so, look and join this thread for a possible solution...

if not , drop me your url...

ricc.

rufuz
Registered User
Posts: 249
Joined: Wed Oct 17, 2007 8:07 am
Location: Rome - New York - Rome - New York - and on...

Re: [BETA] AIR-box Auto Image Resizer Box

Post by rufuz » Fri Aug 15, 2008 8:27 pm

updtated to rel. 0.8.9b - some typos corrected -

virtualkev
Registered User
Posts: 20
Joined: Thu Jul 05, 2007 8:50 pm

Re: [BETA] AIR-box Auto Image Resizer Box

Post by virtualkev » Wed Aug 20, 2008 8:44 pm

Thanks ricc, a great mod.

I was a bit stumped by getting the attachments to show up in lightbox, then I figured to turn off the image size limit and link dimensions in acp->general:attachment settings, and it works a treat :D

Locked

Return to “[3.0.x] Abandoned MODs”