[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.
Locked
User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Mon Dec 07, 2009 6:34 pm

Hello there, here my two cents....

Installed on prosilver and subsilver2 based theme.

On prosilver works ok, except when i click on the image on the post it opens up another little window with the picture plus the airbox. How do i eliminate the extra windows??


On subsilver2 doesn't work...i don't understand why. the image isn't resizing in post...

Any clue about all this?


Thanks in advance for your reply...

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

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

Post by rufuz » Mon Dec 07, 2009 7:06 pm

hi,
Neuropass wrote:when i click on the image on the post it opens up another little window with the picture plus the airbox.
Just give me your url to see what's happening...

for the subsilver thing, I'm momentarily taking it out, and possibly fix it later.

bye

ricc.

User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Mon Dec 07, 2009 9:18 pm

Thanks a lot for your reply.

this is the link with the picture:

HERE

Another thing, apparently the :
<link rel="stylesheet" href="{T_THEME_PATH}/slimbox_css/slimbox.css" type="text/css" media="screen" />
gives me error for the xhtml validation... How can i make it pass?



EDIT: the link won't work because of the permission...
anyway check this screenshot:


http://i50.tinypic.com/14dzxit.png

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

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

Post by rufuz » Mon Dec 07, 2009 9:59 pm

Neuropass wrote: <link rel="stylesheet" href="{T_THEME_PATH}/slimbox_css/slimbox.css" type="text/css" media="screen" />

gives me error for the xhtml validation... How can i make it pass?
that line actually validates xhtml 1.0 strict both in my editor and in online w3c markup validation service... are you sure that's exactly that line is involved?

for the link... It would be better a real link to inspect inside the code...
Anyway it seems you have to clear some previous attempt of installing other image mods... or some kind of link related mod... It seems indeed there's a new window javascript interacting with your links...

can you provide at least the html generated code, just the portion for the image in question from the browser? and inline or linked JS involved...

let me know,

ricc.

User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Tue Dec 08, 2009 12:37 am

I'm PMing you the admin account. please let me know if you find a way to fix it. I just installed a fresh copy of phpbb 3.06 so your mod is actually the first and only image mod that i have...


For the validation i'm pretty sure because if i remove that portion of the code the validation passes...

User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Tue Dec 08, 2009 1:41 pm

For the validation i moved the this code:

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 -->
Before the </head> tag in the header and the validation passed ok... for some reason in the footer the validation would fail.

Hve you checked my forum yet for the other popup window problem? i can't figure it out.. :cry: :cry: :?

I use to use the version rc3 and it was working perfectly...

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

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

Post by rufuz » Tue Dec 08, 2009 1:55 pm

the window is being opened by these lines of code, an inline JS:

Code: Select all

<script type="text/javascript">
window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i < document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
         if (im.width > 600)
         {
            im.style.width = '600px';
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';
            im.title = 'Click Here To See Image Full Size ';
         }
      }
   }
}
</script> 
you should find them in a template folder file, most likely overall_header.html , but I can determine it precisely from the plain html code.
Just clear them and it should work as expected

for the validation I still can't see that line you pointed:

Code: Select all

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.newage-os.org%2Fviewtopic.php%3Ff%3D2%26t%3D4&charset=(detect+automatically)&doctype=XHTML+1.0+Strict&group=0&user-agent=W3C_Validator%2F1.654

I put the link in code as it seems too long for phpbb magic url, just copy 'n paste on your browser
anyway if you look for "strict" it will be a hard work. E.g. Slimbox uses rel="lightbox" and it won't validate, while with "transitional" will probably do.

User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Tue Dec 08, 2009 2:07 pm

rufuz wrote:the window is being opened by these lines of code, an inline JS:

Code: Select all

<script type="text/javascript">
window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i < document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
         if (im.width > 600)
         {
            im.style.width = '600px';
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';
            im.title = 'Click Here To See Image Full Size ';
         }
      }
   }
}
</script> 
you should find them in a template folder file, most likely overall_header.html , but I can determine it precisely from the plain html code.
Just clear them and it should work as expected

Hi thanks for following me in this... in my overall i have no java script exception of standard phpbb PM thing and logout confirmation mod.


What should i do?

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

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

Post by rufuz » Tue Dec 08, 2009 2:43 pm

1. You should open the "template" folder where overall_header.html actually is.
2. Start opening viewforum_body.html or overall_footer.html or viewtopic_body.html (the most used for such things) and search for those quoted lines inside and erase them.
3. If you fail to find the lines in those files then open 1 by 1 all files there, until you find them
4. You surely can skip all the UCP_ and MCP_ tagged files.

User avatar
Neuropass
Registered User
Posts: 1158
Joined: Fri Apr 17, 2009 2:02 pm
Location: SciTE4AutoIt3

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

Post by Neuropass » Tue Dec 08, 2009 2:50 pm

rufuz wrote:1. You should open the "template" folder where overall_header.html actually is.
2. Start opening viewforum_body.html or overall_footer.html or viewtopic_body.html (the most used for such things) and search for those quoted lines inside and erase them.
3. If you fail to find the lines in those files then open 1 by 1 all files there, until you find them
4. You surely can skip all the UCP_ and MCP_ tagged files.

Man, sorry about all this mess.. Your mod works fine. It was a script in the viewtopic_body. Damn it! i removed the script and now it is working perfectly!! thanks a lot again for your kind support and sorry again for this mess~!

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

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

Post by rufuz » Tue Dec 08, 2009 2:59 pm

np, good you get it work!

bye

ricc.

Mark G
Registered User
Posts: 15
Joined: Wed Jan 07, 2009 6:07 pm

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

Post by Mark G » Wed Dec 09, 2009 6:14 am

Neoxxx wrote:Hello...i use the last version RC 05 but sometimes the script doesn't resize the image but if i refresh the page the script resize the image

Why?

EDIT: if in the post there are two images, one image is resized but other one no
I am seeing the same thing, I'm not sure when it started, but I have made a number of changes recently including updating from RC 04 to RC 05 and upgrading to phpBB 3.0.6.
I'll keep investigating.

Neoxxx
Registered User
Posts: 102
Joined: Wed Mar 18, 2009 12:18 pm

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

Post by Neoxxx » Wed Dec 09, 2009 12:12 pm

Mark G wrote:
Neoxxx wrote:Hello...i use the last version RC 05 but sometimes the script doesn't resize the image but if i refresh the page the script resize the image

Why?

EDIT: if in the post there are two images, one image is resized but other one no
I am seeing the same thing, I'm not sure when it started, but I have made a number of changes recently including updating from RC 04 to RC 05 and upgrading to phpBB 3.0.6.
I'll keep investigating.

The problem has been introduced with version RC 05 while with RC 04 was all ok

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

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

Post by rufuz » Wed Dec 09, 2009 3:42 pm

I had to remove the onload function from the javascript to make it compatible with 3.0.6 quickreply new js.
I'll try to fix it next week...
Meanwhile, if you opt for quickreply form instead of the button, you can still roll back the previous airbox.js

bye

ricc.

Neoxxx
Registered User
Posts: 102
Joined: Wed Mar 18, 2009 12:18 pm

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

Post by Neoxxx » Wed Dec 09, 2009 6:09 pm

Where is the code to remove?
Thank

Locked

Return to “[3.0.x] Abandoned MODs”