Widescreen Gaming Forum

[-noun] Web community dedicated to ensuring PC games run properly on your tablet, netbook, personal computer, HDTV and multi-monitor gaming rig.
It is currently 27 Nov 2024, 21:02

All times are UTC [ DST ]




Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 07 Jul 2007, 07:07 
Offline
Insiders
Insiders
User avatar

Joined: 25 Jul 2004, 04:41
Posts: 365
One week bump!


Top
 Profile  
 


PostPosted: 08 Jul 2007, 00:24 
Offline
Founder
Founder
User avatar

Joined: 13 Oct 2003, 05:00
Posts: 7358
Here are two more quick mods to try:

http://phpbbhacks.com/download/7842 <--- Same as my first link, but coded differently... worth a shot.


This one worked:

Code:
&lt;script&gt;
   window.onload = resizeimg;
   function resizeimg()
   {
      if (document.getElementsByTagName)
      {
         for (i=0; i&lt;document.getElementsByTagName('img').length; i++)
         {
            im = document.getElementsByTagName('img')[i];
            if (im.width &gt; 853)
            {
               im.style.width = '853px';
               eval(&quot;pop&quot; + String(i) + &quot; = new Function(&quot;pop = window.open('&quot; + im.src + &quot; ','fullscale','width=900,height=500,scrollbars=1,resizable=1'); pop.focus();&quot;)&quot;);
               eval(&quot;im.onclick = pop&quot; + String(i) + &quot;;&quot;);
               if (document.all) im.style.cursor = 'hand';
               if (!document.all) im.style.cursor = 'pointer';
               im.title = 'Click Here To See Image Full Size ';
            }
         }
      }
   }
   
   &lt;/script&gt;


Glad it worked too. The other one had you editing 5 files and running some JavaScript...

I set the width to 768, which should work for everyone. The one thing I'd like to do is figure out how to make the width and height of the pop-up the size of the actual pic. I tried taking out the width and height, and I tried making them 100%. Neither worked. I set at 900x500 as I decent compromise. Any suggestions.


Top
 Profile  
 
PostPosted: 08 Jul 2007, 00:29 
Offline
Editors
Editors
User avatar

Joined: 24 Sep 2006, 16:57
Posts: 1317
Testing, testing! 1, 2 testing!



o0 nice work

_________________
Formerly eZ`

Follow me on twitter: @theg00seberry and find me on Steam


Top
 Profile  
 
PostPosted: 08 Jul 2007, 03:43 
Offline
Insiders
Insiders
User avatar

Joined: 25 Jul 2004, 04:41
Posts: 365
Sweet, thanks :)

Not going to be able to help with the javascript though... hopefully someone knows.


Top
 Profile  
 
PostPosted: 08 Jul 2007, 11:05 
Offline
Editors
Editors

Joined: 17 Nov 2005, 09:02
Posts: 2820
And what about that "this pic is resized" line. Is that also possible?

Nice work btw. :wink:


Top
 Profile  
 
PostPosted: 08 Jul 2007, 14:06 
Offline

Joined: 30 Apr 2006, 23:06
Posts: 59
Ibrin-

This should make the popup the original size of the image, plus 10 pixels for the body margins; if the image is larger than the user's resolution, the popup should become the size of their screen.

Let me know if that works or not; I am looking into adding the text to notify the user that the image has been resized, but that will take more work.
Code:
&lt;script&gt;
   window.onload = resizeimg;
   function resizeimg()
   {
      if (document.getElementsByTagName)
      {
         for (i=0; i&lt;document.getElementsByTagName('img').length; i++)
         {
            im = document.getElementsByTagName('img')[i];
            if (im.width &gt; 768)
            {
               origW = im.width + 10; // Original Width
                  if (origW &gt; screen.width) origW = screen.width; // Check if Original Width is too big for user's resolution
               origH = im.height + 10; // Original Height
                  if (origH &gt; screen.height) origH = screen.height; // Check if Original Height is too big for user's resolution
               im.style.width = '768px';
               eval(&quot;pop&quot; + String(i) + &quot; = new Function(&quot;pop = window.open('&quot; + im.src + &quot; ','fullscale','width=&quot; + origW + &quot;,height=&quot; + origH + &quot;,scrollbars=1,resizable=1'); pop.focus();&quot;)&quot;);
               eval(&quot;im.onclick = pop&quot; + String(i) + &quot;;&quot;);
               if (document.all) im.style.cursor = 'hand';
               if (!document.all) im.style.cursor = 'pointer';
               im.title = 'Click Here To See Image Full Size ';
            }
         }
      }
   }
   
   &lt;/script&gt;


Top
 Profile  
 
PostPosted: 09 Jul 2007, 00:04 
Offline
Insiders
Insiders
User avatar

Joined: 25 Jul 2004, 04:41
Posts: 365
Now to add a mod that truncates ridiculously long lines/urls and then the forum will never have horizontal scrolling again :)


Top
 Profile  
 
PostPosted: 09 Jul 2007, 03:16 
Offline

Joined: 31 May 2007, 09:43
Posts: 43
Now to add a mod that truncates ridiculously long lines/urls and then the forum will never have horizontal scrolling again :)


Horizontal scrolling? I thought everyone here had a widescreen monitor :P As for long urls, you can always use http://tinyurl.com/ to fix that up (though of course there's the hidden danger of now knowing exactly what you're clicking into).


Top
 Profile  
 
PostPosted: 09 Jul 2007, 04:19 
Offline
Insiders
Insiders
User avatar

Joined: 25 Jul 2004, 04:41
Posts: 365
The idea behind the two mods would be so that the work is done automatically and transparently :)

I've got the 2nd highest consumer resolution widely available (1920px) and I still get horizontal scrollbars from people posting massive URLs on occasion. We've fixed scrolling due to images now, so URL scrolling is the only thing thats left :)


Top
 Profile  
 
PostPosted: 09 Jul 2007, 10:52 
Offline
User avatar

Joined: 24 Dec 2006, 18:56
Posts: 764
My little "problem" with that resizing is that the window is first almost the original size, so you have to resize the window with it. But that is just me :roll:

And yeah long links can be a pain, but couldn't you do something like http://wwwthisisarealylonglink.com/ex...../forum so that the ... replace a large chunk of the link.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  




Powered by phpBB® Forum Software © phpBB Group