scrollbars in pop up image windows

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Pappnase

scrollbars in pop up image windows

Post by Pappnase »

hello

does anybody know how to enable the scrollbars in the popup image windows!?
User avatar
habi
Posts: 166
Joined: Sun 15. Feb 2004, 13:39
Location: Rutschwil, Switzerland
Contact:

Post by habi »

if I understand your question then you have to set the property in the file image_zoom.php
insert in line 45

Code: Select all

\twindow.scrollbars=true;\n
but as far as I konw the window is resized to the content dimsensions so no scroll bars occurs by default.

and oliver hasn't set the property to false so if the content is bigger than the window, the scrollbars should be displayed.

but probably I'm on the wrong track.
maitre
Posts: 15
Joined: Sun 23. Jan 2005, 21:50

Post by maitre »

Hallo an alle :-)

Habe das gleiche Problem, dass ich Images auf meiner Page habe, bei denen das PopUp-Fenster nicht ausreichend groß ist. Der IE6 zeigt nur den Fensterinhalt an und es gibt keine Möglichkeit z.B. per Maus-Rad zu scrollen . Beim Firefox funktioniert das Scrollen per Maus-Rad ohne weiteres. (was nicht viel weiterhilft, da immer noch zu viele mit dem IE unterwges sind :-( )

Beispiel: http://www.schattenspieler.de/index.php ... 18,0,0,1,0
:arrow: da auf den Zeitungsartikel "Rheinische Post - 21.01.2005" klicken.

Habe auch versucht den Code \twindow.scrollbars=true;\n wie oben beschrieben einzufügen - das interessiert das Script aber überhaupt nicht. Wo / wie soll das Script in Zeile 45 der image_zoom.php denn eingetragen werden? Bei mir schaut das so aus:
if($imginfo) {
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n<!--\nfunction ResizeAndCenter(){\n" ;
echo "\twindow.resizeTo(".($imginfo[0]+10).",".($imginfo[1]+30).");\n\twindow.focus();\n}\n//-->\n</script>\n";
}
Wo soll das denn da rein- oder rangequetscht werden?
Pauli
Posts: 92
Joined: Mon 30. Aug 2004, 11:53

Post by Pauli »

uhm, english please?
maitre
Posts: 15
Joined: Sun 23. Jan 2005, 21:50

Post by maitre »

mhhh...
Last edited by maitre on Sun 23. Jan 2005, 23:11, edited 1 time in total.
maitre
Posts: 15
Joined: Sun 23. Jan 2005, 21:50

Post by maitre »

Oh - sry. Here we go:

i´ve also problems with the content-size in popups, when the content (-> image) is bigger than the the screen-resolution.

For example (try @ screen-res. 1024*768):
http://www.schattenspieler.de/index.php ... 18,0,0,1,0
Try there the newspaper-article "Rheinische Post - 21.01.2005"

If I use IE6, the lower contentpart is cut off - there´s no way to scroll down (with mousewheel or arrow-keys). If I use Firefox, I can scroll with the mousewheel or either the arrow-keys (but in this case only a few user would
try the mousewheel / keys to scroll, because they miss the scrollbars). Another Point is, that there are more IE User than Firefox User in the WWW.

So I want to add scrollbars to the popups in case of showing Images in original size, but the hint to put the code \twindow.scrollbars=true;\n in the script line 45 (image_zoom.php) failed - nothing happens. But I´m not 100% shure that my coding was right ...

So can anyone help me, what or where I´ve to paste what kind of code to get popups with scollbars?
That´s the original code - what change are needed to get popups ? wrote: if($imginfo) {
echo "<script language="JavaScript" type="text/javascript">\n<!--\nfunction ResizeAndCenter(){\n" ;
echo "\twindow.resizeTo(".($imginfo[0]+10).",".($imginfo[1]+30).");\n\twindow.focus();\n}\n//-->\n</script>\n";
}
Pauli
Posts: 92
Joined: Mon 30. Aug 2004, 11:53

Post by Pauli »

I do get scrollbars on MAC OS X using Safari
but no scrollbars on Mozilla :(

I guess it's all about the include/inc_js/imagezoom.js
but what & where?
Pauli
Posts: 92
Joined: Mon 30. Aug 2004, 11:53

Post by Pauli »

Got it!

open front.func.inc.php in "include/inc_front"

then change this:

Code: Select all

				// if click enlarge the image
				$open_popup_link = "image_zoom.php?show=".$imagelist[$key]["zoomimage"];
				$table .= "<a href=\"".$open_popup_link."\" onClick=\"window.open('".$open_popup_link."','previewpic','width=";
				$table .= $imagelist[$key]["zoomw"].",height=".$imagelist[$key]["zoomh"].",scrollbars=yes,resizable=yes');return false;\">";
				$table .= $list_img_temp."</a>";
Notice the added ,scrollbars=yes,resizable=yes'
maitre
Posts: 15
Joined: Sun 23. Jan 2005, 21:50

Post by maitre »

Pauli - you´re my hero ;-) Great Job, it works fantastic !!!
Yeah - I´ll love PHPWCMS and it´s forum - the best support forum I´ve ever seen !
Pauli
Posts: 92
Joined: Mon 30. Aug 2004, 11:53

Post by Pauli »

You're welcome!
it's my first contribution anyway :)
maitre
Posts: 15
Joined: Sun 23. Jan 2005, 21:50

Post by maitre »

yeah! hope to see more from that in future ;-)
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

Post by blutch »

Hello there,

I tried to implement this suggestion on the new DEV-version 1.2.3 but the code changed significantly I believe. Can somebody help me out on this. I would really appreciate it.

Greetings, Reinoud
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

Post by blutch »

And another attempt after 6 days:


I tried to implement this suggestion (gettings scrollbars in a pop-up window) on the new DEV-version 1.2.3 but the code changed significantly I believe. Can somebody help me out on this. I would really appreciate it.

Greetings, Reinoud
Post Reply