
northernpenguin
User
Dec 27, 2011, 3:31 PM
Post #10 of 18
(2653 views)
Shortcut
|
|
Re: [RapidWeb] Adding an image Gallery Using Lightbox
[In reply to]
|
Can't Post
|
|
I highlighted in red below the change you should make. Try this first and lets see where it leads.
Thanks for your kind help. I can't attach the entire file because it is done in a Wysiwyg program that creates the file upon publishing (Xsite Pro). But here is what is in the file: Here is what is in the header: <?php /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */ // load viewer library $libraryPath = 'cmsAdmin/lib/viewer_functions.php'; $dirsToCheck = array('//','','../','../../','../../../'); foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }} if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); } // load records list($hotelsRecords, $hotelsMetaData) = getRecords(array( 'tableName' => 'hotels', 'where' => whereRecordNumberInUrl(1), 'limit' => '1', )); $hotelsRecord = @$hotelsRecords[0]; // get first record // show error message if no matching record is found if (!$hotelsRecord) { dieWith404("Record not found!"); } ?> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"></script> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> And here is what makes up the page: <p>Already included some header code. Change the code form Minyan to Hotel </p> <p> </p><nodesigner> <!-- STEP2: Display Records (Paste this where you want your records to be listed) --> <h1>Hotels - Detail Page Viewer</h1> Record Number: <?php echo $hotelsRecord['num'] ?><br/> Name: <?php echo $hotelsRecord['name'] ?><br/> Address: <?php echo $hotelsRecord['address'] ?><br/> Address2: <?php echo $hotelsRecord['address2'] ?><br/> City: <?php echo $hotelsRecord['city'] ?><br/> State or Province: <?php echo $hotelsRecord['state'] ?><br/> Zip: <?php echo $hotelsRecord['zip'] ?><br/> Country: <?php echo $hotelsRecord['country'] ?><br/> Phone: <?php echo $hotelsRecord['phone'] ?><br/> Web Site: <?php echo $hotelsRecord['web_site'] ?><br/> Email: <?php echo $hotelsRecord['email'] ?><br/> Establishment: <?php echo join(', ', getListLabels('hotels', 'establishment', $hotelsRecord['establishment'])); ?><br/> Terms (Check in time, cancellation fees, etc.): <?php echo $hotelsRecord['terms'] ?><br/> Kosher Info (e.g. Glatt, Cholov Yisrael, etc.): <?php echo $hotelsRecord['kosher_info'] ?><br/> Hashgacha / Supervision: <?php echo $hotelsRecord['hashgacha_supervision'] ?><br/> AAA Discount : <?php echo $hotelsRecord['aaa_discount'] ?><br/> Credit Cards Accepted: <?php echo $hotelsRecord['credit_cards'] ?><br/> Parking: <?php echo $hotelsRecord['parking'] ?><br/> Member Services: <?php echo join(', ', getListLabels('hotels', 'member_services', $hotelsRecord['member_services'])); ?><br/> Leisure Activities: <?php echo join(', ', getListLabels('hotels', 'leisure_activities', $hotelsRecord['leisure_activities'])); ?><br/> In-Room Amenities: <?php echo join(', ', getListLabels('hotels', 'in_room_amenities', $hotelsRecord['in_room_amenities'])); ?><br/> Short Description: <?php echo $hotelsRecord['short_description'] ?><br/> Hotel Information: <?php echo $hotelsRecord['hotel_information'] ?><br/> _link : <a href="<?php echo $hotelsRecord['_link'] ?>"><?php echo $hotelsRecord['_link'] ?></a><br/> </nodesigner> <nodesigner> <div align="center"> <?php foreach (getUploads($options['hotels'], 'images', $record['num']) as $upload): ?> <?php if ($upload['hasThumbnail']): ?> <a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[Homepage]" title="<?php echo $upload['info1'] ?>"> <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight']?>" /> </a> <?php elseif ($upload['isImage']): ?> <a href="<?php echo $upload['urlPath'] ?>" rel="lightbox[Homepage]" title="<?php echo $upload['info1'] ?>"> <img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" /> </a> <?php else: ?> <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a> <?php endif ?> <?php endforeach ?> </div> </nodesigner> <nodesigner> <a href="<?php echo $hotelsMetaData['_listPage']; ?>"><< Back to list page</a> - <a href="mailto:?subject=<?php echo urlencode(thisPageUrl()) ?>">Email this Page</a> </nodesigner> <p> </p> The nodesigner tag is just to let Xsite Pro (the program I use for the web layout, kind off Dreamweaver) know that this is code and not try to add any design to it. Your help is greatly apreciated! -- northernpenguin Northern Penguin Technologies "Any sufficiently advanced technology is indistinguishable from magic." ........Arthur C. Clarke
(This post was edited by northernpenguin on Dec 27, 2011, 7:57 PM)
|