quick question on images

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

quick question on images

Post by ryanpratt »

i am trying to create a page where wen you click on the images instead of them poping up in a pop-up window to have them apear in a div, or a iframe so i can create a sort of gallerey with multiple small pictures that will increse in size in the same page and as you click next picture it will replace the previous larger image, i looked into the java script pop-up include and the image majic but cant seem to figure it out, any ideas would be greatley apreciated.
Pappnase

Post by Pappnase »

hallo ryan

why don't you use the images contentpart or rollover images?
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

help

Post by ryanpratt »

hello Pappnase

i dont see what you are saying, could you referme to any information on this.

i need to have a 600x400 window with 5 small images bellow it, and wen you click one of those images it shows up in the 600x400 window instead if using a popup, i can manually code it in html & java but i would like the cms to handle so i can easaley change images.

thanks for your repply
Pappnase

Post by Pappnase »

hello

wich version did you use!?
look at the contentpart list in your system!

and take a look at this! there you can see a list wich content parts you have
http://docu.fhss.de/creating_articles.shtml
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

v #

Post by ryanpratt »

v1.1-rc2 ?
Pappnase

Post by Pappnase »

hello ryan

are you an fantastico user? :wink:
please update! then you ill have all you can see at the docu site! :wink:

http://www.phpwcms.de/forum/viewtopic.php?t=3132
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

Post by ryanpratt »

yes ! they are behind in the updates can you assist in update
Pappnase

Post by Pappnase »

hello ryan

i can assist you but at the link in the prev. thread is an good short docu.

http://www.phpwcms.de/forum/viewtopic.php?t=3132
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

login ?

Post by ryanpratt »

i have done the update, to r4 but i cant login now, the login page says im alreadey loged in, what should i do ? :shock:
Pappnase

Post by Pappnase »

hello

did you edit your conf.inc.php!? please post your conf.inc.php but without passwords.
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

it worked

Post by ryanpratt »

my bad hade a misspelling in my config...
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

http://www.pipemasters.pt/index.php?trabalhos

Is this what you are looking for?

If is, you have to modify source code ... :( but I may help you :idea:

Cumps.
Isac
ryanpratt
Posts: 74
Joined: Fri 5. Mar 2004, 16:59
Location: Hilton Head Island, SC

thats it ?

Post by ryanpratt »

thanks Isac that is just what im looking for.
Pappnase

Post by Pappnase »

hello ryan

and this was i talking from!*smile*
contentpart rollover image!*smile*
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

First,

You have to create an Iframe in your layout and define properties, target name (box!) and default source.

Code: Select all

<IFRAME name="box" scrolling="no" frameborder="0" width="422" height="316" src="/my.php"></IFRAME>
Second,

create new image_zoom.php to target inside iframe i.e. image_zoom_iframe.php could be the name.

inside image_zoom_iframe.php put this or something you want...

Code: Select all

<?php
/*************************************************************************************
   Copyright notice
   
   (c) 2002-2004 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
 
   This script is part of PHPWCMS. The PHPWCMS web content management system is
   free software; you can redistribute it and/or modify it under the terms of
   the GNU General Public License as published by the Free Software Foundation;
   either version 2 of the License, or (at your option) any later version.
  
   The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
   A copy is found in the textfile GPL.txt and important notices to the license 
   from the author is found in LICENSE.txt distributed with these scripts.
  
   This script is distributed in the hope that it will be useful, but WITHOUT ANY 
   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 
   This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/

require_once ("include/inc_conf/conf.inc.php");
$img = $_GET["show"];
if($img) {

	$img = base64_decode($img);
	$img = $phpwcms["file_tmp"]."/".$phpwcms["dir_preview"]."/".$img;
	
	$imginfo = getimagesize($img);

} else {
	$img = "img/leer.gif";
}

?>
<HTML>
<HEAD>
<TITLE>PipeMasters.pt</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<STYLE type="text/css">
<!--
body {
	margin: 0px 0px 0px 0px;
}
-->
</STYLE>
</HEAD>
<BODY bgcolor="#F1F1F1" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF"> 
<TABLE width="100%" height="100%" cellspacing="0" cellpadding="0" border="0"> 
  <TR> 
    <TD width="100%" height="100%" align="center"><A href="#" title="" onClick="history.back();return false;"><IMG src="<?php echo $img ?>" alt="voltar" border="0" <?php echo $imginfo[3] ?>></A></TD> 
  </TR> 
</TABLE> 
</BODY>
</HTML>
Third,

Open file in include/inc_front/front.func.inc.php and change in line 216 this code

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"]."');return false;\">";
				$table .= $list_img_temp."</a>";
to this

Code: Select all

// if click enlarge the image
				$open_popup_link = "image_zoom_iframe.php?show=".$imagelist[$key]["zoomimage"];
				$table .= "<a href=\"".$open_popup_link."\" target=\"box\" />";
				$table .= $list_img_temp."</a>";
If you do this will work, but only with content part images all the other images still open in popup.

If you want image in summary target inside iframe (box) you have to edit front.func.inc.php and replace this code in line 107

Code: Select all

$open_popup_link = "image_zoom.php?show=".base64_encode($image[2]);
		$table .= '<td'.$image_align.$image_valign.$image_bgcolor.$image_class."><a href=\"".$open_popup_link."\" onClick=\"window.open('".$open_popup_link."','previewpic','width=";
		$table .= $zoominfo[0].",height=".$zoominfo[1]."');return false;\">";
to this

Code: Select all

$open_popup_link = "image_zoom_iframe.php?show=".base64_encode($image[2]);
		$table .= '<td'.$image_align.$image_valign.$image_bgcolor.$image_class."><a href=\"".$open_popup_link."\" target=\"box\">";

well, I hope you understand what you are doing.

Good luck, for now :wink:
Post Reply