possibility to vary pop up size

17 years 10 months ago #13676 by nant
Replied by nant on topic Re:possibility to vary pop up size
stevebor1 wrote:

just did a quick google search; you can fiddle with it the code if you want.

www.weberdev.com/get_example-4051.html


Thanks for the link!

I also did alot of searching before I finally came up with the current popup function. I wanted to add the description as an item caption.

I will play around with this suggested code and see if I can make some changes for the next release.
Maybe someone can add an artifact to the project?

Please Log in to join the conversation.

17 years 10 months ago #13679 by nant
Replied by nant on topic Re:possibility to vary pop up size
ffaabbss wrote:

thanks.. the code there looks quite different from what nant is using in his comp though.. i don't really want to change too much because that always gives me nothing but trouble..

i cannot really link or merge the two- the site you provided and nants code.

i would much rather prefer "adjusting" the code.

i guess this is the code that is in charge of what is going on right?

$style = "style=\"padding:5px;\"";
if ($pgdisplaycount > 0){
// headings go here if needed
switch ($tabparams["cbpgdisplayformat"]){
case 'DF1': // image layout headings and inits
$icon = explode(",",$tabparams["cbpgbuttonslist"]);
$htmltext2 .= "<script language=\"JavaScript\">";

$htmltext2 .= "function pgpopup(pgimagefile,pgimagetitle,pgimagedescription) {\n";
$htmltext2 .= "var newWindow = window.open(\"\",\"newWindow\",\"height=" . ($tabparams["pgmaxheight"]+100) . ",width=" . $tabparams["pgmaxwidth"] . "\" );\n";
$htmltext2 .= "var imageurl = \"<img src=\" + pgimagefile + \">\";\n";
$htmltext2 .= "newWindow.document.open();";
$htmltext2 .= "newWindow.document.writeln(\"<div align='center' >\");\n";
$htmltext2 .= "newWindow.document.writeln(\"<title>Profile Gallery Image: \"+ pgimagetitle + \"</title>\");\n";
$htmltext2 .= "newWindow.document.writeln(imageurl);\n";
$htmltext2 .= "newWindow.document.writeln(\"<br />\");";
$htmltext2 .= "newWindow.document.writeln(pgimagedescription);\n";
$htmltext2 .= "newWindow.document.writeln(\"</div>\");\n";
$htmltext2 .= "newWindow.document.close();\n";
$htmltext2 .= "}\n";
$htmltext2 .= "</script>";


the only question now is what i would have to "adjust" in this code... well.. provided of course i am right on this one;)

ohh.. and it is not the padding value. have already tried to set it to 0 and it doesn't do a thing for me...

thx
fabs


Yup - that's the code area.
It is basically php code generating html code that has javascript in it that opens another window and writes html code in it.

As a quick measure you could
change:

$htmltext2 .= "var newWindow = window.open("","newWindow","height=" . ($tabparams["pgmaxheight"]+100) . ",width=" . $tabparams["pgmaxwidth"] . "" );n";

to

$htmltext2 .= "var newWindow = window.open("","newWindow","height=" . ($tabparams["pgmaxheight"]+100) . ",width=" . ($tabparams["pgmaxwidth"]+100 ) . "" );n";

Please Log in to join the conversation.

17 years 10 months ago #13705 by ffaabbss
Replied by ffaabbss on topic Re:possibility to vary pop up size
thx nant. the code you psoted gave me a parse error.

i changed according to your suggestion with a slight modification:

[code:1]
$htmltext2 .= "var newWindow = window.open("","newWindow","height=" . ($tabparams["pgmaxheight"]+100) . ",width=" . $tabparams["pgmaxwidth"] . "" );n";[/code:1]

to

[code:1]$htmltext2 .= "var newWindow = window.open(\"\",\"newWindow\",\"height=" . ($tabparams["pgmaxheight"]+100) . ",width=" . ($tabparams["pgmaxwidth"]+100) . "\" );\n";[/code:1]

now at least i can see my picture but the popup still is too big... in my opinion it should just open wihtout any html output and just in the size of the picture...
the description that currently shows up for each photo should rather be put somewhere in the gallery page, as most people just look at the thumbs anyway. maybe have a little kind of info icon next to each photo that displays when hovered the description. i know that hovering the photo i also get the description but to make it clear to people that there is more information i suggest that icon additionally. and thats it for the description. leave that away in the popup and make life easier i'd say...

thx
fabs

Please Log in to join the conversation.

17 years 10 months ago #15321 by basstt
Replied by basstt on topic Re:possibility to vary pop up size
thanx for the galley plugin!!!!!!!!

one question:
is there a way to show the fullsize image inside the profile and not as a popup. Like a gallery slideshow in the main contentarea
of cb.

sebastian

Please Log in to join the conversation.

17 years 10 months ago #15322 by nant

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.205 seconds

Facebook Twitter LinkedIn